Central Divergence

The simplest scheme: fit the neighbour flux differences with MLS and take the divergence of the fit,

\[\nabla\cdot F(U_i) \approx \mathcal{D}_i^{(k)}\big[\, F(U_j) - F(U_i) \,\big]_{j \in \nu(i)},\]

where $\mathcal D^{(k)}_i$ is the degree-$k$ MLS divergence operator at particle $i$. The scheme has no numerical dissipation and is meant for smooth problems, convergence studies, and as a baseline. It works for systems of any size.

Construction

CentralDivergence(T, D, M, order; div_order = 0)
  • order ≥ 1 is the consistency order. The divergence uses Interpolator{D, order}.
  • div_order > 0 fixes the divergence degree to min(div_order, current order). With 0, it follows the particle's current order.

Behaviour

  • Stateless. update_size! and update_content! are no-ops; there is no pre-gather pass.
  • Starved neighbourhoods. The degree is lowered locally while the particle has fewer than $B(D, k)$ neighbours. If even degree 1 is impossible, the divergence is zero. This local lowering does not change particle_orders.
  • MOOD. The scheme reads particle_orders[i], so MOOD can lower its order. Its flux at $i$ does not depend on neighbours' orders (_order_reach = 0), so an order drop only requires recomputing the dropped particle itself.
  • Non-conservative terms. None are evaluated; use a Riemann-based scheme for PDEs with evaluate_nc_jump.

Reference

HyperCloudCore.CentralDivergence — Type
CentralDivergence{D, M, T, MAX_ORDER, DIV_ORDER, INTERPS} <: DivergenceInterpolator
CentralDivergence(::Type{T}, dimension::Int, M::Int, order::Int; div_order::Int=0)
(central::CentralDivergence)(eq, i, f_i, nb_slice, pg, ib)

Central divergence interpolator for evaluating flux derivatives in hyperbolic PDEs.

Constructors

CentralDivergence(::Type{T}, dimension::Int, M::Int, order::Int; div_order::Int=0)
  • T: The numeric type (e.g., Float64).
  • dimension: Spatial dimension.
  • M: Number of state components.
  • order: Maximum interpolation order (≥ 1).
  • div_order: Target order (defaults to 0, dynamic/highest particle order).

Callable / Functor

(central::CentralDivergence)(eq, i, f_i, nb_slice, pg, ib, strat) -> State{M, T}

Computes the divergence of the flux at particle i. Dynamically degrades the interpolation order if the particle has an insufficient number of neighbors.

Fields

  • interpolators: Pre-allocated tuple of Interpolator instances up to MAX_ORDER.
source