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 AMREX_ALWAYS_ASSERT( !m_solverChoice.flat_bathymetry);
5
6 mf_h.setVal(geomdata.ProbHi(2));
7
8 [[maybe_unused]] const int Lm = geomdata.Domain().size()[0];
9 [[maybe_unused]] const int Mm = geomdata.Domain().size()[1];
10
11 for ( MFIter mfi(mf_h, TilingIfNotGPU()); mfi.isValid(); ++mfi )
12 {
13 Array4<Real> const& h = (mf_h).array(mfi);
14 Array4<const Real> const& xr = remora.vec_xr[lev]->array(mfi);
15 [[maybe_unused]] Array4<const Real> const& yr = remora.vec_yr[lev]->array(mfi);
16
17 Box bx = mfi.tilebox();
18 Box gbx2 = bx;
19 gbx2.grow(IntVect(NGROW,NGROW,0));
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
#define NGROW
AMREX_ALWAYS_ASSERT(!NSPeriodic||!EWPeriodic)