18 auto domain =
m_geom.Domain();
19 int i_lo = domain.smallEnd(0);
20 int i_hi = domain.bigEnd(0);
21 int j_lo = domain.smallEnd(1);
22 int j_hi = domain.bigEnd(1);
25 for ( MFIter mfi(*
tabs,TilingIfNotGPU()); mfi.isValid(); ++mfi) {
27 auto tbx = mfi.tilebox();
28 if (tbx.smallEnd(0) == i_lo) { tbx.growLo(0,-
m_real_width); }
29 if (tbx.bigEnd(0) == i_hi) { tbx.growHi(0,-
m_real_width); }
30 if (tbx.smallEnd(1) == j_lo) { tbx.growLo(1,-
m_real_width); }
31 if (tbx.bigEnd(1) == j_hi) { tbx.growHi(1,-
m_real_width); }
39 ParallelFor(tbx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k) noexcept
41 Real T = tabs_array(i,j,k);
42 Real p = pres_array(i,j,k);
43 Real th = theta_array(i,j,k);
49 tabs_array(i,j,k) =
T;
50 theta_array(i,j,k) = th;
Real T
Definition: ERF_InitCustomPert_Bubble.H:105
ParallelFor(bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept { const Real *dx=geomdata.CellSize();const Real x=(i+myhalf) *dx[0];const Real y=(j+myhalf) *dx[1];const Real Omg=erf_vortex_Gaussian(x, y, xc, yc, R, beta, sigma);const Real deltaT=-(gamma - one)/(two *sigma *sigma) *Omg *Omg;const Real rho_norm=std::pow(one+deltaT, inv_gm1);const Real T=(one+deltaT) *T_inf;const Real p=std::pow(rho_norm, Gamma)/Gamma *rho_0 *a_inf *a_inf;const Real rho_theta=rho_0 *rho_norm *(T *std::pow(p_0/p, rdOcp));state_pert(i, j, k, RhoTheta_comp)=rho_theta - getRhoThetagivenP(p_hse(i, j, k));const Real r2d_xy=std::sqrt((x-xc) *(x-xc)+(y-yc) *(y-yc));state_pert(i, j, k, RhoScalar_comp)=fourth *(one+std::cos(PI *std::min(r2d_xy, R)/R));})
Real * p
Definition: ERF_InitCustomPert_SquallLine.H:61
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE void AdjustSatAdjCell(const amrex::Real fac_cond, const amrex::Real rdOcp, amrex::Real &tabs, const amrex::Real pres_mbar, amrex::Real &theta, amrex::Real &qv, amrex::Real &qc)
Definition: ERF_SatAdj.H:183
amrex::Real m_fac_cond
Definition: ERF_SatAdj.H:274
amrex::Geometry m_geom
Definition: ERF_SatAdj.H:265
amrex::Array< FabPtr, MicVar_SatAdj::NumVars > mic_fab_vars
Definition: ERF_SatAdj.H:279
amrex::Real m_rdOcp
Definition: ERF_SatAdj.H:275
bool m_do_cond
Definition: ERF_SatAdj.H:276
int m_real_width
Definition: ERF_SatAdj.H:268
@ tabs
Definition: ERF_Kessler.H:24
@ qv
Definition: ERF_Kessler.H:28
@ pres
Definition: ERF_SatAdj.H:33