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 = 320000.0_rt;
12 amrex::Real Esize = 320000.0_rt;
13 amrex::Real depth = 5000.0_rt;
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 + 0.5_rt) * dx[0];
23 const Real y = prob_lo[1] + (j + 0.5_rt) * dx[1];
24
25 Real val1, val2;
26 val1 = (x-0.5_rt*Xsize)/40000.0_rt;
27 val2 = (y-0.5_rt*Esize)/40000.0_rt;
28 h(i,j,0) = depth - 4500.0_rt * 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