REMORA
Regional Modeling of Oceans Refined Adaptively
Loading...
Searching...
No Matches
REMORA_FillPatch.cpp
Go to the documentation of this file.
1#include <REMORA.H>
5
6using namespace amrex;
7
8PhysBCFunctNoOp null_bc;
9
10/**
11 * Fill valid and ghost data in the MultiFab "mf"
12 * This version fills the MultiFab mf_to_fill in valid regions with
13 * the "state data" at the given time;
14 * values in mf when it is passed in are *not* used.
15 *
16 * @param[in ] lev level to FillPatch on
17 * @param[in ] time current time
18 * @param[inout] mf_to_fill MultiFab to fill
19 * @param[in ] mfs vector over levels of multifabs associated with mf_to_fill
20 * @param[in ] bccomp index into domain_bcs_type
21 * @param[in ] bdy_var_type when filling from NetCDF, which boundary data
22 * @param[in ] icomp component to fill
23 * @param[in ] fill_all whether to fill all components
24 * @param[in ] fill_set whether to use FillPatchers
25 * @param[in ] icomp_calc component to use in RHS boundary calculation
26 * @param[in ] dt_lev time step at this level
27 * @param[in ] mf_calc data to use in RHS boundary calculation
28 */
29void
30REMORA::FillPatch (int lev, Real time, MultiFab& mf_to_fill, Vector<MultiFab*> const& mfs,
31 const int bccomp,
32#ifdef REMORA_USE_NETCDF
33 const int bdy_var_type,
34#else
35 const int /*bdy_var_type*/,
36#endif
37 const int icomp,
38 const bool fill_all,
39 const bool fill_set,
40 const int n_not_fill,
41 const int icomp_calc,
42 const Real dt_lev,
43 const MultiFab& mf_calc)
44{
45 BL_PROFILE_VAR("REMORA::FillPatch()",REMORA_FillPatch);
46 amrex::Interpolater* mapper = nullptr;
47
48 Box mf_box(mf_to_fill.boxArray()[0]);
49 bool is_2d = mf_box.length(2) == 1;
50
51 MultiFab* mask;
52
53 //
54 // ***************************************************************************
55 // The first thing we do is interpolate the momenta on the "valid" faces of
56 // the fine grids (where the interface is coarse/fine not fine/fine) -- this
57 // will not be over-written below because the FillPatch operators see these as
58 // valid faces.
59 // ***************************************************************************
60 if (lev>0 && fill_set) {
61 if (cf_set_width > 0 &&
62 mf_box.ixType() == IndexType(IntVect(0,0,0))) {
63 FPr_c[lev-1].FillSet(mf_to_fill, time, null_bc, domain_bcs_type);
64 } else if (cf_set_width >= 0) {
65 if (!is_2d) {
66 if (mf_box.ixType() == IndexType(IntVect(1,0,0))) {
67 FPr_u[lev-1].FillSet(mf_to_fill, time, null_bc, domain_bcs_type);
68 } else if (mf_box.ixType() == IndexType(IntVect(0,1,0))) {
69 FPr_v[lev-1].FillSet(mf_to_fill, time, null_bc, domain_bcs_type);
70 } else if (mf_box.ixType() == IndexType(IntVect(0,0,1))) {
71 FPr_w[lev-1].FillSet(mf_to_fill, time, null_bc, domain_bcs_type);
72 }
73 } else {
74 if (mf_box.ixType() == IndexType(IntVect(1,0,0))) {
75 FPr_ubar[lev-1].FillSet(mf_to_fill, time, null_bc, domain_bcs_type);
76 } else if (mf_box.ixType() == IndexType(IntVect(0,1,0))) {
77 FPr_vbar[lev-1].FillSet(mf_to_fill, time, null_bc, domain_bcs_type);
78 }
79 }
80 }
81 }
82
83 int ncomp;
84 if (fill_all) {
85 ncomp = mf_to_fill.nComp();
86 } else {
87 ncomp = 1;
88 }
89
90 if (mf_box.ixType() == IndexType(IntVect(0,0,0)))
91 {
92 mapper = &cell_cons_interp;
93 mask = vec_mskr[lev].get();
94 }
95 else if (mf_box.ixType() == IndexType(IntVect(1,0,0)))
96 {
97 mapper = &face_linear_interp;
98 mask = vec_msku[lev].get();
99 }
100 else if (mf_box.ixType() == IndexType(IntVect(0,1,0)))
101 {
102 mapper = &face_linear_interp;
103 mask = vec_mskv[lev].get();
104 }
105 else {
106 mapper = &face_linear_interp;
107 mask = vec_mskr[lev].get();
108 }
109
110 if (lev == 0)
111 {
112 Vector<MultiFab*> fmf = {mfs[lev], mfs[lev]};
113 Vector<Real> ftime = {t_old[lev], t_new[lev]};
114 amrex::FillPatchSingleLevel(mf_to_fill, time, fmf, ftime, icomp, icomp, ncomp,
115 geom[lev], null_bc, bccomp);
116 }
117 else
118 {
119 Vector<MultiFab*> fmf = {mfs[lev], mfs[lev]};
120 Vector<Real> ftime = {t_old[lev], t_new[lev]};
121 Vector<MultiFab*> cmf = {mfs[lev-1], mfs[lev-1]};
122 Vector<Real> ctime = {t_old[lev-1], t_new[lev-1]};
123
124 amrex::FillPatchTwoLevels(mf_to_fill, time, cmf, ctime, fmf, ftime,
125 icomp, icomp, ncomp, geom[lev-1], geom[lev],
126 null_bc, bccomp, null_bc, bccomp, refRatio(lev-1),
127 mapper, domain_bcs_type, bccomp);
128 } // lev > 0
129
130 // This is currently unconditionally true, but do_bc flag should actually be passed in
131 const bool do_bc=true;
132 if (do_bc) {
133 // ***************************************************************************
134 // Physical bc's at domain boundary
135 // ***************************************************************************
136
137 // Enforce physical boundary conditions
138 (*physbcs[lev])(mf_to_fill,*mask,icomp,ncomp,mf_to_fill.nGrowVect(),time,bccomp,n_not_fill,mf_calc,
139 *vec_msku[lev].get(), *vec_mskv[lev].get());
140
141#ifdef REMORA_USE_NETCDF
142 // Fill the data which is stored in the boundary data read from netcdf files
143 if ( (solverChoice.ic_bc_type == IC_BC_Type::netcdf) && (lev==0) &&
144 (bdy_var_type != BdyVars::null) )
145 {
146 fill_from_bdyfiles(mf_to_fill,*mask,time,bccomp,bdy_var_type, icomp,icomp_calc,mf_calc,dt_lev);
147 }
148#endif
149 // Fill corners of the domain with periodic data
150 if ( mf_box.ixType() == IndexType(IntVect(0,0,0)) ) {
151 mf_to_fill.EnforcePeriodicity(geom[lev].periodicity());
152 }
153
154 // Also enforce free-slip at top boundary (on xvel or yvel)
155 if ( (mf_box.ixType() == IndexType(IntVect(1,0,0))) ||
156 (mf_box.ixType() == IndexType(IntVect(0,1,0))) )
157 {
158 int khi = geom[lev].Domain().bigEnd(2);
159 for (MFIter mfi(mf_to_fill); mfi.isValid(); ++mfi)
160 {
161 Box gbx = mfi.growntilebox(); // Note this is face-centered since vel is
162 gbx.setSmall(2,khi+1);
163 if (gbx.ok()) {
164 Array4<Real> vel_arr = mf_to_fill.array(mfi);
165 ParallelFor(gbx, [=] AMREX_GPU_DEVICE (int i, int j, int k)
166 {
167 vel_arr(i,j,k) = vel_arr(i,j,khi);
168 });
169 }
170 }
171 }
172 }
173}
174
175/**
176 * Fill valid and ghost data in the MultiFab "mf"
177 * This version fills the MultiFab mf_to_fill in valid regions with
178 * the "state data" at the given time;
179 * values in mf when it is passed in are *not* used.
180 * Unlike FillPatch, FillPatchNoBC does not apply boundary conditions
181 *
182 * @param[in ] lev level to FillPatch on
183 * @param[in ] time current time
184 * @param[inout] mf_to_fill MultiFab to fill
185 * @param[in ] mfs vector over levels of multifabs associated with mf_to_fill
186 * @param[in ] bdy_var_type when filling from NetCDF, which boundary data
187 * @param[in ] icomp component to fill
188 * @param[in ] fill_all whether to fill all components
189 * @param[in ] fill_set whether to use FillPatchers
190 */
191void
192REMORA::FillPatchNoBC (int lev, Real time, MultiFab& mf_to_fill, Vector<MultiFab*> const& mfs,
193#ifdef REMORA_USE_NETCDF
194 const int /*bdy_var_type*/,
195#else
196 const int /*bdy_var_type*/,
197#endif
198 const int icomp,
199 const bool fill_all,
200 const bool fill_set)
201{
202 // HACK: Note that this is hacky; should be able to have a single call to FillPatch with a
203 // flag for bcs, but for some reason it was acting weird, so we're splitting this out into
204 // two functions with repeated code for the time being
205 BL_PROFILE_VAR("REMORA::FillPatch()",REMORA_FillPatch);
206 int bccomp;
207 amrex::Interpolater* mapper = nullptr;
208
209 Box mf_box(mf_to_fill.boxArray()[0]);
210 bool is_2d = mf_box.length(2) == 1;
211
212 //
213 // ***************************************************************************
214 // The first thing we do is interpolate the momenta on the "valid" faces of
215 // the fine grids (where the interface is coarse/fine not fine/fine) -- this
216 // will not be over-written below because the FillPatch operators see these as
217 // valid faces.
218 // ***************************************************************************
219 if (lev>0 && fill_set) {
220 if (cf_set_width > 0 &&
221 mf_box.ixType() == IndexType(IntVect(0,0,0))) {
222 FPr_c[lev-1].FillSet(mf_to_fill, time, null_bc, domain_bcs_type);
223 } else if (cf_set_width >= 0) {
224 if (!is_2d) {
225 if (mf_box.ixType() == IndexType(IntVect(1,0,0))) {
226 FPr_u[lev-1].FillSet(mf_to_fill, time, null_bc, domain_bcs_type);
227 } else if (mf_box.ixType() == IndexType(IntVect(0,1,0))) {
228 FPr_v[lev-1].FillSet(mf_to_fill, time, null_bc, domain_bcs_type);
229 } else if (mf_box.ixType() == IndexType(IntVect(0,0,1))) {
230 FPr_w[lev-1].FillSet(mf_to_fill, time, null_bc, domain_bcs_type);
231 }
232 } else {
233 if (mf_box.ixType() == IndexType(IntVect(1,0,0))) {
234 FPr_ubar[lev-1].FillSet(mf_to_fill, time, null_bc, domain_bcs_type);
235 } else if (mf_box.ixType() == IndexType(IntVect(0,1,0))) {
236 FPr_vbar[lev-1].FillSet(mf_to_fill, time, null_bc, domain_bcs_type);
237 }
238 }
239 }
240 }
241
242 int ncomp;
243 if (fill_all) {
244 ncomp = mf_to_fill.nComp();
245 } else {
246 ncomp = 1;
247 }
248
249 if (mf_box.ixType() == IndexType(IntVect(0,0,0)))
250 {
251 bccomp = 0;
252 mapper = &cell_cons_interp;
253 }
254 else if (mf_box.ixType() == IndexType(IntVect(1,0,0)))
255 {
256 bccomp = BCVars::xvel_bc;
257 mapper = &face_linear_interp;
258 }
259 else if (mf_box.ixType() == IndexType(IntVect(0,1,0)))
260 {
261 bccomp = BCVars::yvel_bc;
262 mapper = &face_linear_interp;
263 }
264 else {
265 bccomp = BCVars::zvel_bc;
266 mapper = &face_linear_interp;
267 }
268
269 if (lev == 0)
270 {
271 Vector<MultiFab*> fmf = {mfs[lev], mfs[lev]};
272 Vector<Real> ftime = {t_old[lev], t_new[lev]};
273 amrex::FillPatchSingleLevel(mf_to_fill, time, fmf, ftime, icomp, icomp, ncomp,
274 geom[lev], null_bc, bccomp);
275 }
276 else
277 {
278 Vector<MultiFab*> fmf = {mfs[lev], mfs[lev]};
279 Vector<Real> ftime = {t_old[lev], t_new[lev]};
280 Vector<MultiFab*> cmf = {mfs[lev-1], mfs[lev-1]};
281 Vector<Real> ctime = {t_old[lev-1], t_new[lev-1]};
282
283 amrex::FillPatchTwoLevels(mf_to_fill, time, cmf, ctime, fmf, ftime,
284 0, icomp, ncomp, geom[lev-1], geom[lev],
285 null_bc, bccomp, null_bc, bccomp, refRatio(lev-1),
286 mapper, domain_bcs_type, bccomp);
287 } // lev > 0
288}
289
290
291// utility to copy in data from old/new data into a struct that holds data for FillPatching
293REMORA::GetDataAtTime (int /*lev*/, Real /*time*/)
294{
295 BL_PROFILE_VAR("GetDataAtTime()",GetDataAtTime);
297
298// HACK HACK HACK
299#if 0
300 const Real teps = (t_new[lev] - t_old[lev]) * 1.e-3_rt;
301
302 if (time > t_new[lev] - teps && time < t_new[lev] + teps)
303 {
304 for (int i = 0; i < Vars::NumTypes; ++i) {
305 data.add_var(&vars_new[lev][i], data.non_owning);
306 }
307 data.set_time(t_new[lev]);
308 }
309 else if (time > t_old[lev] - teps && time < t_old[lev] + teps)
310 {
311 for (int i = 0; i < Vars::NumTypes; ++i) {
312 data.add_var(&vars_old[lev][i], data.non_owning);
313 }
314 data.set_time(t_old[lev]);
315 }
316 else if (time > t_old[lev] && time < t_new[lev])
317 {
318 // do first order interpolation in time between [t_old[lev], t_new[lev]]
319 // time interpolation includes the ghost cells
320 for (int i = 0; i < Vars::NumTypes; ++i) {
321 MultiFab* mf_tmp = new MultiFab(vars_new[lev][i].boxArray(),
322 vars_new[lev][i].DistributionMap(),
323 vars_new[lev][i].nComp(), vars_new[lev][i].nGrowVect());
324 mf_tmp->setVal(0.0_rt);
325
326 const Real dt_fraction = (time - t_old[lev]) / (t_new[lev] - t_old[lev]);
327 MultiFab::Saxpy(*mf_tmp, 1.0_rt - dt_fraction, vars_old[lev][i], 0, 0, mf_tmp->nComp(), mf_tmp->nGrowVect());
328 MultiFab::Saxpy(*mf_tmp, dt_fraction, vars_new[lev][i], 0, 0, mf_tmp->nComp(), mf_tmp->nGrowVect());
329
330 data.add_var(mf_tmp, data.owning);
331 }
332 data.set_time(time);
333 }
334 else
335 {
336 amrex::Error("Requested data at a time outside the interval [t_old, t_new]");
337 }
338
339 // We need to make sure to fill these before we compute the viscosity
340 for (int i = 0; i < Vars::NumTypes; ++i) {
341 data.get_var(Vars::xvel).FillBoundary(geom[lev].periodicity());
342 data.get_var(Vars::yvel).FillBoundary(geom[lev].periodicity());
343 data.get_var(Vars::zvel).FillBoundary(geom[lev].periodicity());
344 data.get_var(Vars::cons).FillBoundary(geom[lev].periodicity());
345 }
346#endif
347 return data;
348}
349
350/**
351 * Fill an entire multifab by interpolating from the coarser level --
352 * this is used only when a new level of refinement is being created
353 * during a run (i.e not at initialization)
354 * This will never be used with static refinement.
355 *
356 * @param[in ] lev level to FillPatch on
357 * @param[in ] time current time
358 * @param[inout] mf_to_fill MultiFab to fill
359 * @param[inout] mf_crse MultiFab of coarse data
360 * @param[in ] icomp component to fill
361 * @param[in ] fill_all whether to fill all components
362 */
363void
364REMORA::FillCoarsePatch (int lev, Real time, MultiFab* mf_to_fill, MultiFab* mf_crse,
365 const int icomp,
366 const bool fill_all)
367{
368 BL_PROFILE_VAR("FillCoarsePatch()",FillCoarsePatch);
369 AMREX_ASSERT(lev > 0);
370
371 int ncomp;
372 if (fill_all) {
373 ncomp = mf_to_fill->nComp();
374 } else {
375 ncomp = 1;
376 }
377
378 int bccomp = 0;
379 amrex::Interpolater* mapper = nullptr;
380
381 Box box_mf(mf_to_fill->boxArray()[0]);
382
383 if (box_mf.ixType() == IndexType(IntVect(0,0,0)))
384 {
385 bccomp = 0;
386 mapper = &cell_cons_interp;
387 }
388 else if (box_mf.ixType() == IndexType(IntVect(1,0,0)))
389 {
390 bccomp = BCVars::xvel_bc;
391 mapper = &face_linear_interp;
392 }
393 else if (box_mf.ixType() == IndexType(IntVect(0,1,0)))
394 {
395 bccomp = BCVars::yvel_bc;
396 mapper = &face_linear_interp;
397 }
398 else if (box_mf.ixType() == IndexType(IntVect(0,0,1)))
399 {
400 bccomp = BCVars::zvel_bc;
401 mapper = &face_linear_interp;
402 } else {
403 amrex::Abort("Dont recognize this box type in REMORA_FillPatch");
404 }
405
406#if 0
407 TimeInterpolatedData cdata = GetDataAtTime(lev-1, time);
408 TimeInterpolatedData fdata = GetDataAtTime(lev , time);
409 Vector<Real> ctime = {cdata.get_time()};
410
411 Vector<MultiFab*> cmf = {mf_crse};
412 Vector<Real> ctime = {time};
413
414 REMORAPhysBCFunct cphysbc(lev-1,geom[lev-1],
416 cdata,
418#ifdef REMORA_USE_NETCDF
419 ,ic_bc_type,bdy_data_xlo,bdy_data_xhi,
421#endif
422 );
423 REMORAPhysBCFunct fphysbc(lev,geom[lev],
425 fdata,
427#ifdef REMORA_USE_NETCDF
428 ,ic_bc_type,bdy_data_xlo,bdy_data_xhi,
430#endif
431 );
432#endif
433
434// amrex::InterpFromCoarseLevel(mf, time, *cmf[0], 0, icomp, ncomp, geom[lev-1], geom[lev],
435// cphysbc, 0, fphysbc, 0, refRatio(lev-1),
436// mapper, domain_bcs_type, bccomp);
437 amrex::InterpFromCoarseLevel(*mf_to_fill, time, *mf_crse, 0, icomp, ncomp, geom[lev-1], geom[lev],
438 null_bc, 0, null_bc, 0, refRatio(lev-1),
439 mapper, domain_bcs_type, bccomp);
440}
441
442/**
443 * @param[in ] lev level to fill at
444 * @param[in ] lev MultiFab of cell-centered velocities
445 */
446void
447REMORA::FillBdyCCVels (int lev, MultiFab& mf_cc_vel)
448{
449 // Impose bc's at domain boundaries
450// for (int lev = 0; lev <= finest_level; ++lev)
451// {
452 Box domain(Geom(lev).Domain());
453
454 int ihi = domain.bigEnd(0);
455 int jhi = domain.bigEnd(1);
456 int khi = domain.bigEnd(2);
457
458 // Impose periodicity first
459 mf_cc_vel.FillBoundary(geom[lev].periodicity());
460
461#ifdef _OPENMP
462#pragma omp parallel if (Gpu::notInLaunchRegion())
463#endif
464 for (MFIter mfi(mf_cc_vel, TilingIfNotGPU()); mfi.isValid(); ++mfi)
465 {
466 // Note that we don't fill corners here -- only the cells that share a face
467 // with interior cells -- this is all that is needed to calculate vorticity
468 const Box& bx = mfi.tilebox();
469 const Array4<Real>& vel_arr = mf_cc_vel.array(mfi);
470
471 if (!Geom(lev).isPeriodic(0)) {
472 // Low-x side
473 if (bx.smallEnd(0) <= domain.smallEnd(0)) {
474 Real mult = (phys_bc_type[BCVars::xvel_bc][0] == REMORA_BC::no_slip_wall) ? -1. : 1.;
475 ParallelFor(makeSlab(bx,0,0), [=] AMREX_GPU_DEVICE(int , int j, int k) noexcept
476 {
477 vel_arr(-1,j,k,1) = mult*vel_arr(0,j,k,1); // v
478 vel_arr(-1,j,k,2) = mult*vel_arr(0,j,k,2); // w
479 });
480 }
481
482 // High-x side
483 if (bx.bigEnd(0) >= domain.bigEnd(0)) {
484 Real mult = (phys_bc_type[BCVars::xvel_bc][3] == REMORA_BC::no_slip_wall) ? -1. : 1.;
485 ParallelFor(makeSlab(bx,0,0), [=] AMREX_GPU_DEVICE(int , int j, int k) noexcept
486 {
487 vel_arr(ihi+1,j,k,1) = mult*vel_arr(ihi,j,k,1); // v
488 vel_arr(ihi+1,j,k,2) = mult*vel_arr(ihi,j,k,2); // w
489 });
490 }
491 } // !periodic
492
493 if (!Geom(lev).isPeriodic(1)) {
494 // Low-y side
495 if (bx.smallEnd(1) <= domain.smallEnd(1)) {
496 Real mult = (phys_bc_type[BCVars::yvel_bc][1] == REMORA_BC::no_slip_wall) ? -1. : 1.;
497 ParallelFor(makeSlab(bx,1,0), [=] AMREX_GPU_DEVICE(int i, int , int k) noexcept
498 {
499 vel_arr(i,-1,k,0) = mult*vel_arr(i,0,k,0); // u
500 vel_arr(i,-1,k,2) = mult*vel_arr(i,0,k,2); // w
501 });
502 }
503
504 // High-y side
505 if (bx.bigEnd(1) >= domain.bigEnd(1)) {
506 Real mult = (phys_bc_type[BCVars::yvel_bc][4] == REMORA_BC::no_slip_wall) ? -1. : 1.;
507 ParallelFor(makeSlab(bx,1,0), [=] AMREX_GPU_DEVICE(int i, int , int k) noexcept
508 {
509 vel_arr(i,jhi+1,k,0) = mult*vel_arr(i,jhi,k,0); // u
510 vel_arr(i,jhi+1,k,2) = mult*-vel_arr(i,jhi,k,2); // w
511 });
512 }
513 } // !periodic
514
515 if (!Geom(lev).isPeriodic(2)) {
516 // Low-z side
517 if (bx.smallEnd(2) <= domain.smallEnd(2)) {
518 Real mult = (phys_bc_type[BCVars::zvel_bc][2] == REMORA_BC::no_slip_wall) ? -1. : 1.;
519 ParallelFor(makeSlab(bx,2,0), [=] AMREX_GPU_DEVICE(int i, int j, int) noexcept
520 {
521 vel_arr(i,j,-1,0) = mult*vel_arr(i,j,0,0); // u
522 vel_arr(i,j,-1,1) = mult*vel_arr(i,j,0,1); // v
523 });
524 }
525
526 // High-z side
527 if (bx.bigEnd(2) >= domain.bigEnd(2)) {
528 Real mult = (phys_bc_type[BCVars::zvel_bc][5] == REMORA_BC::no_slip_wall) ? -1. : 1.;
529 ParallelFor(makeSlab(bx,2,0), [=] AMREX_GPU_DEVICE(int i, int j, int) noexcept
530 {
531 vel_arr(i,j,khi+1,0) = mult*vel_arr(i,j,khi,0); // u
532 vel_arr(i,j,khi+1,1) = mult*vel_arr(i,j,khi,1); // v
533 });
534 }
535 } // !periodic
536 } // MFIter
537
538// } // lev
539}
PhysBCFunctNoOp null_bc
amrex::Vector< amrex::BCRec > domain_bcs_type
vector (over BCVars) of BCRecs
Definition REMORA.H:1120
amrex::Vector< REMORAFillPatcher > FPr_v
Vector over levels of FillPatchers for v (3D)
Definition REMORA.H:1055
amrex::GpuArray< amrex::GpuArray< REMORA_BC, AMREX_SPACEDIM *2 >, BCVars::NumTypes > phys_bc_type
Array holding the "physical" boundary condition types (e.g. "inflow")
Definition REMORA.H:1131
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_mskr
land/sea mask at cell centers (2D)
Definition REMORA.H:346
amrex::Vector< REMORAFillPatcher > FPr_u
Vector over levels of FillPatchers for u (3D)
Definition REMORA.H:1053
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_msku
land/sea mask at x-faces (2D)
Definition REMORA.H:348
void FillPatchNoBC(int lev, amrex::Real time, amrex::MultiFab &mf_to_be_filled, amrex::Vector< amrex::MultiFab * > const &mfs, const int bdy_var_type=BdyVars::null, const int icomp=0, const bool fill_all=true, const bool fill_set=true)
Fill a new MultiFab by copying in phi from valid region and filling ghost cells without applying boun...
amrex::Vector< amrex::Vector< amrex::FArrayBox > > bdy_data_yhi
Vectors (over time) of Vector (over variables) of FArrayBoxs for holding Northern boundary data from ...
Definition REMORA.H:996
amrex::Real bdy_time_interval
Interval between boundary data times.
Definition REMORA.H:1001
amrex::Vector< REMORAFillPatcher > FPr_vbar
Vector over levels of FillPatchers for vbar (2D)
Definition REMORA.H:1063
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_mskv
land/sea mask at y-faces (2D)
Definition REMORA.H:350
amrex::Vector< std::unique_ptr< REMORAPhysBCFunct > > physbcs
Vector (over level) of functors to apply physical boundary conditions.
Definition REMORA.H:1108
void FillPatch(int lev, amrex::Real time, amrex::MultiFab &mf_to_be_filled, amrex::Vector< amrex::MultiFab * > const &mfs, const int bccomp, const int bdy_var_type=BdyVars::null, const int icomp=0, const bool fill_all=true, const bool fill_set=true, const int n_not_fill=0, const int icomp_calc=0, const amrex::Real dt=amrex::Real(0.0), const amrex::MultiFab &mf_calc=amrex::MultiFab())
Fill a new MultiFab by copying in phi from valid region and filling ghost cells.
amrex::Vector< amrex::Vector< amrex::FArrayBox > > bdy_data_ylo
Vectors (over time) of Vector (over variables) of FArrayBoxs for holding Southern boundary data from ...
Definition REMORA.H:994
void fill_from_bdyfiles(amrex::MultiFab &mf_to_fill, const amrex::MultiFab &mf_mask, const amrex::Real time, const int bccomp, const int bdy_var_type, const int icomp_to_fill, const int icomp_calc=0, const amrex::MultiFab &mf_calc=amrex::MultiFab(), const amrex::Real=amrex::Real(0.0))
Fill boundary data from netcdf file.
void FillBdyCCVels(int lev, amrex::MultiFab &mf_cc_vel)
Fill the physical boundary conditions for cell-centered velocity (diagnostic only)
TimeInterpolatedData GetDataAtTime(int lev, amrex::Real time)
utility to copy in data from old and/or new state into another multifab
amrex::Vector< REMORAFillPatcher > FPr_c
Vector over levels of FillPatchers for scalars.
Definition REMORA.H:1051
amrex::Vector< REMORAFillPatcher > FPr_w
Vector over levels of FillPatchers for w.
Definition REMORA.H:1057
amrex::Vector< amrex::Real > t_new
new time at each level
Definition REMORA.H:1098
static SolverChoice solverChoice
Container for algorithmic choices.
Definition REMORA.H:1221
int cf_set_width
Width for fixing values at coarse-fine interface.
Definition REMORA.H:1048
amrex::Vector< amrex::Vector< amrex::FArrayBox > > bdy_data_xhi
Vectors (over time) of Vector (over variables) of FArrayBoxs for holding Eastern boundary data from f...
Definition REMORA.H:992
amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NCONS+8 > m_bc_extdir_vals
Array holding the Dirichlet values at walls which need them.
Definition REMORA.H:1128
amrex::Vector< REMORAFillPatcher > FPr_ubar
Vector over levels of FillPatchers for ubar (2D)
Definition REMORA.H:1061
void FillCoarsePatch(int lev, amrex::Real time, amrex::MultiFab *mf_fine, amrex::MultiFab *mf_crse, const int icomp=0, const bool fill_all=true)
fill an entire multifab by interpolating from the coarser level
amrex::Vector< amrex::Vector< amrex::FArrayBox > > bdy_data_xlo
Vectors (over time) of Vector (over variables) of FArrayBoxs for holding Western boundary data from f...
Definition REMORA.H:990
amrex::Vector< amrex::Real > t_old
old time at each level
Definition REMORA.H:1100
amrex::Gpu::DeviceVector< amrex::BCRec > domain_bcs_type_d
GPU vector (over BCVars) of BCRecs.
Definition REMORA.H:1122
IC_BC_Type ic_bc_type
void set_time(amrex::Real time)
void add_var(amrex::MultiFab *var_data, int own_data)
amrex::MultiFab & get_var(int var_idx)