REMORA
Regional Modeling of Oceans Refined Adaptively
Loading...
Searching...
No Matches
REMORA_InitAnalyticBathymetry_ParticlesOverSeamount.H
Go to the documentation of this file.
1
2 mf_h.setVal(geom.ProbHi(2));
3 const int Lm = geom.Domain().size()[0];
4 const int Mm = geom.Domain().size()[1];
5
6 for ( MFIter mfi(mf_h, TilingIfNotGPU()); mfi.isValid(); ++mfi )
7 {
8
9 Array4<Real> const& h = (mf_h).array(mfi);
10
11 Box bx = mfi.tilebox();
12 Box gbx2 = bx;
13 gbx2.grow(IntVect(NGROW+1,NGROW+1,0));
14
15 Gpu::streamSynchronize();
16
17 if (!m_solverChoice.flat_bathymetry) {
18 ParallelFor(makeSlab(gbx2,2,0), [=] AMREX_GPU_DEVICE (int i, int j, int )
19 {
20 Real val1;
21 int iFort = i+1;
22 int jFort = j+1;
23 if(NSPeriodic) {
24 if (iFort<=Lm/2.0)
25 val1=iFort;
26 else
27 val1=Lm+1-iFort;
28 h(i,j,0) = std::min(-geomdata.ProbLo(2),(84.5_rt+66.526_rt*std::tanh((val1-10.0_rt)/7.0_rt)));
29
30 } else if(EWPeriodic) {
31
32 if (jFort<=Mm/2.0)
33 val1=jFort;
34 else
35 val1=Mm+1-jFort;
36 h(i,j,0) = std::min(-geomdata.ProbLo(2),(84.5_rt+66.526_rt*std::tanh((val1-10.0_rt)/7.0_rt)));
37 }
38 });
39 } else {
40
41 ParallelFor(gbx2, [=] AMREX_GPU_DEVICE (int i, int j, int k)
42 {
43 h(i,j,0) = -geomdata.ProbLo(2);
44 if (k==0) {
45 h(i,j,0,1) = h(i,j,0);
46 }
47 });
48 }
49 } // mfi
#define NGROW