REMORA
Regional Modeling of Oceans Refined Adaptively
Loading...
Searching...
No Matches
REMORA_InitAnalyticBathymetry_BoundaryLayer.H
Go to the documentation of this file.
1
2 // Must not be doubly periodic, and must have terrain
4
5 mf_h.setVal(geomdata.ProbHi(2));
6
7 [[maybe_unused]] const int Lm = geomdata.Domain().size()[0];
8 [[maybe_unused]] const int Mm = geomdata.Domain().size()[1];
9
10 for ( MFIter mfi(mf_h, TilingIfNotGPU()); mfi.isValid(); ++mfi )
11 {
12 Array4<Real> const& h = (mf_h).array(mfi);
13 Array4<const Real> const& xr = remora.vec_xr[lev]->array(mfi);
14 [[maybe_unused]] Array4<const Real> const& yr = remora.vec_yr[lev]->array(mfi);
15
16 Box bx = mfi.tilebox();
17 Box gbx2 = bx;
18 // See the note in REMORA_InitAnalyticBathymetry_Seamount.H
19 gbx2.grow(mf_h.nGrowVect());
20
21 Box gbx2D = gbx2;
22 gbx2D.makeSlab(2,0);
23
24 Gpu::streamSynchronize();
25
26 ParallelFor(gbx2D, [=] AMREX_GPU_DEVICE (int i, int j, int )
27 {
28 Real val1 = (xr(i,j,0) + Real(500.0)) / Real(15000.0);
29 h(i,j,0) = Real(14.0) + Real(25.0) * (one - std::exp(-PI * xr(i,j,0) * Real(1.0e-5))) - Real(8.0) * std::exp(-val1 * val1);
30 });
31
32 } // mfi
constexpr amrex::Real one
constexpr amrex::Real PI
mf_h setVal(geomdata.ProbHi(2))
AMREX_ALWAYS_ASSERT(!NSPeriodic||!EWPeriodic)