API

FiniteDiffWENO5.AbstractWENOTopology — Type
AbstractWENOTopology

Optional supertype for padded domain decompositions. Implement the weno_* accessors in FiniteDiffWENO5; subtyping is not required. Override halo_buffers_for when exchanges reuse preallocated buffers.

source
FiniteDiffWENO5.ENO5PhysicalRestriction — Type
ENO5PhysicalRestriction

Physical cell and face bounds for ENO5 interpolation near boundaries. Restrict stencils at extrapolation and inflow faces only for owned cells; ghost cells use the allocated-extent bound.

source
FiniteDiffWENO5.MultiphaseWENOScheme — Method
MultiphaseWENOScheme(phases::Tuple, topo::SerialTopology; geometry = :cell,
                      boundary, stag = false, multithreading = true)

Build a padded single-rank multiphase scheme.

source
FiniteDiffWENO5.PaddedExtent — Type
PaddedExtent{N}

Bookkeeping for how a WENOScheme/MultiphaseWENOScheme buffer's allocated extent relates to its physical (owned) extent.

  • owned: physical (owned) cell count per axis.
  • pad: halo width per axis (0 for every axis on an unpadded/default scheme).
  • global_size: global cell count per axis — equals owned outside a distributed context; recorded so the ENO5-vs-linear interpolation choice can key off the true global extent instead of the padded allocated one.
  • global_periodic: the serial (physical) periodicity per axis — distinct from a scheme's vperiodic, which is forced false on every padded axis.
  • geometry: :cell (cell lattice) or :vertex (vertex lattice).

Every existing serial construction gets the default: owned == size(c0), pad = 0 on every axis, global_size == owned, geometry = :cell.

source
FiniteDiffWENO5.PrescribedInflowBC — Type
PrescribedInflowBC(value)

Prescribe the exterior upwind state at an inflow boundary. At outflow the interior WENO reconstruction is used, so value is not imposed. value may be a scalar or an array over the tangential boundary dimensions.

source
FiniteDiffWENO5.ProcessBC — Type

Interior process seam. Keep the global indexing policy for reconstruction; the halo prevents owned stencils from wrapping or clamping. Physical ghost filling and inflow installation skip this boundary. Users cannot select it.

source
FiniteDiffWENO5.SerialTopology — Type
SerialTopology(global_dims::NTuple{N,Int}; halo = 3, periodic = false)

Single-rank padded topology. halo and periodic accept scalars or tuples; halo exchange is a no-op.

source
FiniteDiffWENO5.WENOScheme — Method
WENOScheme(c0::AbstractArray{T, N}; form::Symbol, boundary=nothing, stag=false,
           multithreading=true, lim_ZS=false, upwind_mode=false) where {T, N}

WENO5-Z scheme and work buffers for an N-dimensional field.

Arguments

  • c0: Supplies the array type and size; its values are not read.
  • boundary: Face conditions (ExtrapolateBC, PeriodicBC, or PrescribedInflowBC) as a tuple or AdvectionBC; defaults to extrapolation. Legacy codes 0/1 mean extrapolation and 2 means periodic.
  • form: :conservative (∂u/∂t + ∇·(v u) = 0) or :nonconservative (∂u/∂t + v·∇u = 0).
  • stag: Use face-centered velocities when true.
  • lim_ZS: Enable the Zhang-Shu limiter.
  • multithreading: Enable threading in 2D or 3D.
  • upwind_mode: Use the simple debugging upwind scheme.
source
FiniteDiffWENO5.WENOScheme — Method
WENOScheme(c0::AbstractArray{T,N}, topo::SerialTopology; geometry = :cell,
           boundary, form, stag = false, lim_ZS = false,
           multithreading = true, upwind_mode = false)

Build a padded single-rank scheme that uses the topology stage hooks.

source
FiniteDiffWENO5.WENO_step! — Method
WENO_step!(u::Tuple, args...; u_min::Tuple{Vararg{Real}}, u_max::Tuple{Vararg{Real}})

Advance multiple fields u = (c1, c2, ...) by one time step, all sharing the same velocity and WENOScheme buffers. Each field is advected sequentially with its own u_min/u_max bounds for the Zhang-Shu limiter.

This single method covers every dimensionality and backend (plain arrays, KernelAbstractions, Chmy.jl): it just forwards each field and the remaining positional arguments to the single-field WENO_step! method that matches at runtime, so it needs no per-dimension or per-backend duplicate.

source
FiniteDiffWENO5.WENO_step! — Method

CPU-only tuple overload that prepares one staggered material velocity for all fields, instead of re-running prepare_velocity! once per field.

Constrained to A <: Array rather than a bare u::Tuple: WENOScheme is the same struct for every backend (CPU, KernelAbstractions, Chmy), so an unconstrained method here would out-specificity the generic per-field forwarder in src/utils.jl for every backend, not just this one — silently reaching prepare_velocity!'s CPU-only scalar-indexing loop (eno5_face_to_center!'s for i in eachindex(...)) for GPU-backed schemes, which throws under GPUArrays.jl's allowscalar(false) (or runs pathologically slowly if allowed). Restricting to plain Array excludes every device array type (CuArray, ROCArray, ...) and Chmy's Field wrapper alike, letting those fall through to the generic forwarder, which dispatches each field to its own backend-correct single-field WENO_step! (and that backend's own device prepare_velocity_*! kernel) instead.

source
FiniteDiffWENO5.WENO_step! — Method
WENO_step!(phases, velocity, scheme::MultiphaseWENOScheme, Δt, Δx, Δy)

Advance a two-dimensional material composition with simultaneous WENO5-Z reconstruction and SSP-RK3. phases is updated in place and must initially satisfy the probability-simplex constraints. No u_min or u_max keywords are accepted.

source
FiniteDiffWENO5.WENO_step! — Method
WENO_step!(phases, velocity, scheme::MultiphaseWENOScheme, Δt, Δx, Δy, Δz)

Advance a three-dimensional material composition with simultaneous WENO5-Z reconstruction and SSP-RK3. phases is updated in place and must initially satisfy the probability-simplex constraints. No u_min or u_max keywords are accepted.

source
FiniteDiffWENO5.WENO_step! — Method
WENO_step!(phases::Tuple, v::NamedTuple{(:x,)}, scheme::MultiphaseWENOScheme, Δt, Δx)

Advance a phase vector by one time step with 3rd-order SSP Runge-Kutta and simultaneous WENO5-Z reconstruction in 1D.

Every phase is reconstructed from the same stage state before any phase advances, so all three stages see a consistent composition. The result stays inside the probability simplex — 0 ≤ ϕₖ ≤ 1 and Σₖϕₖ = 1 — under the same explicit CFL assumptions the scalar operator requires.

Arguments

  • phases::Tuple: the material fractions, updated in place. Must match the phase count the scheme was built with.
  • v: velocity, at cell faces when scheme.stag is true and cell centers otherwise.
  • scheme::MultiphaseWENOScheme: constants and per-phase buffers.
  • Δt, Δx: time step and grid spacing.

Unlike the scalar WENO_step!, this takes no u_min/u_max: the bounds are fixed at [0,1] by the simplex definition rather than supplied per field.

See also MultiphaseWENOScheme.

source
FiniteDiffWENO5.WENO_step! — Method
WENO_step!(u::T,
           v::NamedTuple{(:x, :y), <:Tuple{Vararg{AbstractArray{<:Real}, 2}}},
           weno::WENOScheme,
           Δt, Δx, Δy;
           u_min = 0.0, u_max = 1.0) where {T <: AbstractArray{<:Real, 2}}

Advance the solution u by one time step using the 3rd-order SSP Runge-Kutta method with WENO5-Z as the spatial discretization in 2D.

Arguments

  • u::T: Current solution array to be updated in place.
  • v::NamedTuple{(:x, :y), <:Tuple{Vararg{AbstractArray{<:Real}, 2}}}: Velocity array (can be staggered or not based on weno.stag).
  • weno::WENOScheme: WENO scheme structure containing necessary parameters and temporary arrays.
  • Δt: Time step size.
  • Δx: Spatial grid size in the x-direction.
  • Δy: Spatial grid size in the y-direction.
  • u_min: Minimum value of u for the Zhang-Shu positivity limiter.
  • u_max: Maximum value of u for the Zhang-Shu positivity limiter.

Citation: Borges et al. 2008: "An improved weighted essentially non-oscillatory scheme for hyperbolic conservation laws" doi:10.1016/j.jcp.2007.11.038

source
FiniteDiffWENO5.WENO_step! — Method
WENO_step!(u::T,
           v::NamedTuple{(:x, :y, :z), <:Tuple{Vararg{AbstractArray{<:Real}, 3}}},
           weno::WENOScheme,
           Δt, Δx, Δy, Δz;
           u_min = 0.0, u_max = 0.0) where T <: AbstractArray{<:Real, 3}

Advance the solution u by one time step using the 3rd-order SSP Runge-Kutta method with WENO5-Z as the spatial discretization in 3D.

Arguments

  • u::T: Current solution array to be updated in place.
  • v::NamedTuple{(:x, :y, :z), <:Tuple{Vararg{AbstractArray{<:Real}, 3}}}: Velocity fields in each direction, possibly staggered depending on weno.stag.
  • weno::WENOScheme: WENO scheme structure containing necessary parameters and temporary arrays.
  • Δt: Time step size.
  • Δx: Spatial grid size in the x-direction.
  • Δy: Spatial grid size in the y-direction.
  • Δz: Spatial grid size in the z-direction.
  • u_min: Minimum value of u for the Zhang-Shu positivity limiter.
  • u_max: Maximum value of u for the Zhang-Shu positivity limiter.

Citation: Borges et al. 2008: "An improved weighted essentially non-oscillatory scheme for hyperbolic conservation laws" doi:10.1016/j.jcp.2007.11.038

source
FiniteDiffWENO5.WENO_step! — Method
WENO_step!(u::T,
           v::NamedTuple{(:x,), <:Tuple{<:AbstractVector{<:Real}}},
           weno::WENOScheme,
           Δt, Δx;
           u_min = 0.0, u_max = 0.0) where T <: AbstractVector{<:Real}

Advance the solution u by one time step using the 3rd-order SSP Runge-Kutta method with WENO5-Z as the spatial discretization in 1D.

Arguments

  • u::T: Current solution array to be updated in place.
  • v::NamedTuple{(:x,), <:Tuple{<:AbstractVector{<:Real}}}: Velocity array (can be staggered or not based on weno.stag).
  • weno::WENOScheme: WENO scheme structure containing necessary parameters and temporary arrays.
  • Δt: Time step size.
  • Δx: Spatial grid size.
  • u_min: Minimum value of u for the Zhang-Shu positivity limiter.
  • u_max: Maximum value of u for the Zhang-Shu positivity limiter.

Citation: Borges et al. 2008: "An improved weighted essentially non-oscillatory scheme for hyperbolic conservation laws" doi:10.1016/j.jcp.2007.11.038

source
FiniteDiffWENO5._eno5_restriction — Method

Build the resolved-BC-aware restriction for one axis, or nothing when the axis is unpadded (every existing serial/KA/Chmy scheme) or when neither face is ExtrapolateBC/PrescribedInflowBC (a fully periodic or process-seam axis gets the full stencil, so no restriction object is needed at all).

source
FiniteDiffWENO5._fill_ghost_axis! — Method
_fill_ghost_axis!(a, d, pad, n_phys, owned_lo, owned_hi, lo_bc, hi_bc)

Fill every entry of a outside [owned_lo, owned_hi] along axis d. Low positions (< owned_lo) use lo_bc, high positions (> owned_hi) use hi_bc. ExtrapolateBC/PrescribedInflowBC clamp to the nearest owned edge; PeriodicBC wraps modulo n_phys cells starting at padded index pad + 1; ProcessBC is left untouched (its ghosts come from a halo exchange).

source
FiniteDiffWENO5._inflow_ranges — Method
_inflow_ranges(extent::PaddedExtent{N}, d, upper)

Index ranges for axis d's (upper ? high : low) face: d fixed to one index, every other axis spanning its owned entries.

source
FiniteDiffWENO5._interpolate_velocity! — Method

Interpolate face velocity into weno.vcenter using global and boundary stencil bounds. Callers supply distinct source and destination arrays. Shared by WENOScheme and MultiphaseWENOScheme, which expose the same fields.

source
FiniteDiffWENO5._prepare_velocity! — Method

Exchange face velocity before interpolation when stag = true. Conservative schemes then exchange centred velocity because reconstruction reads its ghosts; with stag = false, these are the caller's arrays. Check the vcenter identity first so repeated tuple-field calls do not repeat exchanges.

source
FiniteDiffWENO5._resolve_padded_extent — Method
_resolve_padded_extent(sizes, halo, boundary, caller)

Shared padded_weno_scheme/padded_multiphase_scheme preamble: validate boundary's face count/types and the owned extent, returning (faces, owned). caller names the public function in error messages.

source
FiniteDiffWENO5._tangential_offset — Method
_tangential_offset(I::CartesianIndex, extent::PaddedExtent{N}, d)

I's coordinates on every axis but d, each shifted to a 1-based owned-window offset — the argument order inflow_value/multiphase_inflow_value expect.

source
FiniteDiffWENO5._validate_phases — Method
MultiphaseWENOScheme(phases::Tuple; boundary=nothing, stag=false, multithreading=true)

WENO5-Z scheme for fractions satisfying 0 ≤ ϕₖ ≤ 1 and Σₖϕₖ = 1. Phases share reconstruction weights and a Zhang-Shu limiter coefficient so the sum is preserved. Use WENOScheme for unrelated fields.

Arguments

  • phases: At least two arrays with identical axes, element type, and concrete array type. Values are not read during construction.
  • boundary: Face conditions shared by all phases; defaults to extrapolation.
  • stag: Use face-centered velocities when true.
  • multithreading: Enable threading in 2D or 3D.

The simplex limiter is always enabled; upwind mode and custom bounds are not supported.

source
FiniteDiffWENO5._validate_topology_layout — Method
_validate_topology_layout(topo, N, sizes, geometry, stag, user_faces)

Validate boundaries, halo width, and field size for topology schemes. Return (resolved, halo, global_size, global_periodic).

source
FiniteDiffWENO5.allocate_weno_field — Method
allocate_weno_field(topo; T = Float64, geometry = :cell, stagger = nothing)

Allocate a zeroed padded field, with one extra entry along stagger. Vertex geometry requires stagger = nothing.

source
FiniteDiffWENO5.build_topology_weno_scheme — Method
build_topology_weno_scheme(c0, topo; geometry = :cell, boundary, form,
                            stag = false, lim_ZS = false,
                            multithreading = true, upwind_mode = false)

Build a padded scheme after validating boundaries and array size.

source
FiniteDiffWENO5.combined_weno_betas — Method
combined_weno_betas(stencils, χ)

Phase-averaged WENO smoothness indicators.

stencils is an NTuple{NP} of five-point stencils, one per phase, all sampled at the same positions. The arithmetic mean is symmetric under phase permutation and keeps the indicator magnitude independent of the phase count, so the WENO-Z τ and the ϵ floor behave as they do in the scalar scheme.

source
FiniteDiffWENO5.conservative_semi_discretisation_weno5! — Method
conservative_semi_discretisation_weno5!(du, u, vcell, weno, nx, ny, Δx_, Δy_)

Two-dimensional counterpart. Each direction is split independently with its own Lax-Friedrichs constant, as the directional fluxes are differenced independently.

source
FiniteDiffWENO5.conservative_semi_discretisation_weno5! — Method
conservative_semi_discretisation_weno5!(du, u, vcell, weno, nx, Δx_)

Evaluate ∂ₓ(v u) in 1D from a globally split point flux. vcell must be collocated with u; a face-staggered velocity is prepared by prepare_velocity! before this call.

source
FiniteDiffWENO5.eno5_face_to_center! — Method
eno5_face_to_center!(center, face; periodic)

Interpolate a normal velocity stored at cell faces to the corresponding scalar cell centres. In the periodic case, face[n+1], when present, is a duplicate and is ignored; logical face n+1 aliases face 1.

source
FiniteDiffWENO5.eno5_stencil_start — Method
eno5_stencil_start(face, I, direction, i, n, periodic, r::ENO5PhysicalRestriction)

Resolved-BC-aware variant of eno5_stencil_start: identical recurrence, restricted per ENO5PhysicalRestriction. A new method, not a replacement — the unrestricted 4-/6-argument methods above are used unchanged by every existing caller (including the KernelAbstractions kernels), which never carry padding.

source
FiniteDiffWENO5.face_to_center_direction! — Method

Interpolate one velocity component, choosing ENO5 when the direction is large enough for its stencil and the second-order average otherwise. The choice keys off global_cells/global_periodic (defaulting to size(center, direction)/periodic — today's behaviour), not the padded allocated extent: under padding size(center, direction) is the allocated size, so a thin global axis that serial interpolates linearly must not switch to ENO5 merely because padding made the allocated extent look big enough.

source
FiniteDiffWENO5.fill_physical_ghosts! — Method
fill_physical_ghosts!(v::NamedTuple, extent::PaddedExtent, boundary)

Face-staggered ghost fill for a velocity NamedTuple whose component at position direction (:x, :y, :z, ...) carries one extra entry on the high side of its own normal axis (direction). Every axis other than a component's own normal axis is filled exactly like the cell-centred case. Along its own normal axis, a periodic face treats the physical n_own + 1-th face as the duplicate of physical face 1 — written by the wrap, never read as independent data — matching how the serial ENO5 interpolation ignores face[n+1] under periodicity.

source
FiniteDiffWENO5.fill_physical_ghosts! — Method
fill_physical_ghosts!(a::AbstractArray, extent::PaddedExtent, boundary)

Cell-centred ghost fill: for each axis with nonzero pad, write the pad entries of a that the resolved boundary implies on that axis' two faces. a may be the advected field, ut, or a cell-centred (stag = false) velocity component — the fill never depends on what the array represents, only on the boundary kind, which is what makes it safe to reuse across all of them.

source
FiniteDiffWENO5.halo_buffers_for — Method
halo_buffers_for(topo, extent::PaddedExtent, stag::Bool, ::Type{T}) where T

Build a scheme's halo buffers. The default returns EmptyHaloBuffers(); MPI topologies override it with preallocated buffers.

source
FiniteDiffWENO5.limit_simplex — Method
limit_simplex(high, donor, θ)

Blend high toward donor with the single shared coefficient θ.

The expression is written as donor + θ*(high - donor) rather than a fused muladd, so the result is bitwise reproducible from the returned θ.

source
FiniteDiffWENO5.linear_face_to_center_direction! — Method

Second-order fallback for directions too small to carry the ENO5 stencil.

A grid with fewer cells than the stencil cannot support fifth-order interpolation at all, so the alternative to this fallback is refusing to run. The two bracketing faces average to the cell centre exactly for affine data, which is the best a three- or four-cell direction admits; order is limited by the grid, not by choice.

source
FiniteDiffWENO5.material_semi_discretisation_weno5! — Method
material_semi_discretisation_weno5!(du, vcenter, weno, Δx_)

Evaluate the scalar material operator v ∂u/∂x from WENO-reconstructed directional derivatives. vcenter.x must be collocated with du; a staggered input is first prepared by eno5_face_to_center! at the top-level caller.

source
FiniteDiffWENO5.multiphase_WENO_flux! — Method
multiphase_WENO_flux!(state, scheme, nx)

Reconstruct both one-sided face states for every phase from one shared set of WENO-Z weights per face state, then apply one common simplex limiter coefficient to each reconstructed composition.

The left face state uses stencil samples 1:5 and the right uses 2:6, exactly as the scalar WENO_flux!. Each derives its own shared weights from its own five samples. The limiter donors are the adjacent cell averages: the cell left of the face for fl, the cell right of it for fr, matching the scalar Zhang-Shu convention.

source
FiniteDiffWENO5.multiphase_inflow_value — Method
multiphase_inflow_value(bc, k, indices...)

Component k of a prescribed inflow composition at the given tangential indices. Scalar components ignore the indices; array components are indexed by them. Construction-time validation guarantees no other component kind reaches this function.

source
FiniteDiffWENO5.multiphase_reconstruction_upwind — Method
multiphase_reconstruction_upwind(stencils, χ, γ, ζ, ϵ)

Reconstruct every phase's upwind face state from one shared set of WENO-Z weights. Returns an NTuple{NP} whose components sum to one whenever the stencil values do.

source
FiniteDiffWENO5.normalize_boundary_faces — Method
normalize_boundary_faces(boundary, N)

Check faces and map legacy codes to typed boundaries without validating inflow values; scalar and multiphase validation share this step.

source
FiniteDiffWENO5.nphases — Method
nphases(scheme::MultiphaseWENOScheme)

Number of phases carried by scheme, available as a compile-time constant.

source
FiniteDiffWENO5.owned_window — Method
owned_window(a, topo; geometry = :cell, stagger = nothing)

A view of owned entries. A face-staggered array includes its extra high face only on a physical, nonperiodic high boundary.

source
FiniteDiffWENO5.padded_multiphase_scheme — Method
padded_multiphase_scheme(phases, halo; boundary, stag=false,
                          multithreading=true, global_size=nothing,
                          global_periodic=nothing, geometry=:cell,
                          topology=NoTopology())

Build a padded multiphase scheme from resolved boundaries, including ProcessBC. The topology constructor supplies the halo and extents.

source
FiniteDiffWENO5.padded_weno_scheme — Method
padded_weno_scheme(c0, halo; boundary, form, stag=false, lim_ZS=false,
                    multithreading=true, upwind_mode=false,
                    global_size=nothing, global_periodic=nothing,
                    geometry=:cell)

Build a padded scheme from a fully sized c0 and per-axis halo. boundary must already be resolved and may contain ProcessBC. Topology constructors supply the global extent and periodicity before calling this allocation helper.

source
FiniteDiffWENO5.prepare_velocity! — Method

Prepare face-staggered CPU velocity once for all multiphase RK stages. Dispatches on scheme.topology, mirroring the scalar prepare_velocity!. MultiphaseWENOScheme has no form field (material transport only), so there is no row 2 here — only row 1 (stag = true, exchange + refill the FACE velocity, then interpolate). With stag = false the guard order does not matter (there is nothing conditional on the form to protect), so this checks scheme.stag first, unlike the scalar topology method.

source
FiniteDiffWENO5.prepare_velocity! — Method

Prepare velocity once for all Runge–Kutta stages. Topology-backed schemes exchange face velocity before interpolation and conservative centred velocity afterward.

source
FiniteDiffWENO5.require_no_topology — Method
require_no_topology(scheme, label)

Reject a distributed topology for a backend that cannot exchange halos across ranks (GPU extensions run unpadded arrays only).

source
FiniteDiffWENO5.scalar_operator_1D! — Method
scalar_operator_1D!(du, state, vcell, weno, nx, Δx_, u_min, u_max)

Evaluate one spatial operator for state, selected by weno.form rather than by the velocity layout. vcell is already collocated with state.

The two branches need different face quantities, so each builds its own: the material form reconstructs the transported state u, while the conservative form reconstructs the split point fluxes f± = ½(vu ± αu) directly into the same fl/fr buffers.

source
FiniteDiffWENO5.shared_weights_upwind — Method
shared_weights_upwind(β1, β2, β3, γ, ϵ)

Normalised WENO-Z weights for the upwind (left) face state, built from indicators shared by every phase. Uses the same Borges et al. (2008) α formulation as the scalar scheme.

source
FiniteDiffWENO5.simplex_limiter_coefficient — Method
simplex_limiter_coefficient(high, donor)

Largest θ ∈ [0,1] such that donor + θ*(high - donor) has every component inside [0,1], given a donor that already lies in the simplex.

high is the unlimited high-order face state and donor the adjacent cell average. Returns one(T) when high is already admissible.

source
FiniteDiffWENO5.simplex_rk_stage — Method
simplex_rk_stage(initial, stage, du, a, b, Δt)

One SSP-RK3 sub-stage for a phase vector already on the simplex: stage is limited toward the forward-Euler candidate exactly as limit_simplex does for a face state (stage playing the role of donor, the candidate playing the role of high), then the SSP convex combination a*initial + b*limited is taken.

This is the single place the RK-stage limiter formula is computed; every dimension's WENO_step! (CPU and, via the mirrored GPU kernel, KA/Chmy) calls this instead of re-deriving θ by hand at each stage, so the clamp in simplex_limiter_coefficient protects every call site rather than only the ones that remembered to include it.

source
FiniteDiffWENO5.sync_stage! — Method
sync_stage!(scheme::MultiphaseWENOScheme, state)

Exchange and refill every phase before multiphase_WENO_flux! reads state. Topology providers may exchange the tuple as one operation.

source
FiniteDiffWENO5.sync_stage! — Method
sync_stage!(weno, a)

Exchange halo values and refill physical ghosts before the operator reads a. RK combinations write across the padded array, including its ghosts.

source
FiniteDiffWENO5.upwind_update_1D! — Method
upwind_update_1D!(u, v, weno, nx, Δx_, Δt)

Perform a single explicit upwind advection update on field u using velocity field v.

  • Conservative staggered transport uses the face velocity directly in its first-order face flux.
  • Material transport uses cell-centred velocity; a staggered input is prepared with ENO5 by WENO_step! before this function is called.
  • Uses the boundary conditions stored in weno.boundary.
source
FiniteDiffWENO5.validate_multiphase_boundary — Method
validate_multiphase_boundary(boundary, N, sizes, NP, T)

Normalize face conditions and validate any prescribed inflow compositions.

Uses normalize_boundary_faces rather than validate_boundary, because the latter also runs the scalar inflow validator, which rejects the tuple values that a multiphase inflow is made of.

source
FiniteDiffWENO5.validate_multiphase_inflow — Method
validate_multiphase_inflow(bc, expected_size, face, NP, T)

Validate one prescribed inflow composition. Every component must be finite and inside [0,1], and the composition must sum to one at every tangential point.

source
FiniteDiffWENO5.validate_scalar_options — Method
validate_scalar_options(form, stag, lim_ZS, upwind_mode)

The conservative (Lax-Friedrichs split-flux) path has no bound-preserving flux limiter yet, so lim_ZS=true combined with form=:conservative would silently do nothing — the option looks accepted but the limiting never happens. Reject that combination explicitly rather than letting a caller lose bound preservation without any signal that it happened.

source
FiniteDiffWENO5.weno_cartesian_topology — Method
weno_cartesian_topology(global_dims; comm, halo, dims, periodic)

Build the real MPI Cartesian topology. This is a stub in core. Its methods live in the MPI weak-dependency extension (ext/MPIExt.jl); calling it before using MPI throws naming the missing extension, the same pattern every AbstractWENOTopology accessor uses.

source
FiniteDiffWENO5.weno_cfl_dt — Method
weno_cfl_dt(topo, velocity::Union{Tuple, NamedTuple}, spacing, cfl; geometry = :cell, staggered = true)

Compute a global CFL timestep from component maxima over owned entries. Reduce all maxima together, then sum vmax[d] / spacing[d] in axis order. Set staggered = false for collocated components, including vertex fields.

source
FiniteDiffWENO5.weno_exchange_halo! — Method
weno_exchange_halo!(field, topo, buffers; geometry = :cell, stagger = nothing)

Fill ghost cells using reusable buffers. stagger = d selects a face field with an extra high-side entry; geometry = :vertex requires stagger = nothing. Topologies without exchange buffers may ignore buffers.

source
FiniteDiffWENO5.weno_exchange_halo! — Method
weno_exchange_halo!(fields::Tuple, topo, buffers; geometry = :cell, stagger = nothing)

Exchange each array using the single-array method. A topology may override this method to fuse messages.

source
FiniteDiffWENO5.weno_global_ranges — Method
weno_global_ranges(topo; geometry = :cell)

This rank's owned global indices per axis, NTuple{N,UnitRange{Int}}, from weno_global_offset and weno_owned_size.

source
FiniteDiffWENO5.weno_substeps — Method
weno_substeps(topo, duration, dt_cfl; debug = false)

Compute the substep count from a shared duration and collective CFL timestep. With debug = true, check agreement across ranks before advancing.

source