8#ifndef HYDRO_GODUNOV_PPM_H
9#define HYDRO_GODUNOV_PPM_H
31 if (std::abs(dsp) < std::abs(dsm)) {
188 return (dsl*dsr > small_qty_sq) ?
289 const amrex::Real t5 = amrex::Math::abs(beta3 - beta1);
294 const amrex::Real omega = omega1 + omega2 + omega3;
300 return (omega1 * v_1 + omega2 * v_2 + omega3 * v_3) / (
amrex::Real(6) * omega);
311 return sedge2(sp2,sp1,s0,sm1,sm2);
357 const amrex::Real omega = omega1 + omega2 + omega3;
363 return (omega1 * v_1 + omega2 * v_2 + omega3 * v_3) / (
amrex::Real(6) * omega);
374 return sedge2(sp2,sp1,s0,sm1,sm2);
459template <
typename Limiter>
461void SetXBCs (
const int i,
const int j,
const int k,
const int n,
466 const int bclo,
const int bchi,
467 const int domlo,
const int domhi)
469 using namespace amrex;
482 if constexpr (Limiter::do_limiting) {
487 sm = s(domlo-1,j,k,n);
490 }
else if (i == domlo+1) {
494 if constexpr (Limiter::do_limiting) {
502 if constexpr (Limiter::do_limiting) {
503 if ( (sp - s(domlo+1,j,k,n))*(s(domlo+1,j,k,n) - sm) <=
amrex::Real(0))
505 sp = s(domlo+1,j,k,n);
506 sm = s(domlo+1,j,k,n);
507 }
else if(amrex::Math::abs(sp - s(domlo+1,j,k,n)) >=
amrex::Real(2)*amrex::Math::abs(sm - s(domlo+1,j,k,n))) {
509 }
else if(amrex::Math::abs(sm - s(domlo+1,j,k,n)) >=
amrex::Real(2)*amrex::Math::abs(sp - s(domlo+1,j,k,n))) {
524 if constexpr (Limiter::do_limiting) {
529 sp = s(domhi+1,j,k,n);
532 }
else if (i == domhi-1) {
536 if constexpr (Limiter::do_limiting) {
544 if constexpr (Limiter::do_limiting) {
545 if( (sp - s(domhi-1,j,k,n))*(s(domhi-1,j,k,n) - sm) <=
amrex::Real(0))
547 sp = s(domhi-1,j,k,n);
548 sm = s(domhi-1,j,k,n);
549 }
else if(amrex::Math::abs(sp - s(domhi-1,j,k,n)) >=
amrex::Real(2.)*amrex::Math::abs(sm - s(domhi-1,j,k,n))) {
551 }
else if(amrex::Math::abs(sm - s(domhi-1,j,k,n)) >=
amrex::Real(2.)*amrex::Math::abs(sp - s(domhi-1,j,k,n))) {
559template <
typename Limiter>
561void SetYBCs (
const int i,
const int j,
const int k,
const int n,
566 const int bclo,
const int bchi,
567 const int domlo,
const int domhi)
569 using namespace amrex;
582 if constexpr (Limiter::do_limiting) {
587 sm = s(i,domlo-1,k,n);
590 }
else if (j == domlo+1) {
594 if constexpr (Limiter::do_limiting) {
602 if constexpr (Limiter::do_limiting) {
603 if ( (sp - s(i,domlo+1,k,n))*(s(i,domlo+1,k,n) - sm) <=
amrex::Real(0))
605 sp = s(i,domlo+1,k,n);
606 sm = s(i,domlo+1,k,n);
607 }
else if(amrex::Math::abs(sp - s(i,domlo+1,k,n)) >=
amrex::Real(2)*amrex::Math::abs(sm - s(i,domlo+1,k,n))) {
609 }
else if(amrex::Math::abs(sm - s(i,domlo+1,k,n)) >=
amrex::Real(2)*amrex::Math::abs(sp - s(i,domlo+1,k,n))) {
624 if constexpr (Limiter::do_limiting) {
629 sp = s(i,domhi+1,k, n);
632 }
else if (j == domhi-1) {
636 if constexpr (Limiter::do_limiting) {
644 if constexpr (Limiter::do_limiting) {
645 if( (sp - s(i,domhi-1,k,n))*(s(i,domhi-1,k,n) - sm) <=
amrex::Real(0)){
646 sp = s(i,domhi-1,k,n);
647 sm = s(i,domhi-1,k,n);
648 }
else if(amrex::Math::abs(sp - s(i,domhi-1,k,n)) >=
amrex::Real(2.)*amrex::Math::abs(sm - s(i,domhi-1,k,n))) {
650 }
else if(amrex::Math::abs(sm - s(i,domhi-1,k,n)) >=
amrex::Real(2.)*amrex::Math::abs(sp - s(i,domhi-1,k,n))) {
658#if (AMREX_SPACEDIM==3)
659template <
typename Limiter>
661void SetZBCs (
const int i,
const int j,
const int k,
const int n,
666 const int bclo,
const int bchi,
667 const int domlo,
const int domhi)
669 using namespace amrex;
682 if constexpr (Limiter::do_limiting) {
687 sm = s(i,j,domlo-1,n);
690 }
else if (k == domlo+1) {
694 if constexpr (Limiter::do_limiting) {
702 if constexpr (Limiter::do_limiting) {
703 if ( (sp - s(i,j,domlo+1,n))*(s(i,j,domlo+1,n) - sm) <=
amrex::Real(0.) )
705 sp = s(i,j,domlo+1,n);
706 sm = s(i,j,domlo+1,n);
707 }
else if(amrex::Math::abs(sp - s(i,j,domlo+1,n)) >=
amrex::Real(2.)*amrex::Math::abs(sm - s(i,j,domlo+1,n))) {
709 }
else if(amrex::Math::abs(sm - s(i,j,domlo+1,n)) >=
amrex::Real(2.)*amrex::Math::abs(sp - s(i,j,domlo+1,n))) {
717 if ( (bchi == BCType::ext_dir) || (bchi == BCType::hoextrap) ||
718 (bchi == BCType::direction_dependent && vel_dhi <=
Real(0)) )
724 if constexpr (Limiter::do_limiting) {
729 sp = s(i,j,domhi+1,n);
732 }
else if (k == domhi-1) {
736 if constexpr (Limiter::do_limiting) {
744 if constexpr (Limiter::do_limiting) {
745 if ( (sp - s(i,j,domhi-1,n))*(s(i,j,domhi-1,n) - sm) <=
amrex::Real(0.) )
747 sp = s(i,j,domhi-1,n);
748 sm = s(i,j,domhi-1,n);
749 }
else if(amrex::Math::abs(sp - s(i,j,domhi-1,n)) >=
amrex::Real(2.)*amrex::Math::abs(sm - s(i,j,domhi-1,n))) {
751 }
else if(amrex::Math::abs(sm - s(i,j,domhi-1,n)) >=
amrex::Real(2.)*amrex::Math::abs(sp - s(i,j,domhi-1,n))) {
765template <
typename Limiter>
773 const amrex::BCRec bc,
const int domlo,
const int domhi,
786 amrex::Real sedge1 = Limiter::sedge1(sm2,sm1,s0,sp1,sp2);
787 amrex::Real sedge2 = Limiter::sedge2(sm2,sm1,s0,sp1,sp2);
789 auto [sm, sp] = Limiter::sm_sp(s0, sedge1, sedge2);
791 SetXBCs<Limiter>(i, j, k, n, sm, sp, sedge1, sedge2, S, vel_dlo, vel_dhi,
792 bc.
lo(0), bc.
hi(0), domlo, domhi);
796 const amrex::Real sigma = amrex::Math::abs(v_ad)*dtdx;
800 Ip(i,j,k,n) = sp - (half*sigma)*((sp-sm) - (one - two3rds*sigma)*s6);
801 Im(i,j,k,n) = S(i,j,k,n);
805 Ip(i,j,k,n) = S(i,j,k,n);
806 Im(i,j,k,n) = sm + (half*sigma)*((sp-sm) + (one - two3rds*sigma)*s6);
809 Ip(i,j,k,n) = S(i,j,k,n);
810 Im(i,j,k,n) = S(i,j,k,n);
814template <
typename Limiter>
822 const amrex::BCRec bc,
const int domlo,
const int domhi,
835 amrex::Real sedge1 = Limiter::sedge1(sm2,sm1,s0,sp1,sp2);
836 amrex::Real sedge2 = Limiter::sedge2(sm2,sm1,s0,sp1,sp2);
838 auto [sm, sp] = Limiter::sm_sp(s0, sedge1, sedge2);
840 SetYBCs<Limiter>(i, j, k, n, sm, sp, sedge1, sedge2, S, vel_dlo, vel_dhi,
841 bc.
lo(1), bc.
hi(1), domlo, domhi);
845 const amrex::Real sigma = amrex::Math::abs(v_ad)*dtdy;
849 Ip(i,j,k,n) = sp - (half*sigma)*((sp-sm) - (one - two3rds*sigma)*s6);
850 Im(i,j,k,n) = S(i,j,k,n);
854 Ip(i,j,k,n) = S(i,j,k,n);
855 Im(i,j,k,n) = sm + (half*sigma)*((sp-sm) + (one - two3rds*sigma)*s6);
858 Ip(i,j,k,n) = S(i,j,k,n);
859 Im(i,j,k,n) = S(i,j,k,n);
863#if (AMREX_SPACEDIM==3)
864template <
typename Limiter>
866void PredictVelOnZFace (
const int i,
const int j,
const int k,
const int n,
872 const amrex::BCRec bc,
const int domlo,
const int domhi,
885 amrex::Real sedge1 = Limiter::sedge1(sm2,sm1,s0,sp1,sp2);
886 amrex::Real sedge2 = Limiter::sedge2(sm2,sm1,s0,sp1,sp2);
888 auto [sm, sp] = Limiter::sm_sp(s0, sedge1, sedge2);
890 SetZBCs<Limiter>(i, j, k, n, sm, sp, sedge1, sedge2, S, vel_dlo, vel_dhi,
891 bc.
lo(2), bc.
hi(2), domlo, domhi);
895 const amrex::Real sigma = amrex::Math::abs(v_ad)*dtdz;
899 Ip(i,j,k,n) = sp - (half*sigma)*((sp-sm) - (one - two3rds*sigma)*s6);
900 Im(i,j,k,n) = S(i,j,k,n);
904 Ip(i,j,k,n) = S(i,j,k,n);
905 Im(i,j,k,n) = sm + (half*sigma)*((sp-sm) + (one - two3rds*sigma)*s6);
908 Ip(i,j,k,n) = S(i,j,k,n);
909 Im(i,j,k,n) = S(i,j,k,n);
918template <
typename Limiter>
926 const int domlo,
const int domhi,
937 const amrex::Real sigmap = amrex::Math::abs(vel_edge(i+1,j,k))*dt/dx;
938 const amrex::Real sigmam = amrex::Math::abs(vel_edge(i ,j,k))*dt/dx;
945 amrex::Real sedge1 = Limiter::sedge1(sm2,sm1,s0,sp1,sp2);
946 amrex::Real sedge2 = Limiter::sedge2(sm2,sm1,s0,sp1,sp2);
948 auto [sm, sp] = Limiter::sm_sp(s0, sedge1, sedge2);
956 ? vel_edge(domlo ,j,k) : vel_edge(i,j,k);
958 ? vel_edge(domhi+1,j,k) : vel_edge(i+1,j,k);
959 SetXBCs<Limiter>(i, j, k, n, sm, sp, sedge1, sedge2, S, vel_dlo, vel_dhi,
960 bc.
lo(0), bc.
hi(0), domlo, domhi);
965 Ip = sp - (half*sigmap)*((sp - sm) - (one -two3rds*sigmap)*s6);
986 Im = sm + (half*sigmam)*((sp-sm) + (one - two3rds*sigmam)*s6);
1002 const int ,
const int ,
1019 const int domlo,
const int domhi,
1024 const amrex::Real sm1 =
Godunov_minmod_ghost_lo(i, S(i-1,j,k,n), s0, vel_edge(i ,j,k), bc.
lo(0), domlo);
1025 const amrex::Real sp1 =
Godunov_minmod_ghost_hi(i, s0, S(i+1,j,k,n), vel_edge(i+1,j,k), bc.
hi(0), domhi);
1030 const amrex::Real sigmap = amrex::Math::abs(vel_edge(i+1,j,k))*dt/dx;
1031 const amrex::Real sigmam = amrex::Math::abs(vel_edge(i ,j,k))*dt/dx;
1039 if (vel_edge(i + 1, j, k) >
small_vel) {
1040 Ip = s0 + half * (one - sigmap) * dsp;
1050 Im = s0 - half * (one - sigmam) * dsm;
1058template <
typename Limiter>
1066 const int domlo,
const int domhi,
1077 const amrex::Real sigmap = amrex::Math::abs(vel_edge(i,j+1,k))*dt/dx;
1078 const amrex::Real sigmam = amrex::Math::abs(vel_edge(i,j ,k))*dt/dx;
1085 amrex::Real sedge1 = Limiter::sedge1(sm2,sm1,s0,sp1,sp2);
1086 amrex::Real sedge2 = Limiter::sedge2(sm2,sm1,s0,sp1,sp2);
1088 auto [sm, sp] = Limiter::sm_sp(s0, sedge1, sedge2);
1096 ? vel_edge(i,domlo ,k) : vel_edge(i,j,k);
1098 ? vel_edge(i,domhi+1,k) : vel_edge(i,j+1,k);
1099 SetYBCs<Limiter>(i, j, k, n, sm, sp, sedge1, sedge2, S, vel_dlo, vel_dhi,
1100 bc.
lo(1), bc.
hi(1), domlo, domhi);
1105 Ip = sp - (half*sigmap)*((sp - sm) - (one -two3rds*sigmap)*s6);
1115 Im = sm + (half*sigmam)*((sp-sm) + (one - two3rds*sigmam)*s6);
1132 const int ,
const int ,
1149 const int domlo,
const int domhi,
1154 const amrex::Real sm1 =
Godunov_minmod_ghost_lo(j, S(i,j-1,k,n), s0, vel_edge(i,j ,k), bc.
lo(1), domlo);
1155 const amrex::Real sp1 =
Godunov_minmod_ghost_hi(j, s0, S(i,j+1,k,n), vel_edge(i,j+1,k), bc.
hi(1), domhi);
1160 const amrex::Real sigmap = amrex::Math::abs(vel_edge(i,j+1,k))*dt/dx;
1161 const amrex::Real sigmam = amrex::Math::abs(vel_edge(i,j ,k))*dt/dx;
1170 Ip = s0 + half * (one - sigmap) * dsp;
1179 Im = s0 - half * (one - sigmam) * dsm;
1188#if (AMREX_SPACEDIM==3)
1189template <
typename Limiter>
1191void PredictStateOnZFace (
const int i,
const int j,
const int k,
const int n,
1197 const int domlo,
const int domhi,
1207 const amrex::Real sigmap = amrex::Math::abs(vel_edge(i,j,k+1))*dt/dx;
1208 const amrex::Real sigmam = amrex::Math::abs(vel_edge(i,j,k ))*dt/dx;
1215 amrex::Real sedge1 = Limiter::sedge1(sm2,sm1,s0,sp1,sp2);
1216 amrex::Real sedge2 = Limiter::sedge2(sm2,sm1,s0,sp1,sp2);
1218 auto [sm, sp] = Limiter::sm_sp(s0, sedge1, sedge2);
1226 ? vel_edge(i,j,domlo ) : vel_edge(i,j,k);
1228 ? vel_edge(i,j,domhi+1) : vel_edge(i,j,k+1);
1229 SetZBCs<Limiter>(i, j, k, n, sm, sp, sedge1, sedge2, S, vel_dlo, vel_dhi,
1230 bc.
lo(2), bc.
hi(2), domlo, domhi);
1235 Ip = sp - (half*sigmap)*((sp-sm) - (
amrex::Real(1.0) -two3rds*sigmap)*s6);
1245 Im = sm + (half*sigmam)*((sp-sm) + (
amrex::Real(1.0) - two3rds*sigmam)*s6);
1255void PredictStateOnZFace<PPM::upwind> (
const int i,
const int j,
const int k,
const int n,
1260 const amrex::BCRec ,
1261 const int ,
const int ,
1262 const PPM::upwind& ,
1271void PredictStateOnZFace<PPM::minmod> (
const int i,
const int j,
const int k,
const int n,
1276 const amrex::BCRec bc,
1277 const int domlo,
const int domhi,
1278 const PPM::minmod& ,
1282 const amrex::Real sm1 =
Godunov_minmod_ghost_lo(k, S(i,j,k-1,n), s0, vel_edge(i,j,k ), bc.
lo(2), domlo);
1283 const amrex::Real sp1 =
Godunov_minmod_ghost_hi(k, s0, S(i,j,k+1,n), vel_edge(i,j,k+1), bc.
hi(2), domhi);
1288 const amrex::Real sigmap = amrex::Math::abs(vel_edge(i,j,k+1))*dt/dx;
1289 const amrex::Real sigmam = amrex::Math::abs(vel_edge(i,j,k ))*dt/dx;
1297 if (vel_edge(i, j, k + 1) >
small_vel) {
1298 Ip = s0 + half * (one - sigmap) * dsp;
1308 Im = s0 - half * (one - sigmam) * dsm;
1317template <
typename Limiter>
1330 const Limiter& limiter,
1358 PredictVelOnXFace(i,j,k,n,l_dtdx,vel(i,j,k,0),xlo_v,xhi_v,q,Imx,Ipx,bc,dlo.
x,dhi.
x,limiter);
1359 PredictVelOnYFace(i,j,k,n,l_dtdy,vel(i,j,k,1),ylo_v,yhi_v,q,Imy,Ipy,bc,dlo.
y,dhi.
y,limiter);
1360#if (AMREX_SPACEDIM==3)
1363 PredictVelOnZFace(i,j,k,n,l_dtdz,vel(i,j,k,2),zlo_v,zhi_v,q,Imz,Ipz,bc,dlo.
z,dhi.
z,limiter);
1368template <
typename Limiter>
1384 const Limiter& limiter,
1394 const auto dz = geom.
CellSize(2););
1402 PPM::PredictStateOnXFace(i, j, k, n, l_dt, dx, Imx(i,j,k,n), Ipx(i,j,k,n),
1403 q, umac, bc, dlo.
x, dhi.
x, limiter, limiter_type);
1404 PPM::PredictStateOnYFace(i, j, k, n, l_dt, dy, Imy(i,j,k,n), Ipy(i,j,k,n),
1405 q, vmac, bc, dlo.
y, dhi.
y, limiter, limiter_type);
1406#if (AMREX_SPACEDIM==3)
1407 PPM::PredictStateOnZFace(i, j, k, n, l_dt, dz, Imz(i,j,k,n), Ipz(i,j,k,n),
1408 q, wmac, bc, 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:17
static constexpr amrex::Real small_vel
Definition hydro_constants.H:37
__host__ __device__ Dim3 ubound(Array4< T > const &a) noexcept
ArrayND< T, 4, true > Array4
__host__ __device__ Dim3 lbound(Array4< T > const &a) noexcept
__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
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:45
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:19
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real Godunov_minmod_ghost_hi(const int n, const amrex::Real s0, const amrex::Real sp1, const amrex::Real vel_edge, const int bchi, const int domhi)
Definition hydro_godunov_ppm.H:108
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:65
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real Godunov_minmod_ghost_lo(const int n, const amrex::Real sm1, const amrex::Real s0, const amrex::Real vel_edge, const int bclo, const int domlo)
Definition hydro_godunov_ppm.H:89
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::BCRec getBC(const int i, const int j, const int k, const int n, const amrex::Box &m_domain, const amrex::BCRec *bcr, amrex::Array4< int const > const &bca)
Definition hydro_bcs_K.H:34
Definition hydro_godunov_ppm.H:125
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, amrex::Array4< int const > const &bc_arr={})
Definition hydro_godunov_ppm.H:1318
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 vel_dlo, const amrex::Real vel_dhi, const int bclo, const int bchi, const int domlo, const int domhi)
Definition hydro_godunov_ppm.H:461
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:920
static constexpr int default_limiter
Definition hydro_godunov_ppm.H:129
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::Real vel_dlo, const amrex::Real vel_dhi, 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:816
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:1013
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:996
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, amrex::Array4< int const > const &bc_arr={})
Definition hydro_godunov_ppm.H:1369
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 vel_dlo, const amrex::Real vel_dhi, const int bclo, const int bchi, const int domlo, const int domhi)
Definition hydro_godunov_ppm.H:561
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:1060
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:1143
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:1126
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::Real vel_dlo, const amrex::Real vel_dhi, 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:767
limiters
Definition hydro_godunov_ppm.H:127
@ MINMOD
Definition hydro_godunov_ppm.H:127
@ VanLeer
Definition hydro_godunov_ppm.H:127
@ WENOZ
Definition hydro_godunov_ppm.H:127
@ WENO_JS
Definition hydro_godunov_ppm.H:127
@ NoLimiter
Definition hydro_godunov_ppm.H:127
@ UPWIND
Definition hydro_godunov_ppm.H:127
__host__ __device__ constexpr GpuTuple< detail::tuple_decay_t< Ts >... > makeTuple(Ts &&... args)
void ParallelFor(TypeList< CTOs... > ctos, std::array< int, sizeof...(CTOs)> const &runtime_options, T N, F &&f)
Definition hydro_godunov_ppm.H:423
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:451
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:429
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:440
static constexpr bool do_limiting
Definition hydro_godunov_ppm.H:425
Definition hydro_godunov_ppm.H:131
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:168
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:153
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:137
static constexpr bool do_limiting
Definition hydro_godunov_ppm.H:133
Definition hydro_godunov_ppm.H:387
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:393
static constexpr bool do_limiting
Definition hydro_godunov_ppm.H:389
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:415
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:404
Definition hydro_godunov_ppm.H:176
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:230
static constexpr bool do_limiting
Definition hydro_godunov_ppm.H:178
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:212
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:181
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:195
Definition hydro_godunov_ppm.H:324
static constexpr bool do_limiting
Definition hydro_godunov_ppm.H:326
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:368
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:379
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:330
Definition hydro_godunov_ppm.H:265
static constexpr bool do_limiting
Definition hydro_godunov_ppm.H:267
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:271
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:316
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:305