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
3
AMREX_ALWAYS_ASSERT
( !
NSPeriodic
|| !
EWPeriodic
);
4
5
mf_h
.setVal(
geomdata
.ProbHi(2));
6
7
[[
maybe_unused
]]
const
int
Lm
=
geomdata
.Domain().size()[0];
8
[[
maybe_unused
]]
const
int
Mm
=
geomdata
.Domain().size()[1];
9
10
for
(
MFIter
mfi
(
mf_h
,
TilingIfNotGPU
());
mfi
.isValid(); ++
mfi
)
11
{
12
Array4<Real>
const
&
h
= (
mf_h
).array(
mfi
);
13
Array4<const Real>
const
&
xr
=
remora
.vec_xr[
lev
]->array(
mfi
);
14
[[
maybe_unused
]]
Array4<const Real>
const
&
yr
=
remora
.vec_yr[
lev
]->array(
mfi
);
15
16
Box
bx
=
mfi
.tilebox();
17
Box
gbx2
=
bx
;
18
// See the note in REMORA_InitAnalyticBathymetry_Seamount.H
19
gbx2
.grow(
mf_h
.nGrowVect());
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
one
constexpr amrex::Real one
Definition
REMORA_Constants.H:7
PI
constexpr amrex::Real PI
Definition
REMORA_Constants.H:19
Mm
const int Mm
Definition
REMORA_InitAnalyticBathymetry_BoundaryLayer.H:8
Lm
const int Lm
Definition
REMORA_InitAnalyticBathymetry_BoundaryLayer.H:7
setVal
mf_h setVal(geomdata.ProbHi(2))
AMREX_ALWAYS_ASSERT
AMREX_ALWAYS_ASSERT(!NSPeriodic||!EWPeriodic)
geomdata
auto geomdata
Definition
REMORA_InitAnalyticGridScale_BoundaryLayer.H:2
NSPeriodic
bool NSPeriodic
Definition
REMORA_InitAnalyticProb_ChannelTest.H:12
EWPeriodic
bool EWPeriodic
Definition
REMORA_InitAnalyticProb_ChannelTest.H:11
val1
Real val1
Definition
REMORA_InitAnalyticProb_DoubleGyre.H:12
Source
Prob
REMORA_InitAnalyticBathymetry_BoundaryLayer.H
Generated by
1.9.8