File ppm.H
Functions
- AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int check_trace_source (amrex::Array4< amrex::Real const > const &srcQ, const int idir, const int i, const int j, const int k, const int ncomp)
- AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void ppm_reconstruct (const amrex::Real *s, const amrex::Real flatn, amrex::Real &sm, amrex::Real &sp)
Compute the coefficients of a parabolic reconstruction of the data in a zone. This uses the standard PPM limiters described in Colella & Woodward (1984)
- Parameters:
s – Real(\nslp) the state to be reconstructed in zones i-2, i-1, i, i+1, i+2
flatn – The flattening coefficient
sm – The value of the parabola on the left edge of the zone
sp – The value of the parabola on the right edge of the zone
- AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool ppm_reconstruct_pslope (const amrex::Real *rho, const amrex::Real *p, const amrex::Real *src, const amrex::Real flatn, const amrex::Real dx, amrex::Real &sm, amrex::Real &sp)
Compute the coefficients of a parabolic reconstruction of the pressure by first subtracting off the hydrostatic pressure. This should better balance the gravitational force by only limiting on the wave-generating pressure. This uses the standard PPM limiters described in Colella & Woodward (1984)
- Parameters:
rho – Real(\nslp) giving the density in zones i-2, i-1, i, i+1, i+2
p – Real(\nslp) giving the pressure in zones i-2, i-1, i, i+1, i+2
src – Real(\nslp) the source in the velocity equation (e.g. g) in zones i-2, i-1, i, i+2, i+2
flatn – flattening coefficient
lo_bc_test – true if a physical boundary is just to the left of this zone
hi_bc_test – true if a physical boundary is just to the right of this zone
sm – The value of the parabola on the left edge of the zone
sp – The value of the parabola on the right edge of the zone
- Returns:
a bool indicating whether HSE correction was done
- AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void ppm_int_profile (const amrex::Real sm, const amrex::Real sp, const amrex::Real sc, const amrex::Real u, const amrex::Real c, const amrex::Real dtdx, amrex::Real *Ip, amrex::Real *Im)
Integrate under the parabola using from the left and right edges with the wave speeds u-c, u, u+c
- Parameters:
sm – The parabola value on the left edge of the zone
sp – The parabola value on the right edge of the zone
sc – The state value at the zone center
u – The fluid velocity
c – The sound speed
dtdx – dt/dx (timestep / cell width)
Ip – Real(\3), the integrals under the parabola over the 3 waves from the right zone edge
Im – Real(\3), the integrals under the parabola over the 3 waves from the left zone edge
- AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void ppm_int_profile_single (const Real sm, const Real sp, const Real sc, const Real lam, const Real dtdx, Real &Ip, Real &Im)
Integrate under the parabola from the left and right edges for a single wave speed
- Parameters:
sm – The parabola value on the left edge of the zone
sp – The parabola value on the right edge of the zone
sc – The state value at the zone center
lam – The wave speed
dtdx – dt/dx (timestep / cell width)
Ip – integral under the parabola from the right zone edge
Im – integral under the parabola from the left zone edge