77 BL_PROFILE_REGION(
"erf_fast_rhs_MT()");
79 Real beta_1 = 0.5 * (1.0 - beta_s);
80 Real beta_2 = 0.5 * (1.0 + beta_s);
85 const Real* dx = geom.CellSize();
86 const GpuArray<Real, AMREX_SPACEDIM> dxInv = geom.InvCellSizeArray();
92 MultiFab coeff_A_mf(fast_coeffs, make_alias, 0, 1);
93 MultiFab inv_coeff_B_mf(fast_coeffs, make_alias, 1, 1);
94 MultiFab coeff_C_mf(fast_coeffs, make_alias, 2, 1);
95 MultiFab coeff_P_mf(fast_coeffs, make_alias, 3, 1);
96 MultiFab coeff_Q_mf(fast_coeffs, make_alias, 4, 1);
100 const Array<Real,AMREX_SPACEDIM> grav{0.0, 0.0, -gravity};
101 const GpuArray<Real,AMREX_SPACEDIM> grav_gpu{grav[0], grav[1], grav[2]};
111 #pragma omp parallel if (Gpu::notInLaunchRegion())
114 FArrayBox temp_rhs_fab;
119 std::array<FArrayBox,AMREX_SPACEDIM> flux;
123 for ( MFIter mfi(S_stg_data[
IntVars::cons],
false); mfi.isValid(); ++mfi)
125 Box bx = mfi.tilebox();
126 Box tbx = surroundingNodes(bx,0);
127 Box tby = surroundingNodes(bx,1);
128 Box tbz = surroundingNodes(bx,2);
130 Box vbx = mfi.validbox();
131 const auto& vbx_hi = ubound(vbx);
133 const Array4<const Real> & stg_cons = S_stg_data[
IntVars::cons].const_array(mfi);
134 const Array4<const Real> & stg_xmom = S_stg_data[
IntVars::xmom].const_array(mfi);
135 const Array4<const Real> & stg_ymom = S_stg_data[
IntVars::ymom].const_array(mfi);
136 const Array4<const Real> & stg_zmom = S_stg_data[
IntVars::zmom].const_array(mfi);
137 const Array4<const Real> & prim = S_stg_prim.const_array(mfi);
139 const Array4<const Real>& slow_rhs_cons = S_slow_rhs[
IntVars::cons].const_array(mfi);
140 const Array4<const Real>& slow_rhs_rho_u = S_slow_rhs[
IntVars::xmom].const_array(mfi);
141 const Array4<const Real>& slow_rhs_rho_v = S_slow_rhs[
IntVars::ymom].const_array(mfi);
142 const Array4<const Real>& slow_rhs_rho_w = S_slow_rhs[
IntVars::zmom].const_array(mfi);
144 const Array4<Real>& cur_cons = S_data[
IntVars::cons].array(mfi);
145 const Array4<Real>& cur_xmom = S_data[
IntVars::xmom].array(mfi);
146 const Array4<Real>& cur_ymom = S_data[
IntVars::ymom].array(mfi);
147 const Array4<Real>& cur_zmom = S_data[
IntVars::zmom].array(mfi);
149 const Array4<Real>& lagged_delta_rt = S_scratch[
IntVars::cons].array(mfi);
151 const Array4<const Real>& prev_cons = S_prev[
IntVars::cons].const_array(mfi);
152 const Array4<const Real>& prev_xmom = S_prev[
IntVars::xmom].const_array(mfi);
153 const Array4<const Real>& prev_ymom = S_prev[
IntVars::ymom].const_array(mfi);
154 const Array4<const Real>& prev_zmom = S_prev[
IntVars::zmom].const_array(mfi);
157 const Array4<Real>& avg_xmom = S_scratch[
IntVars::xmom].array(mfi);
158 const Array4<Real>& avg_ymom = S_scratch[
IntVars::ymom].array(mfi);
159 const Array4<Real>& avg_zmom = S_scratch[
IntVars::zmom].array(mfi);
161 const Array4<const Real>& z_nd_old = z_phys_nd_old->const_array(mfi);
162 const Array4<const Real>& z_nd_new = z_phys_nd_new->const_array(mfi);
163 const Array4<const Real>& z_nd_stg = z_phys_nd_stg->const_array(mfi);
164 const Array4<const Real>& detJ_old = detJ_cc_old->const_array(mfi);
165 const Array4<const Real>& detJ_new = detJ_cc_new->const_array(mfi);
166 const Array4<const Real>& detJ_stg = detJ_cc_stg->const_array(mfi);
168 const Array4<const Real>& z_t_arr = z_t_rk->const_array(mfi);
169 const Array4<const Real>& zp_t_arr = z_t_pert->const_array(mfi);
171 const Array4< Real>& omega_arr = Omega.array(mfi);
173 const Array4<const Real>& pi_stage_ca = pi_stage.const_array(mfi);
175 const Array4<Real>& theta_extrap = extrap.array(mfi);
178 const Array4<const Real>& mf_m = mapfac_m->const_array(mfi);
179 const Array4<const Real>& mf_u = mapfac_u->const_array(mfi);
180 const Array4<const Real>& mf_v = mapfac_v->const_array(mfi);
184 Box gbx = mfi.tilebox(); gbx.grow(1);
185 Box gtbx = mfi.nodaltilebox(0); gtbx.grow(1); gtbx.setSmall(2,0);
186 Box gtby = mfi.nodaltilebox(1); gtby.grow(1); gtby.setSmall(2,0);
189 BL_PROFILE(
"fast_rhs_copies_0");
192 [=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept {
197 theta_extrap(i,j,k) = delta_rt;
202 }
else if (use_lagged_delta_rt) {
205 [=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept {
207 theta_extrap(i,j,k) = delta_rt + beta_d * (delta_rt - lagged_delta_rt(i,j,k,
RhoTheta_comp));
215 [=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept {
221 RHS_fab.resize (tbz,1, The_Async_Arena());
222 soln_fab.resize (tbz,1, The_Async_Arena());
223 temp_rhs_fab.resize(tbz,2, The_Async_Arena());
225 auto const& RHS_a = RHS_fab.array();
226 auto const& soln_a = soln_fab.array();
227 auto const& temp_rhs_arr = temp_rhs_fab.array();
229 auto const& coeffA_a = coeff_A_mf.array(mfi);
230 auto const& inv_coeffB_a = inv_coeff_B_mf.array(mfi);
231 auto const& coeffC_a = coeff_C_mf.array(mfi);
232 auto const& coeffP_a = coeff_P_mf.array(mfi);
233 auto const& coeffQ_a = coeff_Q_mf.array(mfi);
239 BL_PROFILE(
"fast_rhs_xymom_T");
240 ParallelFor(tbx, tby,
241 [=] AMREX_GPU_DEVICE (
int i,
int j,
int k)
246 Real gp_xi = (theta_extrap(i,j,k) - theta_extrap(i-1,j,k)) * dxi;
247 Real gp_zeta_on_iface = (k == 0) ?
248 0.5 * dzi * ( theta_extrap(i-1,j,k+1) + theta_extrap(i,j,k+1)
249 -theta_extrap(i-1,j,k ) - theta_extrap(i,j,k ) ) :
250 0.25 * dzi * ( theta_extrap(i-1,j,k+1) + theta_extrap(i,j,k+1)
251 -theta_extrap(i-1,j,k-1) - theta_extrap(i,j,k-1) );
252 Real gpx = h_zeta_old * gp_xi - h_xi_old * gp_zeta_on_iface;
255 if (l_use_moisture) {
261 Real pi_c = 0.5 * (pi_stage_ca(i-1,j,k,0) + pi_stage_ca(i ,j,k,0));
262 Real fast_rhs_rho_u = -
Gamma *
R_d * pi_c * gpx;
265 cur_xmom(i,j,k) = h_zeta_old * prev_xmom(i,j,k) + dtau * fast_rhs_rho_u
266 + dtau * slow_rhs_rho_u(i,j,k);
268 [=] AMREX_GPU_DEVICE (
int i,
int j,
int k)
273 Real gp_eta = (theta_extrap(i,j,k) -theta_extrap(i,j-1,k)) * dyi;
274 Real gp_zeta_on_jface = (k == 0) ?
275 0.5 * dzi * ( theta_extrap(i,j,k+1) + theta_extrap(i,j-1,k+1)
276 -theta_extrap(i,j,k ) - theta_extrap(i,j-1,k ) ) :
277 0.25 * dzi * ( theta_extrap(i,j,k+1) + theta_extrap(i,j-1,k+1)
278 -theta_extrap(i,j,k-1) - theta_extrap(i,j-1,k-1) );
279 Real gpy = h_zeta_old * gp_eta - h_eta_old * gp_zeta_on_jface;
282 if (l_use_moisture) {
288 Real pi_c = 0.5 * (pi_stage_ca(i,j-1,k,0) + pi_stage_ca(i,j ,k,0));
289 Real fast_rhs_rho_v = -
Gamma *
R_d * pi_c * gpy;
292 cur_ymom(i, j, k) = h_zeta_old * prev_ymom(i,j,k) + dtau * fast_rhs_rho_v
293 + dtau * slow_rhs_rho_v(i,j,k);
300 for (
int dir = 0; dir < AMREX_SPACEDIM; ++dir) {
301 flux[dir].resize(surroundingNodes(bx,dir),2);
302 flux[dir].setVal<RunOn::Device>(0.);
304 const GpuArray<const Array4<Real>, AMREX_SPACEDIM>
305 flx_arr{{AMREX_D_DECL(flux[0].array(), flux[1].array(), flux[2].array())}};
309 BL_PROFILE(
"fast_T_making_rho_rhs");
310 ParallelFor(bx, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept
314 Real xflux_lo = cur_xmom(i ,j,k) - stg_xmom(i ,j,k)*h_zeta_stg_xlo;
315 Real xflux_hi = cur_xmom(i+1,j,k) - stg_xmom(i+1,j,k)*h_zeta_stg_xhi;
319 Real yflux_lo = cur_ymom(i,j ,k) - stg_ymom(i,j ,k)*h_zeta_stg_ylo;
320 Real yflux_hi = cur_ymom(i,j+1,k) - stg_ymom(i,j+1,k)*h_zeta_stg_yhi;
323 temp_rhs_arr(i,j,k,0) = ( xflux_hi - xflux_lo ) * dxi + ( yflux_hi - yflux_lo ) * dyi;
324 temp_rhs_arr(i,j,k,1) = (( xflux_hi * (prim(i,j,k,0) + prim(i+1,j,k,0)) -
325 xflux_lo * (prim(i,j,k,0) + prim(i-1,j,k,0)) ) * dxi +
326 ( yflux_hi * (prim(i,j,k,0) + prim(i,j+1,k,0)) -
327 yflux_lo * (prim(i,j,k,0) + prim(i,j-1,k,0)) ) * dyi) * 0.5;
329 (flx_arr[0])(i,j,k,0) = xflux_lo;
330 (flx_arr[0])(i,j,k,1) = (flx_arr[0])(i ,j,k,0) * 0.5 * (prim(i,j,k,0) + prim(i-1,j,k,0));
332 (flx_arr[1])(i,j,k,0) = yflux_lo;
333 (flx_arr[1])(i,j,k,1) = (flx_arr[0])(i,j ,k,0) * 0.5 * (prim(i,j,k,0) + prim(i,j-1,k,0));
336 (flx_arr[0])(i+1,j,k,0) = xflux_hi;
337 (flx_arr[0])(i+1,j,k,1) = (flx_arr[0])(i+1,j,k,0) * 0.5 * (prim(i,j,k,0) + prim(i+1,j,k,0));
340 (flx_arr[1])(i,j+1,k,0) = yflux_hi;
341 (flx_arr[1])(i,j+1,k,1) = (flx_arr[1])(i,j+1,k,0) * 0.5 * (prim(i,j,k,0) + prim(i,j+1,k,0));
350 Box gbxo = mfi.nodaltilebox(2);
352 BL_PROFILE(
"fast_MT_making_omega");
353 Box gbxo_lo = gbxo; gbxo_lo.setBig(2,0);
354 ParallelFor(gbxo_lo, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept {
355 omega_arr(i,j,k) = 0.;
357 Box gbxo_hi = gbxo; gbxo_hi.setSmall(2,gbxo.bigEnd(2));
358 ParallelFor(gbxo_hi, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept {
359 omega_arr(i,j,k) = prev_zmom(i,j,k) - stg_zmom(i,j,k) - zp_t_arr(i,j,k);
361 Box gbxo_mid = gbxo; gbxo_mid.setSmall(2,1); gbxo_mid.setBig(2,gbxo.bigEnd(2)-1);
362 ParallelFor(gbxo_mid, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept {
364 (
OmegaFromW(i,j,k,prev_zmom(i,j,k),prev_xmom,prev_ymom,z_nd_old,dxInv)
365 -
OmegaFromW(i,j,k, stg_zmom(i,j,k), stg_xmom, stg_ymom,z_nd_old,dxInv)) - zp_t_arr(i,j,k);
370 ParallelFor(tbx, tby,
371 [=] AMREX_GPU_DEVICE (
int i,
int j,
int k)
374 cur_xmom(i, j, k) /= h_zeta_new;
375 avg_xmom(i,j,k) += facinv*(cur_xmom(i,j,k) - stg_xmom(i,j,k));
377 [=] AMREX_GPU_DEVICE (
int i,
int j,
int k)
380 cur_ymom(i, j, k) /= h_zeta_new;
381 avg_ymom(i,j,k) += facinv*(cur_ymom(i,j,k) - stg_ymom(i,j,k));
384 Box bx_shrunk_in_k = bx;
385 int klo = tbz.smallEnd(2);
386 int khi = tbz.bigEnd(2);
387 bx_shrunk_in_k.setSmall(2,klo+1);
388 bx_shrunk_in_k.setBig(2,khi-1);
393 Real halfg = std::abs(0.5 * grav_gpu[2]);
396 BL_PROFILE(
"fast_loop_on_shrunk_t");
398 ParallelFor(bx_shrunk_in_k, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k)
400 Real dJ_old_kface = 0.5 * (detJ_old(i,j,k) + detJ_old(i,j,k-1));
401 Real dJ_new_kface = 0.5 * (detJ_new(i,j,k) + detJ_new(i,j,k-1));
402 Real dJ_stg_kface = 0.5 * (detJ_stg(i,j,k) + detJ_stg(i,j,k-1));
404 Real coeff_P = coeffP_a(i,j,k);
405 Real coeff_Q = coeffQ_a(i,j,k);
407 if (l_use_moisture) {
410 coeff_P /= (1.0 + q);
411 coeff_Q /= (1.0 + q);
419 Real R0_tmp = coeff_P * cur_cons(i,j,k ,
RhoTheta_comp) * dJ_old_kface
423 - halfg * ( cur_cons(i,j,k,
Rho_comp) + cur_cons(i,j,k-1,
Rho_comp) ) * dJ_old_kface
424 + halfg * ( stg_cons(i,j,k,
Rho_comp) + stg_cons(i,j,k-1,
Rho_comp) ) * dJ_stg_kface;
427 Real R1_tmp = - halfg * ( slow_rhs_cons(i,j,k ,
Rho_comp) +
432 Real Omega_kp1 = omega_arr(i,j,k+1);
433 Real Omega_k = omega_arr(i,j,k );
434 Real Omega_km1 = omega_arr(i,j,k-1);
437 R1_tmp += ( halfg ) *
438 ( beta_1 * dzi * (Omega_kp1 - Omega_km1) + temp_rhs_arr(i,j,k,
Rho_comp) + temp_rhs_arr(i,j,k-1,
Rho_comp));
442 coeff_P * ( beta_1 * dzi * (Omega_kp1*theta_t_hi - Omega_k*theta_t_mid) + temp_rhs_arr(i,j,k ,
RhoTheta_comp) ) +
443 coeff_Q * ( beta_1 * dzi * (Omega_k*theta_t_mid - Omega_km1*theta_t_lo) + temp_rhs_arr(i,j,k-1,
RhoTheta_comp) ) );
446 RHS_a(i,j,k) = dJ_old_kface * prev_zmom(i,j,k) - dJ_stg_kface * stg_zmom(i,j,k)
447 + dtau *(slow_rhs_rho_w(i,j,k) + R0_tmp + dtau*beta_2*R1_tmp );
450 Real UppVpp = dJ_new_kface *
OmegaFromW(i,j,k,0.,cur_xmom,cur_ymom,z_nd_new,dxInv)
451 -dJ_stg_kface *
OmegaFromW(i,j,k,0.,stg_xmom,stg_ymom,z_nd_stg,dxInv);
452 RHS_a(i,j,k) += UppVpp;
459 auto const lo = lbound(bx);
460 auto const hi = ubound(bx);
463 BL_PROFILE(
"fast_rhs_b2d_loop_t");
466 ParallelFor(b2d, [=] AMREX_GPU_DEVICE (
int i,
int j,
int)
469 Real rho_on_bdy = 0.5 * ( prev_cons(i,j,lo.z) + prev_cons(i,j,lo.z-1) );
470 RHS_a(i,j,lo.z) = rho_on_bdy * zp_t_arr(i,j,0);
472 soln_a(i,j,lo.z) = RHS_a(i,j,lo.z) * inv_coeffB_a(i,j,lo.z);
475 RHS_a(i,j,hi.z+1) = 0.0;
477 for (
int k = lo.z+1; k <= hi.z+1; k++) {
478 soln_a(i,j,k) = (RHS_a(i,j,k)-coeffA_a(i,j,k)*soln_a(i,j,k-1)) * inv_coeffB_a(i,j,k);
481 for (
int k = hi.z; k >= lo.z; k--) {
482 soln_a(i,j,k) -= ( coeffC_a(i,j,k) * inv_coeffB_a(i,j,k) ) * soln_a(i,j,k+1);
486 cur_zmom(i,j,hi.z+1) = stg_zmom(i,j,hi.z+1) + soln_a(i,j,hi.z+1);
489 for (
int j = lo.y; j <= hi.y; ++j) {
491 for (
int i = lo.x; i <= hi.x; ++i) {
493 Real rho_on_bdy = 0.5 * ( prev_cons(i,j,lo.z) + prev_cons(i,j,lo.z-1) );
494 RHS_a(i,j,lo.z) = rho_on_bdy * zp_t_arr(i,j,lo.z);
496 soln_a(i,j,lo.z) = RHS_a(i,j,lo.z) * inv_coeffB_a(i,j,lo.z);
500 for (
int j = lo.y; j <= hi.y; ++j) {
502 for (
int i = lo.x; i <= hi.x; ++i) {
503 RHS_a (i,j,hi.z+1) = 0.0;
506 for (
int k = lo.z+1; k <= hi.z+1; ++k) {
507 for (
int j = lo.y; j <= hi.y; ++j) {
509 for (
int i = lo.x; i <= hi.x; ++i) {
510 soln_a(i,j,k) = (RHS_a(i,j,k)-coeffA_a(i,j,k)*soln_a(i,j,k-1)) * inv_coeffB_a(i,j,k);
514 for (
int k = hi.z; k >= lo.z; --k) {
515 for (
int j = lo.y; j <= hi.y; ++j) {
517 for (
int i = lo.x; i <= hi.x; ++i) {
518 soln_a(i,j,k) -= ( coeffC_a(i,j,k) * inv_coeffB_a(i,j,k) ) * soln_a(i,j,k+1);
524 for (
int j = lo.y; j <= hi.y; ++j) {
526 for (
int i = lo.x; i <= hi.x; ++i) {
527 cur_zmom(i,j,hi.z+1) = stg_zmom(i,j,hi.z+1) + soln_a(i,j,hi.z+1);
534 BL_PROFILE(
"fast_rhs_new_drhow");
536 ParallelFor(tbz, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k)
538 Real rho_on_face = 0.5 * (cur_cons(i,j,k,
Rho_comp) + cur_cons(i,j,k-1,
Rho_comp));
541 cur_zmom(i,j,k) =
WFromOmega(i,j,k,rho_on_face*(z_t_arr(i,j,k)+zp_t_arr(i,j,k)),
542 cur_xmom,cur_ymom,z_nd_new,dxInv);
549 Real UppVpp =
WFromOmega(i,j,k,0.0,cur_xmom,cur_ymom,z_nd_new,dxInv)
550 -
WFromOmega(i,j,k,0.0,stg_xmom,stg_ymom,z_nd_stg,dxInv);
551 Real wpp = soln_a(i,j,k) + UppVpp;
552 Real dJ_old_kface = 0.5 * (detJ_old(i,j,k) + detJ_old(i,j,k-1));
553 Real dJ_new_kface = 0.5 * (detJ_new(i,j,k) + detJ_new(i,j,k-1));
555 cur_zmom(i,j,k) = dJ_old_kface * (stg_zmom(i,j,k) + wpp);
556 cur_zmom(i,j,k) /= dJ_new_kface;
558 soln_a(i,j,k) =
OmegaFromW(i,j,k,cur_zmom(i,j,k),cur_xmom,cur_ymom,z_nd_new,dxInv)
559 -
OmegaFromW(i,j,k,stg_zmom(i,j,k),stg_xmom,stg_ymom,z_nd_stg,dxInv);
560 soln_a(i,j,k) -= rho_on_face * zp_t_arr(i,j,k);
569 BL_PROFILE(
"fast_rho_final_update");
570 ParallelFor(bx, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept
572 Real zflux_lo = beta_2 * soln_a(i,j,k ) + beta_1 * omega_arr(i,j,k);
573 Real zflux_hi = beta_2 * soln_a(i,j,k+1) + beta_1 * omega_arr(i,j,k+1);
577 avg_zmom(i,j,k) += facinv*zflux_lo / (mf_m(i,j,0) * mf_m(i,j,0));
578 (flx_arr[2])(i,j,k,0) = zflux_lo / (mf_m(i,j,0) * mf_m(i,j,0));
583 Real fast_rhs_rho = -(temp_rhs_arr(i,j,k,0) + ( zflux_hi - zflux_lo ) * dzi);
584 Real temp_rho = detJ_old(i,j,k) * cur_cons(i,j,k,0) +
585 dtau * ( slow_rhs_cons(i,j,k,0) + fast_rhs_rho );
586 cur_cons(i,j,k,0) = temp_rho / detJ_new(i,j,k);
591 Real fast_rhs_rhotheta = -( temp_rhs_arr(i,j,k,1) + 0.5 *
592 ( zflux_hi * (prim(i,j,k) + prim(i,j,k+1))
593 - zflux_lo * (prim(i,j,k) + prim(i,j,k-1)) ) * dzi );
594 Real temp_rth = detJ_old(i,j,k) * cur_cons(i,j,k,1) +
595 dtau * ( slow_rhs_cons(i,j,k,1) + fast_rhs_rhotheta );
596 cur_cons(i,j,k,1) = temp_rth / detJ_new(i,j,k);
597 (flx_arr[2])(i,j,k,1) = (flx_arr[2])(i,j,k,0) * 0.5 * (prim(i,j,k) + prim(i,j,k-1));
600 avg_zmom(i,j,k+1) += facinv * zflux_hi / (mf_m(i,j,0) * mf_m(i,j,0));
601 (flx_arr[2])(i,j,k+1,0) = zflux_hi / (mf_m(i,j,0) * mf_m(i,j,0));
602 (flx_arr[2])(i,j,k+1,1) = (flx_arr[2])(i,j,k+1,0) * 0.5 * (prim(i,j,k) + prim(i,j,k+1));
608 if (l_reflux && nrk == 2) {
609 int strt_comp_reflux = 0;
610 int num_comp_reflux = 2;
611 if (level < finest_level) {
612 fr_as_crse->CrseAdd(mfi,
613 {{AMREX_D_DECL(&(flux[0]), &(flux[1]), &(flux[2]))}},
614 dx, dtau, strt_comp_reflux, strt_comp_reflux, num_comp_reflux, RunOn::Device);
617 fr_as_fine->FineAdd(mfi,
618 {{AMREX_D_DECL(&(flux[0]), &(flux[1]), &(flux[2]))}},
619 dx, dtau, strt_comp_reflux, strt_comp_reflux, num_comp_reflux, RunOn::Device);
625 Gpu::streamSynchronize();
constexpr amrex::Real R_d
Definition: ERF_Constants.H:10
constexpr amrex::Real Gamma
Definition: ERF_Constants.H:19
#define PrimQ1_comp
Definition: ERF_IndexDefines.H:53
#define PrimQ2_comp
Definition: ERF_IndexDefines.H:54
#define Rho_comp
Definition: ERF_IndexDefines.H:36
#define RhoTheta_comp
Definition: ERF_IndexDefines.H:37
#define PrimTheta_comp
Definition: ERF_IndexDefines.H:50
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real Compute_h_xi_AtIface(const int &i, const int &j, const int &k, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &cellSizeInv, const amrex::Array4< const amrex::Real > &z_nd)
Definition: ERF_TerrainMetrics.H:101
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real WFromOmega(int i, int j, int k, amrex::Real omega, amrex::Real u, amrex::Real v, const amrex::Array4< const amrex::Real > &z_nd, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &dxInv)
Definition: ERF_TerrainMetrics.H:407
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real OmegaFromW(int i, int j, int k, amrex::Real w, const amrex::Array4< const amrex::Real > u_arr, const amrex::Array4< const amrex::Real > v_arr, const amrex::Array4< const amrex::Real > z_nd, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &dxInv)
Definition: ERF_TerrainMetrics.H:374
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real Compute_h_zeta_AtIface(const int &i, const int &j, const int &k, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &cellSizeInv, const amrex::Array4< const amrex::Real > &z_nd)
Definition: ERF_TerrainMetrics.H:87
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real Compute_h_zeta_AtJface(const int &i, const int &j, const int &k, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &cellSizeInv, const amrex::Array4< const amrex::Real > &z_nd)
Definition: ERF_TerrainMetrics.H:130
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real Compute_h_eta_AtJface(const int &i, const int &j, const int &k, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &cellSizeInv, const amrex::Array4< const amrex::Real > &z_nd)
Definition: ERF_TerrainMetrics.H:158
@ ymom
Definition: ERF_IndexDefines.H:141
@ cons
Definition: ERF_IndexDefines.H:139
@ zmom
Definition: ERF_IndexDefines.H:142
@ xmom
Definition: ERF_IndexDefines.H:140