7 for (MFIter mfi(mf_cons, TilingIfNotGPU()); mfi.isValid(); ++mfi)
9 const Box &bx = mfi.tilebox();
10 amrex::Print() <<
"Box is " << bx <<
"comparing to khi+1 " <<
khi+1 << std::endl;
13 Array4<Real>
const& state = mf_cons.array(mfi);
14 Array4<Real>
const& x_vel = mf_xvel.array(mfi);
15 Array4<Real>
const& y_vel = mf_yvel.array(mfi);
17 Array4<const Real>
const& z_r = remora.vec_z_r[lev]->const_array(mfi);
18 ParallelFor(bx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k)
noexcept
21 const Real depth = amrex::max(Real(0.0), -z_r(i, j, k));
23 Real temp = Real(6.5);
24 if (depth <= Real(20.0)) {
26 }
else if (depth <= Real(50.0)) {
27 const Real alpha = (depth - Real(20.0)) / (Real(50.0) - Real(20.0));
28 temp = Real(14.0) + alpha * (Real(10.0) - Real(14.0));
29 }
else if (depth <= Real(300.0)) {
30 const Real alpha = (depth - Real(50.0)) / (Real(300.0) - Real(50.0));
31 temp = Real(10.0) + alpha * (Real(6.5) - Real(10.0));
34 Real salt = Real(33.5);
35 if (depth <= Real(50.0)) {
37 }
else if (depth <= Real(150.0)) {
38 const Real alpha = (depth - Real(50.0)) / (Real(150.0) - Real(50.0));
39 salt = Real(33.5) + alpha * (Real(34.3) - Real(33.5));
41 const Real alpha = amrex::min((depth - Real(150.0)) / (Real(300.0) - Real(150.0)), Real(1.0));
42 salt = Real(34.3) + alpha * (Real(34.6) - Real(34.3));
53 const Box& xbx = surroundingNodes(bx,0);
54 const Box& ybx = surroundingNodes(bx,1);
56 ParallelFor(xbx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k)
noexcept
58 x_vel(i, j, k) =
zero;
60 ParallelFor(ybx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k)
noexcept
62 y_vel(i, j, k) =
zero;