REMORA
Regional Modeling of Oceans Refined Adaptively
Loading...
Searching...
No Matches
REMORA_InitAnalyticSMFlux_DoubleGyre.H
Go to the documentation of this file.
1
const
auto
prob_lo
=
geomdata
.ProbLo();
2
const
auto
prob_hi
=
geomdata
.ProbHi();
3
const
auto
dx
=
geomdata
.CellSize();
4
5
//If we had wind stress and bottom stress we would need to set these:
6
Real
pi
= Real(3.14159265359);
7
8
const
Real
yextent
=
prob_hi
[1] -
prob_lo
[1];
9
const
Real
windamp
= Real(-0.05) /
m_solverChoice
.rho0;
10
const
Real
val1
=
two
*
pi
/
yextent
;
11
const
Real
prob_lo_y
=
prob_lo
[1];
12
const
Real
dy
=
dx
[1];
13
for
(
MFIter
mfi
((
mf_sustr
),
TilingIfNotGPU
());
mfi
.isValid(); ++
mfi
)
14
{
15
const
Box&
bx
=
mfi
.tilebox();
16
[[
maybe_unused
]]
const
Box&
xbx
=
surroundingNodes
(
bx
,0);
17
const
Box&
xbx2
=
mfi
.grownnodaltilebox(0, IntVect(
NGROW
,
NGROW
,0));
18
19
Array4<Real>
const
& sustr =
mf_sustr
.array(
mfi
);
20
ParallelFor
(
xbx2
, [=]
AMREX_GPU_DEVICE
(
int
i
,
int
j
,
int
/*k*/
)
noexcept
21
{
22
const
Real
y
=
prob_lo_y
+ (
j
+ Real(0.5)) *
dy
;
// - ycent;
23
24
sustr(
i
,
j
,0) =
windamp
* std::cos(
val1
*
y
);
25
});
26
}
27
mf_svstr
.setVal(
zero
);
two
constexpr amrex::Real two
Definition
REMORA_Constants.H:8
zero
constexpr amrex::Real zero
Definition
REMORA_Constants.H:6
Coord::y
@ y
NGROW
#define NGROW
Definition
REMORA_IndexDefines.H:30
geomdata
auto geomdata
Definition
REMORA_InitAnalyticGridScale_BoundaryLayer.H:2
setVal
mf_svstr setVal(zero)
prob_lo_y
const Real prob_lo_y
Definition
REMORA_InitAnalyticSMFlux_DoubleGyre.H:11
dy
const Real dy
Definition
REMORA_InitAnalyticSMFlux_DoubleGyre.H:12
yextent
const Real yextent
Definition
REMORA_InitAnalyticSMFlux_DoubleGyre.H:8
val1
const Real val1
Definition
REMORA_InitAnalyticSMFlux_DoubleGyre.H:10
pi
Real pi
Definition
REMORA_InitAnalyticSMFlux_DoubleGyre.H:6
prob_lo
const auto prob_lo
Definition
REMORA_InitAnalyticSMFlux_DoubleGyre.H:1
dx
const auto dx
Definition
REMORA_InitAnalyticSMFlux_DoubleGyre.H:3
windamp
const Real windamp
Definition
REMORA_InitAnalyticSMFlux_DoubleGyre.H:9
prob_hi
const auto prob_hi
Definition
REMORA_InitAnalyticSMFlux_DoubleGyre.H:2
Source
Prob
REMORA_InitAnalyticSMFlux_DoubleGyre.H
Generated by
1.9.8