12 for (MFIter mfi(mf_cons, TilingIfNotGPU()); mfi.isValid(); ++mfi)
14 const Box &bx = mfi.tilebox();
17 Array4< Real>
const& state = mf_cons.array(mfi);
18 Array4< Real>
const& x_vel = mf_xvel.array(mfi);
19 Array4< Real>
const& y_vel = mf_yvel.array(mfi);
21 Array4<const Real>
const& z_r = remora.vec_z_r[lev]->const_array(mfi);
23 ParallelFor(grow(grow(bx,0,1),1,1), [=] AMREX_GPU_DEVICE(
int i,
int j,
int k)
noexcept
29 const Real
z = z_r(i,j,k);
33 [[maybe_unused]]
const Real ycent = Real(0.5)*(
prob_lo[1] +
prob_hi[1]);
35 [[maybe_unused]]
const Real
x =
prob_lo[0] + (i + Real(0.5)) *
dx[0] - xcent;
36 const Real
y =
prob_lo[1] + (j + Real(0.5)) *
dx[1];
40 state(i,j,k,
Salt_comp)=
S0 +
y / (Real(9.8) * Real(760.0));
47 const Box& xbx = surroundingNodes(bx,0);
48 const Box& ybx = surroundingNodes(bx,1);
49 ParallelFor(grow(grow(xbx,1,1),0,1), [=] AMREX_GPU_DEVICE(
int i,
int j,
int k)
noexcept
56 [[maybe_unused]]
const Real xcent = Real(0.5)*(
prob_lo[0] +
prob_hi[0]);
57 [[maybe_unused]]
const Real ycent = Real(0.5)*(
prob_lo[1] +
prob_hi[1]);
59 const Real
z = z_r(i,j,k);
61 const Real depth = Real(50.0);
63 const Real
x =
prob_lo[0] + (i + Real(0.5)) *
dx[0];
64 const Real
y =
prob_lo[1] + (j + Real(0.5)) *
dx[1];
66 const Real
val1 =
x * Real(6.28318530718) * Real(1.0e-5);
67 const Real
val2 =
y * Real(6.28318530718) * Real(1.0e-5);
68 x_vel(i, j, k) = (depth +
z) * Real(0.01) + Real(0.05) * std::sin(
val1) * std::sin(
val2);
70 ParallelFor(ybx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k)
noexcept
72 y_vel(i, j, k) =
zero;