8#ifndef HYDRO_GODUNOV_PPM_H
9#define HYDRO_GODUNOV_PPM_H
28 if (!(dsp * dsm < 0.0)) {
30 if (std::abs(dsp) < std::abs(dsm)) {
145 return (dsl*dsr > small_qty_sq) ?
246 const amrex::Real t5 = amrex::Math::abs(beta3 - beta1);
251 const amrex::Real omega = omega1 + omega2 + omega3;
257 return (omega1 * v_1 + omega2 * v_2 + omega3 * v_3) / (
amrex::Real(6.0) * omega);
268 return sedge2(sp2,sp1,s0,sm1,sm2);
314 const amrex::Real omega = omega1 + omega2 + omega3;
320 return (omega1 * v_1 + omega2 * v_2 + omega3 * v_3) / (
amrex::Real(6.0) * omega);
331 return sedge2(sp2,sp1,s0,sm1,sm2);
416template <
typename Limiter>
418void SetXBCs (
const int i,
const int j,
const int k,
const int n,
423 const int bclo,
const int bchi,
424 const int domlo,
const int domhi)
426 using namespace amrex;
428 if ( (bclo == BCType::ext_dir) || (bclo == BCType::hoextrap) ||
429 (bclo == BCType::direction_dependent && velp >= 0.0) )
435 if constexpr (Limiter::do_limiting) {
440 sm = s(domlo-1,j,k,n);
443 }
else if (i == domlo+1) {
447 if constexpr (Limiter::do_limiting) {
455 if constexpr (Limiter::do_limiting) {
456 if ( (sp - s(domlo+1,j,k,n))*(s(domlo+1,j,k,n) - sm) <=
amrex::Real(0.0))
458 sp = s(domlo+1,j,k,n);
459 sm = s(domlo+1,j,k,n);
460 }
else if(amrex::Math::abs(sp - s(domlo+1,j,k,n)) >=
amrex::Real(2.0)*amrex::Math::abs(sm - s(domlo+1,j,k,n))) {
462 }
else if(amrex::Math::abs(sm - s(domlo+1,j,k,n)) >=
amrex::Real(2.0)*amrex::Math::abs(sp - s(domlo+1,j,k,n))) {
469 if ( (bchi == BCType::ext_dir) || (bchi == BCType::hoextrap) ||
470 (bchi == BCType::direction_dependent && velm <= 0.0) )
476 if constexpr (Limiter::do_limiting) {
481 sp = s(domhi+1,j,k,n);
484 }
else if (i == domhi-1) {
488 if constexpr (Limiter::do_limiting) {
496 if constexpr (Limiter::do_limiting) {
497 if( (sp - s(domhi-1,j,k,n))*(s(domhi-1,j,k,n) - sm) <=
amrex::Real(0.0))
499 sp = s(domhi-1,j,k,n);
500 sm = s(domhi-1,j,k,n);
501 }
else if(amrex::Math::abs(sp - s(domhi-1,j,k,n)) >= 2.*amrex::Math::abs(sm - s(domhi-1,j,k,n))) {
503 }
else if(amrex::Math::abs(sm - s(domhi-1,j,k,n)) >= 2.*amrex::Math::abs(sp - s(domhi-1,j,k,n))) {
511template <
typename Limiter>
513void SetYBCs (
const int i,
const int j,
const int k,
const int n,
518 const int bclo,
const int bchi,
519 const int domlo,
const int domhi)
521 using namespace amrex;
523 if ( (bclo == BCType::ext_dir) || (bclo == BCType::hoextrap) ||
524 (bclo == BCType::direction_dependent && velm >= 0.0) )
530 if constexpr (Limiter::do_limiting) {
535 sm = s(i,domlo-1,k,n);
538 }
else if (j == domlo+1) {
542 if constexpr (Limiter::do_limiting) {
550 if constexpr (Limiter::do_limiting) {
551 if ( (sp - s(i,domlo+1,k,n))*(s(i,domlo+1,k,n) - sm) <=
amrex::Real(0.0))
553 sp = s(i,domlo+1,k,n);
554 sm = s(i,domlo+1,k,n);
555 }
else if(amrex::Math::abs(sp - s(i,domlo+1,k,n)) >=
amrex::Real(2.0)*amrex::Math::abs(sm - s(i,domlo+1,k,n))) {
557 }
else if(amrex::Math::abs(sm - s(i,domlo+1,k,n)) >=
amrex::Real(2.0)*amrex::Math::abs(sp - s(i,domlo+1,k,n))) {
564 if ( (bchi == BCType::ext_dir) || (bchi == BCType::hoextrap) ||
565 (bchi == BCType::direction_dependent && velp <= 0.0) )
571 if constexpr (Limiter::do_limiting) {
576 sp = s(i,domhi+1,k, n);
579 }
else if (j == domhi-1) {
583 if constexpr (Limiter::do_limiting) {
591 if constexpr (Limiter::do_limiting) {
592 if( (sp - s(i,domhi-1,k,n))*(s(i,domhi-1,k,n) - sm) <=
amrex::Real(0.0)){
593 sp = s(i,domhi-1,k,n);
594 sm = s(i,domhi-1,k,n);
595 }
else if(amrex::Math::abs(sp - s(i,domhi-1,k,n)) >= 2.*amrex::Math::abs(sm - s(i,domhi-1,k,n))) {
597 }
else if(amrex::Math::abs(sm - s(i,domhi-1,k,n)) >= 2.*amrex::Math::abs(sp - s(i,domhi-1,k,n))) {
605#if (AMREX_SPACEDIM==3)
606template <
typename Limiter>
608void SetZBCs (
const int i,
const int j,
const int k,
const int n,
613 const int bclo,
const int bchi,
614 const int domlo,
const int domhi)
616 using namespace amrex;
618 if ( (bclo == BCType::ext_dir) || (bclo == BCType::hoextrap) ||
619 (bclo == BCType::direction_dependent && velm >= 0.0) )
625 if constexpr (Limiter::do_limiting) {
630 sm = s(i,j,domlo-1,n);
633 }
else if (k == domlo+1) {
637 if constexpr (Limiter::do_limiting) {
645 if constexpr (Limiter::do_limiting) {
646 if ( (sp - s(i,j,domlo+1,n))*(s(i,j,domlo+1,n) - sm) <= 0. )
648 sp = s(i,j,domlo+1,n);
649 sm = s(i,j,domlo+1,n);
650 }
else if(amrex::Math::abs(sp - s(i,j,domlo+1,n)) >= 2.*amrex::Math::abs(sm - s(i,j,domlo+1,n))) {
652 }
else if(amrex::Math::abs(sm - s(i,j,domlo+1,n)) >= 2.*amrex::Math::abs(sp - s(i,j,domlo+1,n))) {
659 if ( (bchi == BCType::ext_dir) || (bchi == BCType::hoextrap) ||
660 (bchi == BCType::direction_dependent && velp <= 0.0) )
666 if constexpr (Limiter::do_limiting) {
671 sp = s(i,j,domhi+1,n);
674 }
else if (k == domhi-1) {
678 if constexpr (Limiter::do_limiting) {
686 if constexpr (Limiter::do_limiting) {
687 if ( (sp - s(i,j,domhi-1,n))*(s(i,j,domhi-1,n) - sm) <= 0. )
689 sp = s(i,j,domhi-1,n);
690 sm = s(i,j,domhi-1,n);
691 }
else if(amrex::Math::abs(sp - s(i,j,domhi-1,n)) >= 2.*amrex::Math::abs(sm - s(i,j,domhi-1,n))) {
693 }
else if(amrex::Math::abs(sm - s(i,j,domhi-1,n)) >= 2.*amrex::Math::abs(sp - s(i,j,domhi-1,n))) {
707template <
typename Limiter>
714 const amrex::BCRec bc,
const int domlo,
const int domhi,
727 amrex::Real sedge1 = Limiter::sedge1(sm2,sm1,s0,sp1,sp2);
728 amrex::Real sedge2 = Limiter::sedge2(sm2,sm1,s0,sp1,sp2);
730 auto [sm, sp] = Limiter::sm_sp(s0, sedge1, sedge2);
732 SetXBCs<Limiter>(i, j, k, n, sm, sp, sedge1, sedge2, S, v_ad, v_ad,
733 bc.
lo(0), bc.
hi(0), domlo, domhi);
737 const amrex::Real sigma = amrex::Math::abs(v_ad)*dtdx;
741 Ip(i,j,k,n) = sp - (half*sigma)*((sp-sm) - (one - two3rds*sigma)*s6);
742 Im(i,j,k,n) = S(i,j,k,n);
746 Ip(i,j,k,n) = S(i,j,k,n);
747 Im(i,j,k,n) = sm + (half*sigma)*((sp-sm) + (one - two3rds*sigma)*s6);
750 Ip(i,j,k,n) = S(i,j,k,n);
751 Im(i,j,k,n) = S(i,j,k,n);
755template <
typename Limiter>
762 const amrex::BCRec bc,
const int domlo,
const int domhi,
775 amrex::Real sedge1 = Limiter::sedge1(sm2,sm1,s0,sp1,sp2);
776 amrex::Real sedge2 = Limiter::sedge2(sm2,sm1,s0,sp1,sp2);
778 auto [sm, sp] = Limiter::sm_sp(s0, sedge1, sedge2);
780 SetYBCs<Limiter>(i, j, k, n, sm, sp, sedge1, sedge2, S, v_ad, v_ad,
781 bc.
lo(1), bc.
hi(1), domlo, domhi);
785 const amrex::Real sigma = amrex::Math::abs(v_ad)*dtdy;
789 Ip(i,j,k,n) = sp - (half*sigma)*((sp-sm) - (one - two3rds*sigma)*s6);
790 Im(i,j,k,n) = S(i,j,k,n);
794 Ip(i,j,k,n) = S(i,j,k,n);
795 Im(i,j,k,n) = sm + (half*sigma)*((sp-sm) + (one - two3rds*sigma)*s6);
798 Ip(i,j,k,n) = S(i,j,k,n);
799 Im(i,j,k,n) = S(i,j,k,n);
803#if (AMREX_SPACEDIM==3)
804template <
typename Limiter>
806void PredictVelOnZFace (
const int i,
const int j,
const int k,
const int n,
811 const amrex::BCRec bc,
const int domlo,
const int domhi,
824 amrex::Real sedge1 = Limiter::sedge1(sm2,sm1,s0,sp1,sp2);
825 amrex::Real sedge2 = Limiter::sedge2(sm2,sm1,s0,sp1,sp2);
827 auto [sm, sp] = Limiter::sm_sp(s0, sedge1, sedge2);
829 SetZBCs<Limiter>(i, j, k, n, sm, sp, sedge1, sedge2, S, v_ad, v_ad,
830 bc.
lo(2), bc.
hi(2), domlo, domhi);
834 const amrex::Real sigma = amrex::Math::abs(v_ad)*dtdz;
838 Ip(i,j,k,n) = sp - (half*sigma)*((sp-sm) - (one - two3rds*sigma)*s6);
839 Im(i,j,k,n) = S(i,j,k,n);
843 Ip(i,j,k,n) = S(i,j,k,n);
844 Im(i,j,k,n) = sm + (half*sigma)*((sp-sm) + (one - two3rds*sigma)*s6);
847 Ip(i,j,k,n) = S(i,j,k,n);
848 Im(i,j,k,n) = S(i,j,k,n);
857template <
typename Limiter>
865 const int domlo,
const int domhi,
876 const amrex::Real sigmap = amrex::Math::abs(vel_edge(i+1,j,k))*dt/dx;
877 const amrex::Real sigmam = amrex::Math::abs(vel_edge(i ,j,k))*dt/dx;
884 amrex::Real sedge1 = Limiter::sedge1(sm2,sm1,s0,sp1,sp2);
885 amrex::Real sedge2 = Limiter::sedge2(sm2,sm1,s0,sp1,sp2);
887 auto [sm, sp] = Limiter::sm_sp(s0, sedge1, sedge2);
889 SetXBCs<Limiter>(i, j, k, n, sm, sp, sedge1, sedge2, S, vel_edge(i,j,k), vel_edge(i,j,k),
890 bc.
lo(0), bc.
hi(0), domlo, domhi);
895 Ip = sp - (half*sigmap)*((sp - sm) - (one -two3rds*sigmap)*s6);
901 Im = sm + (half*sigmam)*((sp-sm) + (one - two3rds*sigmam)*s6);
915 const int ,
const int ,
932 const int domlo,
const int domhi,
943 const amrex::Real sigmap = amrex::Math::abs(vel_edge(i+1,j,k))*dt/dx;
944 const amrex::Real sigmam = amrex::Math::abs(vel_edge(i ,j,k))*dt/dx;
953 Ip = s0 + half * (one - sigmap) * dsp;
959 Im = s0 - half * (one - sigmam) * dsm;
965template <
typename Limiter>
973 const int domlo,
const int domhi,
984 const amrex::Real sigmap = amrex::Math::abs(vel_edge(i,j+1,k))*dt/dx;
985 const amrex::Real sigmam = amrex::Math::abs(vel_edge(i,j ,k))*dt/dx;
992 amrex::Real sedge1 = Limiter::sedge1(sm2,sm1,s0,sp1,sp2);
993 amrex::Real sedge2 = Limiter::sedge2(sm2,sm1,s0,sp1,sp2);
995 auto [sm, sp] = Limiter::sm_sp(s0, sedge1, sedge2);
997 SetYBCs<Limiter>(i, j, k, n, sm, sp, sedge1, sedge2, S, vel_edge(i,j,k), vel_edge(i,j,k),
998 bc.
lo(1), bc.
hi(1), domlo, domhi);
1003 Ip = sp - (half*sigmap)*((sp - sm) - (one -two3rds*sigmap)*s6);
1009 Im = sm + (half*sigmam)*((sp-sm) + (one - two3rds*sigmam)*s6);
1024 const int ,
const int ,
1041 const int domlo,
const int domhi,
1052 const amrex::Real sigmap = amrex::Math::abs(vel_edge(i,j+1,k))*dt/dx;
1053 const amrex::Real sigmam = amrex::Math::abs(vel_edge(i,j ,k))*dt/dx;
1062 Ip = s0 + half * (one - sigmap) * dsp;
1067 Im = s0 - half * (one - sigmam) * dsm;
1074#if (AMREX_SPACEDIM==3)
1075template <
typename Limiter>
1077void PredictStateOnZFace (
const int i,
const int j,
const int k,
const int n,
1083 const int domlo,
const int domhi,
1093 const amrex::Real sigmap = amrex::Math::abs(vel_edge(i,j,k+1))*dt/dx;
1094 const amrex::Real sigmam = amrex::Math::abs(vel_edge(i,j,k ))*dt/dx;
1101 amrex::Real sedge1 = Limiter::sedge1(sm2,sm1,s0,sp1,sp2);
1102 amrex::Real sedge2 = Limiter::sedge2(sm2,sm1,s0,sp1,sp2);
1104 auto [sm, sp] = Limiter::sm_sp(s0, sedge1, sedge2);
1106 SetZBCs<Limiter>(i, j, k, n, sm, sp, sedge1, sedge2, S, vel_edge(i,j,k), vel_edge(i,j,k),
1107 bc.
lo(2), bc.
hi(2), domlo, domhi);
1112 Ip = sp - (half*sigmap)*((sp-sm) - (
amrex::Real(1.0) -two3rds*sigmap)*s6);
1118 Im = sm + (half*sigmam)*((sp-sm) + (
amrex::Real(1.0) - two3rds*sigmam)*s6);
1126void PredictStateOnZFace<PPM::upwind> (
const int i,
const int j,
const int k,
const int n,
1132 const int ,
const int ,
1142void PredictStateOnZFace<PPM::minmod> (
const int i,
const int j,
const int k,
const int n,
1148 const int domlo,
const int domhi,
1159 const amrex::Real sigmap = amrex::Math::abs(vel_edge(i,j,k+1))*dt/dx;
1160 const amrex::Real sigmam = amrex::Math::abs(vel_edge(i,j,k ))*dt/dx;
1168 if (vel_edge(i, j, k + 1) >
small_vel) {
1169 Ip = s0 + half * (one - sigmap) * dsp;
1175 Im = s0 - half * (one - sigmam) * dsm;
1182template <
typename Limiter>
1195 const Limiter& limiter)
1209 PredictVelOnXFace(i,j,k,n,l_dtdx,vel(i,j,k,0),q,Imx,Ipx,pbc[n],dlo.
x,dhi.
x,limiter);
1210 PredictVelOnYFace(i,j,k,n,l_dtdy,vel(i,j,k,1),q,Imy,Ipy,pbc[n],dlo.
y,dhi.
y,limiter);
1211#if (AMREX_SPACEDIM==3)
1212 PredictVelOnZFace(i,j,k,n,l_dtdz,vel(i,j,k,2),q,Imz,Ipz,pbc[n],dlo.
z,dhi.
z,limiter);
1217template <
typename Limiter>
1233 const Limiter& limiter,
1242 const auto dz = geom.
CellSize(2););
1247 PPM::PredictStateOnXFace(i, j, k, n, l_dt, dx, Imx(i,j,k,n), Ipx(i,j,k,n),
1248 q, umac, pbc[n], dlo.
x, dhi.
x, limiter, limiter_type);
1249 PPM::PredictStateOnYFace(i, j, k, n, l_dt, dy, Imy(i,j,k,n), Ipy(i,j,k,n),
1250 q, vmac, pbc[n], dlo.
y, dhi.
y, limiter, limiter_type);
1251#if (AMREX_SPACEDIM==3)
1252 PPM::PredictStateOnZFace(i, j, k, n, l_dt, dz, Imz(i,j,k,n), Ipz(i,j,k,n),
1253 q, wmac, pbc[n], dlo.
z, dhi.
z, limiter, limiter_type);
#define AMREX_FORCE_INLINE
#define AMREX_GPU_HOST_DEVICE
#define AMREX_D_TERM(a, b, c)
#define AMREX_D_DECL(a, b, c)
__host__ __device__ const int * hi() const &noexcept
__host__ __device__ const int * lo() const &noexcept
const Real * CellSize() const noexcept
GpuArray< Real, 3 > CellSizeArray() const noexcept
const Box & Domain() const noexcept
constexpr amrex::Real eps
Definition hydro_bds_edge_state_2D.cpp:13
static constexpr amrex::Real small_vel
Definition hydro_constants.H:37
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void Godunov_minmod_bc_lo(const int n, const amrex::Real sm1, const amrex::Real s0, const amrex::Real vel_edge, amrex::Real &dsm, const int bclo, const int domlo)
Definition hydro_godunov_ppm.H:44
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void minmod_fn(const amrex::Real sm1, const amrex::Real s0, const amrex::Real sp1, amrex::Real &dsm, amrex::Real &dsp)
Definition hydro_godunov_ppm.H:18
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void Godunov_minmod_bc_hi(const int n, const amrex::Real s0, const amrex::Real sp1, const amrex::Real vel_edge, amrex::Real &dsp, const int bchi, const int domhi)
Definition hydro_godunov_ppm.H:64
Definition hydro_godunov_ppm.H:82
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void PredictVelOnYFace(const int i, const int j, const int k, const int n, const amrex::Real dtdy, const amrex::Real v_ad, const amrex::Array4< const amrex::Real > &S, const amrex::Array4< amrex::Real > &Im, const amrex::Array4< amrex::Real > &Ip, const amrex::BCRec bc, const int domlo, const int domhi, const Limiter &)
Definition hydro_godunov_ppm.H:757
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void PredictStateOnXFace(const int i, const int j, const int k, const int n, const amrex::Real dt, const amrex::Real dx, amrex::Real &Im, amrex::Real &Ip, const amrex::Array4< const amrex::Real > &S, const amrex::Array4< const amrex::Real > &vel_edge, const amrex::BCRec bc, const int domlo, const int domhi, const Limiter &, int)
Definition hydro_godunov_ppm.H:859
static constexpr int default_limiter
Definition hydro_godunov_ppm.H:86
void PredictStateOnFaces(amrex::Box const &bx, AMREX_D_DECL(amrex::Array4< amrex::Real > const &Imx, amrex::Array4< amrex::Real > const &Imy, amrex::Array4< amrex::Real > const &Imz), AMREX_D_DECL(amrex::Array4< amrex::Real > const &Ipx, amrex::Array4< amrex::Real > const &Ipy, amrex::Array4< amrex::Real > const &Ipz), AMREX_D_DECL(amrex::Array4< amrex::Real const > const &umac, amrex::Array4< amrex::Real const > const &vmac, amrex::Array4< amrex::Real const > const &wmac), amrex::Array4< amrex::Real const > const &q, amrex::Geometry geom, amrex::Real l_dt, amrex::BCRec const *pbc, const int ncomp, const Limiter &limiter, int limiter_type)
Definition hydro_godunov_ppm.H:1218
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void PredictStateOnXFace< PPM::minmod >(const int i, const int j, const int k, const int n, const amrex::Real dt, const amrex::Real dx, amrex::Real &Im, amrex::Real &Ip, const amrex::Array4< const amrex::Real > &S, const amrex::Array4< const amrex::Real > &vel_edge, const amrex::BCRec bc, const int domlo, const int domhi, const PPM::minmod &, int)
Definition hydro_godunov_ppm.H:926
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void SetXBCs(const int i, const int j, const int k, const int n, amrex::Real &sm, amrex::Real &sp, amrex::Real &sedge1, amrex::Real &sedge2, const amrex::Array4< const amrex::Real > &s, const amrex::Real velm, const amrex::Real velp, const int bclo, const int bchi, const int domlo, const int domhi)
Definition hydro_godunov_ppm.H:418
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void PredictStateOnXFace< PPM::upwind >(const int i, const int j, const int k, const int n, const amrex::Real, const amrex::Real, amrex::Real &Im, amrex::Real &Ip, const amrex::Array4< const amrex::Real > &S, const amrex::Array4< const amrex::Real > &, const amrex::BCRec, const int, const int, const PPM::upwind &, int)
Definition hydro_godunov_ppm.H:909
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void PredictStateOnYFace(const int i, const int j, const int k, const int n, const amrex::Real dt, const amrex::Real dx, amrex::Real &Im, amrex::Real &Ip, const amrex::Array4< const amrex::Real > &S, const amrex::Array4< const amrex::Real > &vel_edge, const amrex::BCRec bc, const int domlo, const int domhi, const Limiter &, int)
Definition hydro_godunov_ppm.H:967
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void PredictStateOnYFace< PPM::minmod >(const int i, const int j, const int k, const int n, const amrex::Real dt, const amrex::Real dx, amrex::Real &Im, amrex::Real &Ip, const amrex::Array4< const amrex::Real > &S, const amrex::Array4< const amrex::Real > &vel_edge, const amrex::BCRec bc, const int domlo, const int domhi, const PPM::minmod &, int)
Definition hydro_godunov_ppm.H:1035
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void SetYBCs(const int i, const int j, const int k, const int n, amrex::Real &sm, amrex::Real &sp, amrex::Real &sedge1, amrex::Real &sedge2, const amrex::Array4< const amrex::Real > &s, const amrex::Real velm, const amrex::Real velp, const int bclo, const int bchi, const int domlo, const int domhi)
Definition hydro_godunov_ppm.H:513
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void PredictVelOnXFace(const int i, const int j, const int k, const int n, const amrex::Real dtdx, const amrex::Real v_ad, const amrex::Array4< const amrex::Real > &S, const amrex::Array4< amrex::Real > &Im, const amrex::Array4< amrex::Real > &Ip, const amrex::BCRec bc, const int domlo, const int domhi, const Limiter &)
Definition hydro_godunov_ppm.H:709
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void PredictStateOnYFace< PPM::upwind >(const int i, const int j, const int k, const int n, const amrex::Real, const amrex::Real, amrex::Real &Im, amrex::Real &Ip, const amrex::Array4< const amrex::Real > &S, const amrex::Array4< const amrex::Real > &, const amrex::BCRec, const int, const int, const PPM::upwind &, int)
Definition hydro_godunov_ppm.H:1018
void PredictVelOnFaces(amrex::Box const &bx, AMREX_D_DECL(amrex::Array4< amrex::Real > const &Imx, amrex::Array4< amrex::Real > const &Imy, amrex::Array4< amrex::Real > const &Imz), AMREX_D_DECL(amrex::Array4< amrex::Real > const &Ipx, amrex::Array4< amrex::Real > const &Ipy, amrex::Array4< amrex::Real > const &Ipz), amrex::Array4< amrex::Real const > const &q, amrex::Array4< amrex::Real const > const &vel, amrex::Geometry geom, amrex::Real dt, amrex::BCRec const *pbc, const Limiter &limiter)
Definition hydro_godunov_ppm.H:1183
limiters
Definition hydro_godunov_ppm.H:84
@ MINMOD
Definition hydro_godunov_ppm.H:84
@ VanLeer
Definition hydro_godunov_ppm.H:84
@ WENOZ
Definition hydro_godunov_ppm.H:84
@ WENO_JS
Definition hydro_godunov_ppm.H:84
@ NoLimiter
Definition hydro_godunov_ppm.H:84
@ UPWIND
Definition hydro_godunov_ppm.H:84
__host__ __device__ Dim3 ubound(Array4< T > const &a) noexcept
__host__ __device__ constexpr GpuTuple< detail::tuple_decay_t< Ts >... > makeTuple(Ts &&... args)
std::enable_if_t< std::is_integral_v< T > > ParallelFor(TypeList< CTOs... > ctos, std::array< int, sizeof...(CTOs)> const &runtime_options, T N, F &&f)
__host__ __device__ constexpr const T & min(const T &a, const T &b) noexcept
__host__ __device__ constexpr const T & max(const T &a, const T &b) noexcept
__host__ __device__ Dim3 lbound(Array4< T > const &a) noexcept
Definition hydro_godunov_ppm.H:380
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::GpuTuple< amrex::Real, amrex::Real > sm_sp(const amrex::Real, const amrex::Real sedge1, const amrex::Real sedge2)
Definition hydro_godunov_ppm.H:408
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real sedge1(const amrex::Real, const amrex::Real, const amrex::Real, const amrex::Real, const amrex::Real)
Definition hydro_godunov_ppm.H:386
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real sedge2(const amrex::Real, const amrex::Real, const amrex::Real, const amrex::Real, const amrex::Real)
Definition hydro_godunov_ppm.H:397
static constexpr bool do_limiting
Definition hydro_godunov_ppm.H:382
Definition hydro_godunov_ppm.H:88
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::GpuTuple< amrex::Real, amrex::Real > sm_sp(const amrex::Real, const amrex::Real sedge1, const amrex::Real sedge2)
Definition hydro_godunov_ppm.H:125
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real sedge2(const amrex::Real, const amrex::Real sm1, const amrex::Real s0, const amrex::Real sp1, const amrex::Real sp2)
Definition hydro_godunov_ppm.H:110
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real sedge1(const amrex::Real sm2, const amrex::Real sm1, const amrex::Real s0, const amrex::Real sp1, const amrex::Real)
Definition hydro_godunov_ppm.H:94
static constexpr bool do_limiting
Definition hydro_godunov_ppm.H:90
Definition hydro_godunov_ppm.H:344
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real sedge1(const amrex::Real, const amrex::Real, const amrex::Real, const amrex::Real, const amrex::Real)
Definition hydro_godunov_ppm.H:350
static constexpr bool do_limiting
Definition hydro_godunov_ppm.H:346
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::GpuTuple< amrex::Real, amrex::Real > sm_sp(const amrex::Real, const amrex::Real sedge1, const amrex::Real sedge2)
Definition hydro_godunov_ppm.H:372
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real sedge2(const amrex::Real, const amrex::Real, const amrex::Real, const amrex::Real, const amrex::Real)
Definition hydro_godunov_ppm.H:361
Definition hydro_godunov_ppm.H:133
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::GpuTuple< amrex::Real, amrex::Real > sm_sp(const amrex::Real s0, const amrex::Real sedge1, const amrex::Real sedge2)
Definition hydro_godunov_ppm.H:187
static constexpr bool do_limiting
Definition hydro_godunov_ppm.H:135
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real sedge2(const amrex::Real, const amrex::Real sm1, const amrex::Real s0, const amrex::Real sp1, const amrex::Real sp2)
Definition hydro_godunov_ppm.H:169
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real vanLeer(const amrex::Real a, const amrex::Real b, const amrex::Real c)
Definition hydro_godunov_ppm.H:138
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real sedge1(const amrex::Real sm2, const amrex::Real sm1, const amrex::Real s0, const amrex::Real sp1, const amrex::Real)
Definition hydro_godunov_ppm.H:152
Definition hydro_godunov_ppm.H:281
static constexpr bool do_limiting
Definition hydro_godunov_ppm.H:283
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real sedge1(const amrex::Real sm2, const amrex::Real sm1, const amrex::Real s0, const amrex::Real sp1, const amrex::Real sp2)
Definition hydro_godunov_ppm.H:325
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::GpuTuple< amrex::Real, amrex::Real > sm_sp(const amrex::Real, const amrex::Real sedge1, const amrex::Real sedge2)
Definition hydro_godunov_ppm.H:336
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real sedge2(const amrex::Real sm2, const amrex::Real sm1, const amrex::Real s0, const amrex::Real sp1, const amrex::Real sp2)
Definition hydro_godunov_ppm.H:287
Definition hydro_godunov_ppm.H:222
static constexpr bool do_limiting
Definition hydro_godunov_ppm.H:224
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real sedge2(const amrex::Real sm2, const amrex::Real sm1, const amrex::Real s0, const amrex::Real sp1, const amrex::Real sp2)
Definition hydro_godunov_ppm.H:228
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::GpuTuple< amrex::Real, amrex::Real > sm_sp(const amrex::Real, const amrex::Real sedge1, const amrex::Real sedge2)
Definition hydro_godunov_ppm.H:273
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real sedge1(const amrex::Real sm2, const amrex::Real sm1, const amrex::Real s0, const amrex::Real sp1, const amrex::Real sp2)
Definition hydro_godunov_ppm.H:262