include/pops/numerics/spatial/primitives/positivity.hpp File ReferenceΒΆ

adc_cpp: include/pops/numerics/spatial/primitives/positivity.hpp File 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
positivity.hpp File Reference

Zhang-Shu positivity limiter and Density-role resolution. More...

+ Include dependency graph for positivity.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  pops
 
namespace  pops::detail
 

Functions

template<class Model >
POPS_HD void pops::zhang_shu_scale (typename Model::State &s, const ConstArray4 &u, int i, int j, Real floor, int pos_comp)
 zhang_shu_scale: POSITIVITY limiter on a reconstructed face state – LOCAL ORDER-1 FALLBACK (vacuum-robust variant of the Zhang & Shu scaling, JCP 2010).
 
template<class Model >
int pops::detail::positivity_comp (Real pos_floor)
 Component of the Density role for the positivity limiter (HOST, resolved once per spatial operator call, never per cell).
 

Detailed Description

Zhang-Shu positivity limiter and Density-role resolution.

CONTRACT: the OPT-IN positivity layer of the spatial operator. Inactive (bit-identical) unless pos_floor > 0.

  • zhang_shu_scale: order-1 local fallback when a reconstructed face state drops below floor.
  • positivity_comp: resolves the Density-role component once per operator call (HOST).

reconstruct_pp (reconstruction + this limiter) lives in face_flux.hpp, which depends on this module. POINTWISE device-clean (POPS_HD) for the limiter; positivity_comp is HOST-only.