6 amrex::Gpu::streamSynchronize();
34 ParallelFor(xbx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k) noexcept
37 const Real*
dx = geomdata.CellSize();
42 x_vel_pert(i, j, k) =
U_0 +
uRef *
45 x_vel_pert(i, j, k) =
U_0;
57 ParallelFor(ybx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k) noexcept
59 y_vel_pert(i, j, k) =
V_0;
62 const Real*
dx = geomdata.CellSize();
69 ParallelFor(zbx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k) noexcept
71 z_vel_pert(i, j, k) =
W_0;
74 const Real*
dx = geomdata.CellSize();
ParallelFor(xbx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept { const Real *prob_lo=geomdata.ProbLo();const Real *dx=geomdata.CellSize();const Real z=use_z_phys ? erf_prob_heights::z_xface(i, j, k, z_nd) :prob_lo[2]+(k+myhalf) *dx[2];if(uRef !=zero) { x_vel_pert(i, j, k)=U_0+uRef *std::log((z+z0)/z0)/std::log((zRef+z0)/z0);} else { x_vel_pert(i, j, k)=U_0;} if(test_amp !=zero) { const Real x=prob_lo[0]+i *dx[0];const Real y=prob_lo[1]+(j+myhalf) *dx[1];x_vel_pert(i, j, k)+=test_amp *(tf_kz/tf_kx) *std::sin(tf_kx *(x - tf_xlo)) *std::cos(tf_kz *(z - tf_zlo))+test_amp *std::sin(tf_ky *(y - tf_ylo));} })
const bool use_z_phys
Definition: ERF_InitCustomPertVels_ScalarAdvDiff.H:4
Real z0
Definition: ERF_InitCustomPertVels_ScalarAdvDiff.H:12
const Real tf_ylo
Definition: ERF_InitCustomPertVels_ScalarAdvDiff.H:24
ParmParse pp_for_pert_vels("prob")
const Real tf_ky
Definition: ERF_InitCustomPertVels_ScalarAdvDiff.H:30
Real U_0
Definition: ERF_InitCustomPertVels_ScalarAdvDiff.H:8
const Real tf_Lx
Definition: ERF_InitCustomPertVels_ScalarAdvDiff.H:25
Real V_0
Definition: ERF_InitCustomPertVels_ScalarAdvDiff.H:9
const Real tf_kx
Definition: ERF_InitCustomPertVels_ScalarAdvDiff.H:29
const Real tf_zlo
Definition: ERF_InitCustomPertVels_ScalarAdvDiff.H:27
Real uRef
Definition: ERF_InitCustomPertVels_ScalarAdvDiff.H:14
Real zRef
Definition: ERF_InitCustomPertVels_ScalarAdvDiff.H:13
int prob_type
Definition: ERF_InitCustomPertVels_ScalarAdvDiff.H:16
Real W_0
Definition: ERF_InitCustomPertVels_ScalarAdvDiff.H:10
Real test_amp
Definition: ERF_InitCustomPertVels_ScalarAdvDiff.H:23
const Real tf_Ly
Definition: ERF_InitCustomPertVels_ScalarAdvDiff.H:26
const Real tf_H
Definition: ERF_InitCustomPertVels_ScalarAdvDiff.H:28
const Real tf_xlo
Definition: ERF_InitCustomPertVels_ScalarAdvDiff.H:24
const Real tf_kz
Definition: ERF_InitCustomPertVels_ScalarAdvDiff.H:31
const Real dx
Definition: ERF_InitCustomPert_ABL.H:44
const GpuArray< Real, AMREX_SPACEDIM > prob_lo
Definition: ERF_InitCustomPert_CloudChamber.H:33
constexpr amrex::Real zero
Definition: ERF_NumericalConstants.H:36
constexpr amrex::Real myhalf
Definition: ERF_NumericalConstants.H:41
constexpr amrex::Real PI
Definition: ERF_NumericalConstants.H:46
amrex::Real Real
Definition: ERF_ShocInterface.H:19
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real z_zface(int i, int j, int k, amrex::Array4< amrex::Real const > const &z_nd) noexcept
Height of the centre of z-face (i,j,k)
Definition: ERF_ProbHeights.H:39
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real z_xface(int i, int j, int k, amrex::Array4< amrex::Real const > const &z_nd) noexcept
Height of the centre of x-face (i,j,k)
Definition: ERF_ProbHeights.H:21