REMORA
Regional Modeling of Oceans Refined Adaptively
Loading...
Searching...
No Matches
REMORA_InitAnalyticBathymetry_Upwelling_Coupling.H
Go to the documentation of this file.
1
2
// Must not be periodic in E-W, and must allow bathymetry
3
AMREX_ALWAYS_ASSERT
(!
EWPeriodic
);
4
5
mf_h
.setVal(
geomdata
.ProbHi(2));
6
7
for
(
MFIter
mfi
(
mf_h
,
TilingIfNotGPU
());
mfi
.isValid(); ++
mfi
)
8
{
9
Array4<Real>
const
&
h
= (
mf_h
).array(
mfi
);
10
11
Box
bx
=
mfi
.tilebox();
12
Box
gbx
=
bx
;
13
gbx
.grow(
mf_h
.nGrowVect());
14
15
Box
gbxD
=
gbx
;
16
gbxD
.makeSlab(2,0);
17
18
ParallelFor
(
gbxD
, [=]
AMREX_GPU_DEVICE
(
int
i
,
int
j
,
int
)
19
{
20
const
auto
prob_lo
=
geomdata
.ProbLo();
21
const
auto
dx
=
geomdata
.CellSize();
22
23
const
Real
x0
=
prob_lo
[0];
24
const
Real
x
=
x0
+ (
i
+ Real(0.5)) *
dx
[0];
25
const
Real
x1
=
geomdata
.ProbHi(0);
26
const
Real
h0
= Real(300.0);
27
const
Real
h1
= Real(10.0);
28
29
Real
depth
=
h0
+ (
h1
-
h0
) * (
x
-
x0
) / (
x1
-
x0
);
30
depth
= amrex::min(amrex::max(
depth
,
h1
),
h0
);
31
h
(
i
,
j
,0) =
depth
;
32
});
33
}
// mfi
Coord::x
@ x
AMREX_ALWAYS_ASSERT
AMREX_ALWAYS_ASSERT(!EWPeriodic)
setVal
mf_h setVal(geomdata.ProbHi(2))
geomdata
auto geomdata
Definition
REMORA_InitAnalyticGridScale_BoundaryLayer.H:2
EWPeriodic
bool EWPeriodic
Definition
REMORA_InitAnalyticProb_ChannelTest.H:11
prob_lo
const auto prob_lo
Definition
REMORA_InitAnalyticSMFlux_DoubleGyre.H:1
dx
const auto dx
Definition
REMORA_InitAnalyticSMFlux_DoubleGyre.H:3
Source
Prob
REMORA_InitAnalyticBathymetry_Upwelling_Coupling.H
Generated by
1.9.8