REMORA
Regional Modeling of Oceans Refined Adaptively
Loading...
Searching...
No Matches
REMORA_InitAnalyticBathymetry_ParticleAdvectionFlat.H
Go to the documentation of this file.
1 // This problem is run over a flat bottom at the base of the domain. The tracer
2 // particles are seeded through the full water column and there is no bed
3 // reflection in REMORAPC::AdvectWithFlow, so a shoaling bottom would leave
4 // particles below the sea floor, outside the terrain-following grid.
5 mf_h.setVal(geomdata.ProbHi(2));
6
7 // vec_h has two components, but vec_h_full_domain (used with hires_grid_level) has one
8 const int h_ncomp = mf_h.nComp();
9
10 for ( MFIter mfi(mf_h, TilingIfNotGPU()); mfi.isValid(); ++mfi )
11 {
12 Array4<Real> const& h = (mf_h).array(mfi);
13
14 Gpu::streamSynchronize();
15 ParallelFor(Box(h), [=] AMREX_GPU_DEVICE (int i, int j, int k)
16 {
17 h(i,j,0,0) = -geomdata.ProbLo(2);
18 if (k==0 && h_ncomp > 1) {
19 h(i,j,0,1) = h(i,j,0,0);
20 }
21 });
22 } // mfi
mf_h setVal(geomdata.ProbHi(2))