IsothermalFlux Struct ReferenceΒΆ
|
adc_cpp 0.3.0
Model-free C++23 core for coupled hyperbolic-elliptic systems on adaptive (AMR) meshes, with MPI and GPU (Kokkos) backends
|
ISOTHERMAL Euler flux (p = cs2 rho), 3 variables (rho, rho u, rho v). More...
#include <hyperbolic.hpp>
Inheritance diagram for pops::IsothermalFlux:
Collaboration diagram for pops::IsothermalFlux:Public Types | |
| using | State = StateVec< 3 > |
| conservative variables (rho, rho u, rho v) | |
| using | Prim = StateVec< 3 > |
| primitive variables (rho, u, v) | |
Public Member Functions | |
| POPS_HD Real | velocity_rho (Real rho) const |
| rho clamped from below by vacuum_floor for the velocity division ONLY. | |
| POPS_HD StateVec< 3 > | flux (const StateVec< 3 > &u, const Aux &, int dir) const |
| POPS_HD Prim | to_primitive (const StateVec< 3 > &u) const |
| Conservative -> primitive: (rho, rho u, rho v) -> (rho, u, v). | |
| POPS_HD StateVec< 3 > | to_conservative (const Prim &p) const |
| Primitive -> conservative: (rho, u, v) -> (rho, rho u, rho v). | |
| POPS_HD Real | max_wave_speed (const StateVec< 3 > &u, const Aux &, int dir) const |
| POPS_HD StateVec< 3 > | eigenvalues (const StateVec< 3 > &u, const Aux &, int dir) const |
| Full spectrum: (v_dir - c, v_dir, v_dir + c), c = sqrt(cs2). | |
| POPS_HD void | wave_speeds (const StateVec< 3 > &u, const Aux &, int dir, Real &smin, Real &smax) const |
| Signed speeds (HLL/HLLC): v_dir -+ c_s. | |
Static Public Member Functions | |
| static VariableSet | conservative_vars () |
| static VariableSet | primitive_vars () |
Public Attributes | |
| Real | cs2 = 1 |
| Real | vacuum_floor = 0 |
| Quasi-vacuum density floor (ADC-77). | |
Static Public Attributes | |
| static constexpr int | n_vars = 3 |
Detailed Description
ISOTHERMAL Euler flux (p = cs2 rho), 3 variables (rho, rho u, rho v).
3-variable HYPERBOLIC brick (density + momenta). Satisfies HyperbolicPhysicalModel. Isothermal closure law: p = cs2 * rho (no energy equation). CONTRACT: purely pointwise functions, device-callable (POPS_HD). No MultiFab, no allocation, no global access. Invariant: cs2 > 0 so that the wave speed sqrt(cs2) is real.
Member Typedef Documentation
◆ Prim
| using pops::IsothermalFlux::Prim = StateVec<3> |
primitive variables (rho, u, v)
◆ State
| using pops::IsothermalFlux::State = StateVec<3> |
conservative variables (rho, rho u, rho v)
Member Function Documentation
◆ conservative_vars()
|
inlinestatic |
◆ eigenvalues()
|
inline |
Full spectrum: (v_dir - c, v_dir, v_dir + c), c = sqrt(cs2).
Here is the call graph for this function:◆ flux()
|
inline |
Here is the call graph for this function:◆ max_wave_speed()
|
inline |
Here is the call graph for this function:◆ primitive_vars()
|
inlinestatic |
◆ to_conservative()
Primitive -> conservative: (rho, u, v) -> (rho, rho u, rho v).
◆ to_primitive()
Conservative -> primitive: (rho, rho u, rho v) -> (rho, u, v).
The velocity uses the quasi-vacuum floored density (velocity_rho); rho itself (p[0]) stays the raw conserved value.
Here is the call graph for this function:
Here is the caller graph for this function:◆ velocity_rho()
rho clamped from below by vacuum_floor for the velocity division ONLY.
Manual max (device-safe, no std:: in the kernel path). floor <= 0 -> returns rho unchanged (bit-identical).
Here is the caller graph for this function:◆ wave_speeds()
|
inline |
Signed speeds (HLL/HLLC): v_dir -+ c_s.
Here is the call graph for this function:Member Data Documentation
◆ cs2
| Real pops::IsothermalFlux::cs2 = 1 |
◆ n_vars
|
staticconstexpr |
◆ vacuum_floor
| Real pops::IsothermalFlux::vacuum_floor = 0 |
Quasi-vacuum density floor (ADC-77).
When > 0, the velocity is computed as u = m / max(rho, vacuum_floor) so it stays bounded where the rollup evacuates the background (rho -> ~0); this bounds BOTH the CFL wave speed and the advective flux in one place (max_wave_speed and flux both divide by rho here). Mass and momentum are NOT modified – only the velocity ESTIMATE is bounded, so the conservative state is untouched (unlike a cell density clamp). <= 0: inactive, and the raw 1/rho path is taken verbatim (bit-identical, including for rho <= 0).
The documentation for this struct was generated from the following file:
- include/pops/physics/bricks/hyperbolic.hpp
Generated by