25 if (
nr <= 1) {
return; }
28 const Box&
bx =
mfi.validbox();
29 const auto&
a =
mf.array(
mfi);
30 const auto&
m =
mask.const_array(
mfi);
35 const int t = (
tdir == 0) ?
i :
j;
36 const int t0 = amrex::coarsen(t,
nr) *
nr;
47 if (
cnt == 0) {
return; }
77#pragma omp parallel if (Gpu::notInLaunchRegion())
99#pragma omp parallel if (Gpu::notInLaunchRegion())
180#pragma omp parallel if (Gpu::notInLaunchRegion())
196 Real
D = Real(0.5) * (
h(
i-1,
j,0,0) + zeta(
i-1,
j,0,
know) +
198 if (
D <=
zero) {
return; }
212 static bool warned =
false;
214 amrex::Warning(
"remora.cf_print_iface is host-only; ignored on a GPU build");
222 const Box&
bx =
mfi.tilebox();
226 for (
int j =
lo.y;
j <=
hi.y; ++
j) {
227 for (
int i =
lo.x;
i <=
hi.x; ++
i) {
229 amrex::AllPrint() <<
"[IFACE] lev " <<
lev
230 <<
" t " << std::setprecision(12) <<
time
231 <<
" told0 " <<
t_old[0] <<
" tnew0 " <<
t_new[0]
232 <<
" i " <<
i <<
" j " <<
j
234 <<
" y " <<
lo_p[1] + (
j + Real(0.5)) *
dx_p[1]
235 <<
" ubar " << std::setprecision(12) << ubar(
i,
j,0,
knew) <<
"\n";
244 const Box&
bx =
mfi.tilebox();
251 for (
int i =
lo.x;
i <=
hi.x; ++
i) {
254 if (
iface < 0) {
continue; }
257 amrex::AllPrint() <<
"[HALO] lev " <<
lev
258 <<
" t " << std::setprecision(12) <<
time
259 <<
" j " <<
jmid <<
" off " <<
off <<
" i " <<
i
273#pragma omp parallel if (Gpu::notInLaunchRegion())
288 Real
D = Real(0.5) * (
h(
i,
j-1,0,0) + zeta(
i,
j-1,0,
know) +
290 if (
D <=
zero) {
return; }
336#pragma omp parallel if (Gpu::notInLaunchRegion())
356#pragma omp parallel if (Gpu::notInLaunchRegion())
constexpr amrex::Real two
constexpr amrex::Real zero
mf_h setVal(geomdata.ProbHi(2))
amrex::Vector< amrex::BCRec > domain_bcs_type
vector (over BCVars) of BCRecs
int cf_print_iface
print the imposed coarse-fine interface velocity at this baroclinic step (-1 = off)....
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_h
multilevel data container for current step's z velocities (largely unused; W stored separately)
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_pm
horizontal scaling factor: 1 / dx (2D)
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_DU_avg2
correct time average of barotropic x velocity flux for coupling (2D)
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_Dvbar_new
see vec_Dvbar_old (2D)
void set_2d_cf_bcs(int lev, amrex::Real time, int know, int knew)
set this level's barotropic contact points from its parent, mass-conservingly
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_msku
land/sea mask at x-faces (2D)
int cf_flux_pc
distribute the parent's interface mass flux piecewise-constantly over the fine faces under each paren...
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_Dubar_old
DU_avg2 per unit cell edge length, at the start and end of this level's step. What a subcycled finer ...
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_mskv
land/sea mask at y-faces (2D)
amrex::Vector< int > istep
which step?
amrex::Vector< REMORAFillPatcher > FPr_Dubar
Vector over levels of FillPatchers for Dubar (2D)
void store_2d_flux(int lev)
store this level's barotropic mass flux per unit cell edge length
amrex::Vector< REMORAFillPatcher > FPr_Dvbar
Vector over levels of FillPatchers for Dvbar (2D)
amrex::Vector< amrex::Real > t_new
new time at each level, in seconds since start_time
int cf_set_width
Width for fixing values at coarse-fine interface.
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_zeta
free surface height (2D)
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_vbar
barotropic y velocity (2D)
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_ubar
barotropic x velocity (2D)
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_DV_avg2
correct time average of barotropic y velocity flux for coupling (2D)
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_Dvbar_old
DV_avg2 per unit cell edge length, see vec_Dubar_old (2D)
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_pn
horizontal scaling factor: 1 / dy (2D)
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_Dubar_new
see vec_Dubar_old (2D)
amrex::Vector< amrex::Real > t_old
old time at each level, in seconds since start_time
void set_2d_cf_flux(int lev, amrex::Real time, amrex::MultiFab &mf_DUon, amrex::MultiFab &mf_DVom)
impose the parent's barotropic mass flux on the coarse-fine interface faces