ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_InitCustomPertVels_UserDefined.H
Go to the documentation of this file.
1  ParmParse pp_prob("prob");
2  Real U_0 = 0.0; pp_prob.query("U_0", U_0);
3  Real V_0 = 0.0; pp_prob.query("V_0", V_0);
4  Real W_0 = 0.0; pp_prob.query("W_0", W_0);
5 
6  // Set the x-velocity
7  ParallelFor(xbx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept
8  {
9  x_vel_pert(i, j, k) = U_0;
10  });
11 
12  // Set the y-velocity
13  ParallelFor(ybx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept
14  {
15  y_vel_pert(i, j, k) = V_0;
16  });
17 
18  // Set the z-velocity
19  ParallelFor(zbx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept
20  {
21  z_vel_pert(i, j, k) = W_0;
22  });
ParmParse pp_prob("prob")
Real U_0
Definition: ERF_InitCustomPertVels_UserDefined.H:2
Real V_0
Definition: ERF_InitCustomPertVels_UserDefined.H:3
Real W_0
Definition: ERF_InitCustomPertVels_UserDefined.H:4
ParallelFor(xbx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept { x_vel_pert(i, j, k)=U_0;})
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