REMORA
Regional Modeling of Oceans Refined Adaptively
Loading...
Searching...
No Matches
REMORA_InitAnalyticBathymetry_Seamount.H
Go to the documentation of this file.
1 mf_h.setVal(geom.ProbHi(2));
2
3 for ( MFIter mfi(mf_h, TilingIfNotGPU()); mfi.isValid(); ++mfi )
4 {
5
6 Array4<Real> const& h = (mf_h).array(mfi);
7
8 Box bx = mfi.tilebox();
9 Box gbx2 = grow(bx,IntVect(NGROW+1,NGROW+1,0));
10
11 amrex::Real Xsize = Real(320000.0);
12 amrex::Real Esize = Real(320000.0);
13 amrex::Real depth = Real(5000.0);
14
15 if(!m_solverChoice.flat_bathymetry)
16 {
17 ParallelFor(makeSlab(gbx2,2,0), [=] AMREX_GPU_DEVICE (int i, int j, int)
18 {
19 const auto prob_lo = geomdata.ProbLo();
20 const auto dx = geomdata.CellSize();
21
22 const Real x = prob_lo[0] + (i + Real(0.5)) * dx[0];
23 const Real y = prob_lo[1] + (j + Real(0.5)) * dx[1];
24
25 Real val1, val2;
26 val1 = (x-Real(0.5)*Xsize)/Real(40000.0);
27 val2 = (y-Real(0.5)*Esize)/Real(40000.0);
28 h(i,j,0) = depth - Real(4500.0) * std::exp(-(val1*val1+val2*val2));
29 });
30
31 } else {
32
33 ParallelFor(makeSlab(gbx2,2,0), [=] AMREX_GPU_DEVICE (int i, int j, int )
34 {
35 h(i,j,0) = -geomdata.ProbLo(2);
36 h(i,j,0,1) = h(i,j,0);
37 });
38 }
39 }
#define NGROW