zoomy_core.fvm.reconstruction module#
FVM face reconstruction and diffusion operators.
Reconstruction classes#
All reconstruction classes share the same interface: recon(Q) → (Q_L, Q_R).
The solver calls this once per flux evaluation — no if-clauses in the flux loop.
ConstantReconstruction: 1st-order piecewise-constant (identity).MUSCLReconstruction: 2nd-order piecewise-linear with slope limiting (Barth-Jespersen or Venkatakrishnan).FreeSurfaceMUSCL: MUSCL with wet-dry fallback and h-positivity.
Diffusion operators#
FaceGradient: corrected face-normal gradient for diffusion.DiffusionOperator: sparse discrete Laplacian (explicit + implicit).
- class zoomy_core.fvm.reconstruction.PrimitiveReconstruction(base, forward_fn, inverse_fn)#
Bases:
objectWraps a base ghost-cell-free reconstruction with pre/post transforms to the model’s primitive well-balanced variables.
Pre (per cell):
state_cell → wb_cellviaforward_fn. Limit (per cell): base reconstruction on the WB cell values. Post (per face):wb_face → state_faceviainverse_fn.The point of the WB transform is to limit the physically bounded quantities (
η = h+b,u = q/h, …) instead of the conservative state, killing momentum overshoot at the wet/dry front (Audusse-Bouchut-Bristeau and follow-ups; seethesis/chapters/30_numerics.md). The smooth-limiter choice (Venkatakrishnan, Van Albada) becomes harmless because overshoots happen onη(nearly flat near LAR) andu(physically bounded), and the recoveredq_face = h_face · u_faceis positivity-consistent by construction.forward_fnandinverse_fnare lambdified callablesf(Q) → wbandg(WB) → Q(vectorised across cells / faces by the caller; this class iterates explicitly to keep the interface model-agnostic).