37 ParallelFor(
xbx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k) noexcept {
38 const auto *
const prob_hi = geomdata.ProbHi();
39 const auto *
const dx = geomdata.CellSize();
40 const Real z = (k + 0.5) *
dx[2];
44 ParallelFor(
ybx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k) noexcept {
45 const auto *
const prob_hi = geomdata.ProbHi();
46 const auto *
const dx = geomdata.CellSize();
47 const Real z = (k + 0.5) *
dx[2];
51 ParallelFor(
zbx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k) noexcept {
52 z_vel_pert(i, j, k) =
W_0;
58 ParallelFor(
xbx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k) noexcept
61 const Real*
dx = geomdata.CellSize();
66 x_vel_pert(i, j, k) = 1.0 - z_h * z_h;
68 x_vel_pert(i, j, k) = 0.0;
72 ParallelFor(
ybx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k) noexcept
75 const Real*
dx = geomdata.CellSize();
80 y_vel_pert(i, j, k) = 1.0 - z_h * z_h;
82 y_vel_pert(i, j, k) = 0.0;
86 ParallelFor(
zbx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k) noexcept
88 z_vel_pert(i, j, k) = 0.0;
94 ParallelFor(
xbx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k) noexcept
98 const Real*
dx = geomdata.CellSize();
101 const Real z = 0.25*( z_nd(i,j ,k) + z_nd(i,j ,k+1) + z_nd(i,j+1,k) + z_nd(i,j+1,k+1) );
107 x_vel_pert(i, j, k) =
U_0 * (1.0 - y_h * y_h);
110 const Real yl = (j + 0.5) *
dx[1];
111 const Real scaling = std::cos(
PI/2.0 * y_h);
116 ParallelFor(
ybx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k) noexcept
120 const Real*
dx = geomdata.CellSize();
123 y_vel_pert(i, j, k) = 0.0;
125 const Real z = 0.25*( z_nd(i ,j,k) + z_nd(i ,j,k+1) + z_nd(i+1,j,k) + z_nd(i+1,j,k+1) );
128 const Real xl = (i + 0.5) *
dx[0];
131 const Real scaling = std::cos(
PI/2.0 * y_h);
136 ParallelFor(
zbx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k) noexcept
138 z_vel_pert(i, j, k) = 0.0;
constexpr amrex::Real PI
Definition: ERF_Constants.H:6
Real pert_delta_v
Definition: ERF_InitCustomPertVels_CouettePoiseuille.H:23
Real bval
Definition: ERF_InitCustomPertVels_CouettePoiseuille.H:32
Real aval
Definition: ERF_InitCustomPertVels_CouettePoiseuille.H:31
ParmParse pp_for_pert_vels("prob")
auto probhi
Definition: ERF_InitCustomPertVels_CouettePoiseuille.H:29
Real pert_periods_u
Definition: ERF_InitCustomPertVels_CouettePoiseuille.H:19
Real pert_periods_v
Definition: ERF_InitCustomPertVels_CouettePoiseuille.H:20
Real U_0
Definition: ERF_InitCustomPertVels_CouettePoiseuille.H:1
Real V_0
Definition: ERF_InitCustomPertVels_CouettePoiseuille.H:2
Real pert_delta_u
Definition: ERF_InitCustomPertVels_CouettePoiseuille.H:22
Real pert_lo
Definition: ERF_InitCustomPertVels_CouettePoiseuille.H:25
int prob_type
Definition: ERF_InitCustomPertVels_CouettePoiseuille.H:11
Real W_0
Definition: ERF_InitCustomPertVels_CouettePoiseuille.H:3
auto problo
Definition: ERF_InitCustomPertVels_CouettePoiseuille.H:28
AMREX_ALWAYS_ASSERT(prob_type==1||prob_type==10||prob_type==11||prob_type==20||prob_type==21)
Real pert_hi
Definition: ERF_InitCustomPertVels_CouettePoiseuille.H:26
const auto dx
Definition: ERF_InitCustomPertVels_ParticleTests.H:15
ParallelFor(bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept { const auto prob_lo=geomdata.ProbLo();const auto dx=geomdata.CellSize();const Real x=(prob_lo[0]+(i+0.5) *dx[0])/mf_m(i, j, 0);const Real z=z_cc(i, j, k);Real L=std::sqrt(std::pow((x - x_c)/x_r, 2)+std::pow((z - z_c)/z_r, 2));if(L<=1.0) { Real dT=T_pert *(std::cos(PI *L)+1.0)/2.0;Real Tbar_hse=p_hse(i, j, k)/(R_d *r_hse(i, j, k));Real theta_perturbed=(Tbar_hse+dT) *std::pow(p_0/p_hse(i, j, k), rdOcp);Real theta_0=(Tbar_hse) *std::pow(p_0/p_hse(i, j, k), rdOcp);if(const_rho) { state_pert(i, j, k, RhoTheta_comp)=r_hse(i, j, k) *(theta_perturbed - theta_0);} else { state_pert(i, j, k, Rho_comp)=getRhoThetagivenP(p_hse(i, j, k))/theta_perturbed - r_hse(i, j, k);} } })
const amrex::Real * prob_lo
Definition: ERF_InitCustomPert_IsentropicVortex.H:16
const amrex::Real * prob_hi
Definition: ERF_InitCustomPert_IsentropicVortex.H:17
const Box zbx
Definition: ERF_SetupDiff.H:9
const Box xbx
Definition: ERF_SetupDiff.H:7
const Box ybx
Definition: ERF_SetupDiff.H:8
amrex::Real Real
Definition: ERF_ShocInterface.H:19