6 BL_PROFILE(
"cons_to_prim()");
8 int ncomp_prim = S_prim.nComp();
11 #pragma omp parallel if (amrex::Gpu::notInLaunchRegion())
13 for (MFIter mfi(cons_state,TilingIfNotGPU()); mfi.isValid(); ++mfi)
15 const Box& gbx = mfi.growntilebox(ng);
16 const Array4<const Real>& cons_arr = cons_state.array(mfi);
17 const Array4< Real>& prim_arr = S_prim.array(mfi);
22 amrex::ParallelFor(gbx, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept
27 for (
int n = 1; n < ncomp_prim; ++n) {
35 const Box& gbx1 = mfi.growntilebox(1);
37 const Array4< Real>& pi_stage_arr = pi_stage.array(mfi);
38 const Real rdOcp = solverChoice.rdOcp;
40 amrex::ParallelFor(gbx1, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept
51 const Real time_for_fp,
int ng_cons,
int ng_vel,
52 bool fast_only,
bool vel_and_mom_synced)
54 BL_PROFILE(
"apply_bcs()");
67 if (!vel_and_mom_synced) {
80 AMREX_ALWAYS_ASSERT (ng_cons >= 1);
84 ng_cons_to_use = std::max(ng_cons, ng_vel+1);
92 FillIntermediatePatch(level, time_for_fp,
96 ng_cons_to_use, 0, cons_only, scomp_cons, ncomp_cons);
106 if (vel_and_mom_synced) {
116 ng_cons_to_use = std::max(ng_cons, ng_vel+1);
126 ng_cons_to_use = ng_cons;
129 bool allow_most_bcs =
true;
131 allow_most_bcs =
false;
133 allow_most_bcs =
true;
141 FillIntermediatePatch(level, time_for_fp,
145 ng_cons_to_use, ng_vel, cons_only, scomp_cons, ncomp_cons,
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real getExnergivenRTh(const amrex::Real rhotheta, const amrex::Real rdOcp, const amrex::Real qv=0.0)
Definition: ERF_EOS.H:159
#define Rho_comp
Definition: ERF_IndexDefines.H:36
#define RhoTheta_comp
Definition: ERF_IndexDefines.H:37
#define PrimTheta_comp
Definition: ERF_IndexDefines.H:50
auto apply_bcs
Definition: ERF_TI_utils.H:50
auto cons_to_prim
Definition: ERF_TI_utils.H:4
@ ymom
Definition: ERF_IndexDefines.H:141
@ cons
Definition: ERF_IndexDefines.H:139
@ zmom
Definition: ERF_IndexDefines.H:142
@ xmom
Definition: ERF_IndexDefines.H:140
@ rho
Definition: ERF_Kessler.H:30