Hydrodynamics
One-cell primitives. The caller owns the mesh and the time step.
Equations of state
Four closures. Energy is per reference volume.
vm_is ideal gaseos_ ideal vm_is stiffened gaseos_ stiffened vm_is Mie–Grüneiseneos_ mie vm_is JWLeos_ jwl
Each fills a vm_ with pressure, sound speed, and internal energy. A non-positive density returns false.
Cell primitives
vm_is the Newtonian stresshydro_ viscous σ = 2 μ D + λ (tr D) Ivm_is the von Neumann–Richtmyer artificial viscosityhydro_ q vm_is the face flux from left and right stateshydro_ rusanov vm_is the cell time-step limithydro_ cfl
Artificial viscosity is zero in expansion. Pure spin gives zero stress. Symmetric states give zero mass flux.
Projection
Incompressible step. Reuses the existing Laplacian and vm_.
vm_is the MAC divergenceproject_ residual vm_fills a caller-owned CSR with the variable-density operator. Constant density 1 matches the assembled grid Laplacian.project_ laplacian
SPH
Cubic spline and Wendland C2, both supported on r < 2 h and normalized so the integral is 1.
vm_andsph_ w vm_in 1, 2, or 3-Dsph_ dw vm_sums over a caller-supplied neighbor list. The self term is included. An empty list returns the self term only.sph_ density vm_is the symmetric pressure gradientsph_ pressure_ grad
There is no search structure. A caller bins with vm_ and an AABB.