ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_InitCustomPertVels_TaylorGreenVortex.H
Go to the documentation of this file.
1 
2  ParmParse pp_for_pert_vels("prob");
3  Real V_0 = 1.0; pp_for_pert_vels.query("V_0", V_0);
4 
5  // Set the x-velocity
6  ParallelFor(xbx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept
7  {
8  const Real* prob_lo = geomdata.ProbLo();
9  const Real* dx = geomdata.CellSize();
10  const Real x = prob_lo[0] + (i + 0.0) * dx[0];
11  const Real y = prob_lo[1] + (j + 0.5) * dx[1];
12  const Real z = prob_lo[2] + (k + 0.5) * dx[2];
13 
14  // Set the x-velocity
15  x_vel_pert(i, j, k) = V_0 * sin(x) * cos(y) * cos(z);
16  });
17 
18  // Set the y-velocity
19  ParallelFor(ybx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept
20  {
21  const Real* prob_lo = geomdata.ProbLo();
22  const Real* dx = geomdata.CellSize();
23  const Real x = prob_lo[0] + (i + 0.5) * dx[0];
24  const Real y = prob_lo[1] + (j + 0.0) * dx[1];
25  const Real z = prob_lo[2] + (k + 0.5) * dx[2];
26 
27  // Set the y-velocity
28  y_vel_pert(i, j, k) = - V_0 * cos(x) * sin(y) * cos(z);
29  });
const auto dx
Definition: ERF_InitCustomPertVels_ParticleTests.H:15
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 x=prob_lo[0]+(i+0.0) *dx[0];const Real y=prob_lo[1]+(j+0.5) *dx[1];const Real z=prob_lo[2]+(k+0.5) *dx[2];x_vel_pert(i, j, k)=V_0 *sin(x) *cos(y) *cos(z);})
ParmParse pp_for_pert_vels("prob")
Real V_0
Definition: ERF_InitCustomPertVels_TaylorGreenVortex.H:3
const amrex::Real * prob_lo
Definition: ERF_InitCustomPert_IsentropicVortex.H:16
const Box xbx
Definition: ERF_SetupDiff.H:7
const Box ybx
Definition: ERF_SetupDiff.H:8
amrex::Real Real
Definition: ERF_ShocInterface.H:19