/home/runner/work/kynema-sgf/kynema-sgf/src/core/FieldFillPatchOps.H Source File

Kynema-SGF API: /home/runner/work/kynema-sgf/kynema-sgf/src/core/FieldFillPatchOps.H Source File
Kynema-SGF API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
FieldFillPatchOps.H
Go to the documentation of this file.
1#ifndef FIELDFILLPATCHOPS_H
2#define FIELDFILLPATCHOPS_H
3
4#include <utility>
5
6#include "src/core/Field.H"
7#include "src/core/SimTime.H"
10#include "src/core/FieldBCOps.H"
11
12#include "AMReX_AmrCore.H"
13#include "AMReX_MultiFab.H"
14#include "AMReX_REAL.H"
15#include "AMReX_PhysBCFunct.H"
16#include "AMReX_FillPatchUtil.H"
17
32
33namespace kynema_sgf {
34
41{
42public:
44
45 virtual ~FieldFillPatchOpsBase() = default;
46
49 virtual void fillpatch(
50 int lev,
51 amrex::Real time,
52 amrex::MultiFab& mfab,
53 const amrex::IntVect& nghost,
54 FieldState fstate = FieldState::New) = 0;
55
59 int lev,
60 amrex::Real time,
61 amrex::Array<amrex::MultiFab*, AMREX_SPACEDIM>& mfabs,
62 amrex::Array<amrex::MultiFab*, AMREX_SPACEDIM>& ffabs,
63 amrex::Array<amrex::MultiFab*, AMREX_SPACEDIM>& cfabs,
64 const amrex::IntVect& nghost,
65 const amrex::Vector<amrex::BCRec>& fillpatch_bcrec,
66 const amrex::Vector<amrex::BCRec>& physbc_bcrec,
67 FieldState fstate = FieldState::New) = 0;
68
71 int lev,
72 amrex::Real time,
73 amrex::MultiFab& mfab,
74 const amrex::IntVect& nghost,
75 FieldState fstate = FieldState::New) = 0;
76
78 virtual void fillphysbc(
79 int lev,
80 amrex::Real time,
81 amrex::MultiFab& mfab,
82 const amrex::IntVect& nghost,
83 FieldState fstate = FieldState::New) = 0;
84
85 virtual void fillphysbc_type(
86 int lev,
87 amrex::Real time,
88 amrex::BCType::mathematicalBndryTypes bctype,
89 amrex::MultiFab& mfab,
90 const amrex::IntVect& nghost,
91 FieldState fstate = FieldState::New) = 0;
92
93 virtual void set_inflow(
94 int lev,
95 amrex::Real time,
96 amrex::MultiFab& mfab,
97 const amrex::IntVect& nghost,
98 FieldState fstate = FieldState::New) = 0;
99
101 int lev,
102 amrex::Real time,
103 amrex::Array<amrex::MultiFab*, AMREX_SPACEDIM> mfabs) = 0;
104};
105
111{
112public:
113 FieldFillConstScalar(Field& /*unused*/, amrex::Real fill_val)
114 : m_fill_val(fill_val)
115 {}
116
118 int /*lev*/,
119 amrex::Real /*time*/,
120 amrex::MultiFab& mfab,
121 const amrex::IntVect& /*nghost*/,
122 const FieldState /*fstate*/) override
123 {
124 mfab.setVal(m_fill_val);
125 }
126
128 int /*lev*/,
129 amrex::Real /*time*/,
130 amrex::Array<amrex::MultiFab*, AMREX_SPACEDIM>& mfabs,
131 amrex::Array<amrex::MultiFab*, AMREX_SPACEDIM>& /*ffabs*/,
132 amrex::Array<amrex::MultiFab*, AMREX_SPACEDIM>& /*cfabs*/,
133 const amrex::IntVect& /*nghost*/,
134 const amrex::Vector<amrex::BCRec>& /*bcrec*/,
135 const amrex::Vector<amrex::BCRec>& /*bcrec*/,
136 const FieldState /*fstate*/) override
137 {
138 for (const auto& mfab : mfabs) {
139 mfab->setVal(m_fill_val);
140 }
141 }
142
144 int /*lev*/,
145 amrex::Real /*time*/,
146 amrex::MultiFab& mfab,
147 const amrex::IntVect& /*nghost*/,
148 const FieldState /*fstate*/) override
149 {
150 mfab.setVal(m_fill_val);
151 }
152
154 int /*lev*/,
155 amrex::Real /*time*/,
156 amrex::MultiFab& mfab,
157 const amrex::IntVect& /*nghost*/,
158 const FieldState /*fstate*/) override
159 {
160 mfab.setVal(m_fill_val);
161 }
162
164 int /*lev*/,
165 amrex::Real /*time*/,
166 amrex::MultiFab& /*mfab*/,
167 const amrex::IntVect& /*nghost*/,
168 const FieldState /*fstate*/) override
169 {
170 amrex::Abort("FieldFillConstScalar::set_inflow is not implemented");
171 }
172
173private:
174 amrex::Real m_fill_val;
175};
176
182template <typename BCOpCreator>
184{
185public:
196 Field& field,
197 const amrex::AmrCore& mesh,
198 const SimTime& time,
201 : m_time(time)
202 , m_mesh(mesh)
203 , m_field(field)
204 , m_op(field)
205 , m_mapper(field_impl::get_interpolation_operator(itype))
206 , m_face_mapper(field_impl::get_interpolation_operator(face_itype))
207 {
209 }
210
212 Field& field,
213 const amrex::AmrCore& mesh,
214 const SimTime& time,
215 const BCOpCreator& bc_op,
218 : m_time(time)
219 , m_mesh(mesh)
220 , m_field(field)
221 , m_op(bc_op)
222 , m_mapper(field_impl::get_interpolation_operator(itype))
223 , m_face_mapper(field_impl::get_interpolation_operator(face_itype))
224 {
226 }
227
234 amrex::Vector<amrex::MultiFab*> get_mfab_vec(int lev)
235 {
236 const int nstates = amrex::min(m_field.num_time_states(), 2);
237 amrex::Vector<amrex::MultiFab*> ret;
238
239 // The states in the FieldInfo data are ordered from newest to oldest,
240 // so swap the order
241 for (int i = nstates - 1; i >= 0; --i) {
242 const auto fstate = static_cast<FieldState>(i);
243 ret.push_back(&m_field.state(fstate)(lev));
244 }
245 return ret;
246 }
247
248 // Version that does no interpolation in time
249
251 int lev,
252 amrex::Real time,
253 amrex::MultiFab& mfab,
254 const amrex::IntVect& nghost,
255 const FieldState fstate = FieldState::New) override
256 {
257 auto& fld = m_field.state(fstate);
258 if (lev == 0) {
259 amrex::PhysBCFunct<amrex::GpuBndryFuncFab<Functor>> physbc(
260 m_mesh.Geom(lev), m_field.bcrec(), bc_functor());
261
262 amrex::FillPatchSingleLevel(
263 mfab, nghost, time, {&fld(lev)}, {time}, 0, 0,
264 m_field.num_comp(), m_mesh.Geom(lev), physbc, 0);
265 } else {
266 amrex::PhysBCFunct<amrex::GpuBndryFuncFab<Functor>> cphysbc(
267 m_mesh.Geom(lev - 1), m_field.bcrec(), bc_functor());
268
269 amrex::PhysBCFunct<amrex::GpuBndryFuncFab<Functor>> fphysbc(
270 m_mesh.Geom(lev), m_field.bcrec(), bc_functor());
271
272 amrex::FillPatchTwoLevels(
273 mfab, nghost, time, {&fld(lev - 1)}, {time}, {&fld(lev)},
274 {time}, 0, 0, m_field.num_comp(), m_mesh.Geom(lev - 1),
275 m_mesh.Geom(lev), cphysbc, 0, fphysbc, 0,
276 m_mesh.refRatio(lev - 1), m_mapper, m_field.bcrec(), 0);
277 }
278 }
279
281 int lev,
282 amrex::Real time,
283 amrex::Array<amrex::MultiFab*, AMREX_SPACEDIM>& mfabs,
284 amrex::Array<amrex::MultiFab*, AMREX_SPACEDIM>& ffabs,
285 amrex::Array<amrex::MultiFab*, AMREX_SPACEDIM>& cfabs,
286 const amrex::IntVect& nghost,
287 const amrex::Vector<amrex::BCRec>& fillpatch_bcrec,
288 const amrex::Vector<amrex::BCRec>& physbc_bcrec,
289 const FieldState /*fstate = FieldState::New*/) override
290 {
291 if (lev == 0) {
292 for (int i = 0; std::cmp_less(i, mfabs.size()); i++) {
293 amrex::PhysBCFunct<amrex::GpuBndryFuncFab<Functor>> physbc(
294 m_mesh.Geom(lev), physbc_bcrec, bc_functor_face(i));
295 amrex::FillPatchSingleLevel(
296 *mfabs[i], nghost, time, {ffabs[i]}, {time}, 0, 0, 1,
297 m_mesh.Geom(lev), physbc, i);
298 }
299 } else {
300 AMREX_D_TERM(
301 amrex::PhysBCFunct<amrex::GpuBndryFuncFab<Functor>> cphysbcx(
302 m_mesh.Geom(lev - 1), physbc_bcrec, bc_functor_face(0));
303 , amrex::PhysBCFunct<amrex::GpuBndryFuncFab<Functor>> cphysbcy(
304 m_mesh.Geom(lev - 1), physbc_bcrec, bc_functor_face(1));
305 , amrex::PhysBCFunct<amrex::GpuBndryFuncFab<Functor>> cphysbcz(
306 m_mesh.Geom(lev - 1), physbc_bcrec, bc_functor_face(2)););
307
308 AMREX_D_TERM(
309 amrex::PhysBCFunct<amrex::GpuBndryFuncFab<Functor>> fphysbcx(
310 m_mesh.Geom(lev), physbc_bcrec, bc_functor_face(0));
311 , amrex::PhysBCFunct<amrex::GpuBndryFuncFab<Functor>> fphysbcy(
312 m_mesh.Geom(lev), physbc_bcrec, bc_functor_face(1));
313 , amrex::PhysBCFunct<amrex::GpuBndryFuncFab<Functor>> fphysbcz(
314 m_mesh.Geom(lev), physbc_bcrec, bc_functor_face(2)););
315
316 amrex::Array<
317 amrex::PhysBCFunct<amrex::GpuBndryFuncFab<Functor>>,
318 AMREX_SPACEDIM>
319 cphysbc_arr = {AMREX_D_DECL(cphysbcx, cphysbcy, cphysbcz)};
320
321 amrex::Array<
322 amrex::PhysBCFunct<amrex::GpuBndryFuncFab<Functor>>,
323 AMREX_SPACEDIM>
324 fphysbc_arr = {AMREX_D_DECL(fphysbcx, fphysbcy, fphysbcz)};
325
326 amrex::Array<int, AMREX_SPACEDIM> idx = {AMREX_D_DECL(0, 1, 2)};
327 const amrex::Array<amrex::Vector<amrex::BCRec>, AMREX_SPACEDIM>
328 bcrec_arr = {AMREX_D_DECL(
329 fillpatch_bcrec, fillpatch_bcrec, fillpatch_bcrec)};
330
331 amrex::FillPatchTwoLevels(
332 mfabs, nghost, time, {cfabs}, {time}, {ffabs}, {time}, 0, 0, 1,
333 m_mesh.Geom(lev - 1), m_mesh.Geom(lev), cphysbc_arr, idx,
334 fphysbc_arr, idx, m_mesh.refRatio(lev - 1), m_face_mapper,
335 bcrec_arr, idx);
336 }
337 }
338
340 int lev,
341 amrex::Real time,
342 amrex::MultiFab& mfab,
343 const amrex::IntVect& nghost,
344 const FieldState fstate = FieldState::New) override
345 {
346 const auto& fld = m_field.state(fstate);
347 amrex::PhysBCFunct<amrex::GpuBndryFuncFab<Functor>> cphysbc(
348 m_mesh.Geom(lev - 1), m_field.bcrec(), bc_functor());
349
350 amrex::PhysBCFunct<amrex::GpuBndryFuncFab<Functor>> fphysbc(
351 m_mesh.Geom(lev), m_field.bcrec(), bc_functor());
352
353 amrex::InterpFromCoarseLevel(
354 mfab, nghost, time, fld(lev - 1), 0, 0, m_field.num_comp(),
355 m_mesh.Geom(lev - 1), m_mesh.Geom(lev), cphysbc, 0, fphysbc, 0,
356 m_mesh.refRatio(lev - 1), m_mapper, m_field.bcrec(), 0);
357 }
358
360 int lev,
361 amrex::Real time,
362 amrex::MultiFab& mfab,
363 const amrex::IntVect& nghost,
364 const FieldState /*fstate*/) override
365 {
366 amrex::PhysBCFunct<amrex::GpuBndryFuncFab<Functor>> physbc(
367 m_mesh.Geom(lev), m_field.bcrec(), bc_functor());
368 physbc.FillBoundary(mfab, 0, m_field.num_comp(), nghost, time, 0);
369 }
370
372 int lev,
373 amrex::Real time,
374 amrex::BCType::mathematicalBndryTypes bctype,
375 amrex::MultiFab& mfab,
376 const amrex::IntVect& nghost,
377 const FieldState /*fstate*/) override
378 {
379 amrex::Vector<amrex::BCRec> bcrec(m_field.num_comp());
380 for (int i = 0; i < m_field.num_comp(); ++i) {
381 for (int dir = 0; dir < AMREX_SPACEDIM; ++dir) {
382 bcrec[i].setLo(dir, bctype);
383 bcrec[i].setHi(dir, bctype);
384 }
385 }
386 amrex::PhysBCFunct<amrex::GpuBndryFuncFab<Functor>> physbc(
387 m_mesh.Geom(lev), bcrec, bc_functor());
388 physbc.FillBoundary(mfab, 0, m_field.num_comp(), nghost, time, 0);
389 }
390
392 int lev,
393 amrex::Real time,
394 amrex::MultiFab& mfab,
395 const amrex::IntVect& nghost,
396 const FieldState /*fstate*/) override
397 {
398 const int ng = nghost[0];
399 const auto& bctype = m_field.bc_type();
400 const auto& geom = m_mesh.Geom(lev);
401 const auto& gdata = geom.data();
402 const auto& domain = geom.growPeriodicDomain(ng);
403 const auto& bcfunc = bc_functor();
404 const auto& ncomp = m_field.num_comp();
405
406 for (amrex::OrientationIter oit; oit != nullptr; ++oit) {
407 const auto ori = oit();
408 if ((bctype[ori] != BC::mass_inflow) &&
409 (bctype[ori] != BC::mass_inflow_outflow)) {
410 continue;
411 }
412
413 const int idir = ori.coordDir();
414 const auto& dbx =
415 ori.isLow() ? amrex::adjCellLo(domain, idir, nghost[idir])
416 : amrex::adjCellHi(domain, idir, nghost[idir]);
417
418#ifdef AMREX_USE_OMP
419#pragma omp parallel if (amrex::Gpu::notInLaunchRegion())
420#endif
421 for (amrex::MFIter mfi(mfab); mfi.isValid(); ++mfi) {
422 const auto& gbx = amrex::grow(mfi.validbox(), nghost);
423 const auto& bx = gbx & dbx;
424 if (!bx.ok()) {
425 continue;
426 }
427
428 const auto& marr = mfab[mfi].array();
429 amrex::ParallelFor(
430 bx, [=] AMREX_GPU_DEVICE(
431 const int i, const int j, const int k) {
432 for (int n = 0; n < ncomp; ++n) {
433 bcfunc.set_inflow(
434 {i, j, k}, marr, gdata, time, ori, n, 0, 0);
435 }
436 });
437 }
438 }
439 }
440
442 const int lev,
443 const amrex::Real time,
444 const amrex::Array<amrex::MultiFab*, AMREX_SPACEDIM> mfabs) override
445 {
446 const auto& bctype = m_field.bc_type();
447 const auto& geom = m_mesh.Geom(lev);
448 const auto& gdata = geom.data();
449 const auto& bcfunc = bc_functor();
450
451 for (amrex::OrientationIter oit; oit != nullptr; ++oit) {
452 const auto ori = oit();
453 if ((bctype[ori] != BC::mass_inflow) &&
454 (bctype[ori] != BC::mass_inflow_outflow) &&
455 (bctype[ori] != BC::wave_generation)) {
456 continue;
457 }
458
459 const int idir = ori.coordDir();
460 const auto& domain_box = geom.Domain();
461 for (int fdir = 0; fdir < AMREX_SPACEDIM; ++fdir) {
462
463 // Only face-normal velocities populated here
464 if (idir != fdir) {
465 continue;
466 }
467 const auto& dbx = ori.isLow() ? amrex::bdryLo(domain_box, idir)
468 : amrex::bdryHi(domain_box, idir);
469
470 auto& mfab = *mfabs[fdir];
471#ifdef AMREX_USE_OMP
472#pragma omp parallel if (amrex::Gpu::notInLaunchRegion())
473#endif
474 for (amrex::MFIter mfi(mfab); mfi.isValid(); ++mfi) {
475 const auto& vbx = mfi.validbox();
476 const auto& bx = vbx & dbx;
477 if (!bx.ok()) {
478 continue;
479 }
480
481 const auto& marr = mfab[mfi].array();
482 amrex::FArrayBox tmp_fab(
483 bx, mfab.nComp(), amrex::The_Async_Arena());
484 amrex::Array4<amrex::Real> const& tmp_marr =
485 tmp_fab.array();
486
487 amrex::ParallelFor(
488 bx, [=] AMREX_GPU_DEVICE(
489 const int i, const int j, const int k) {
490 bcfunc.set_inflow(
491 {i, j, k}, tmp_marr, gdata, time, ori, 0, 0,
492 fdir);
493
494 const bool is_outflow =
495 (ori.isLow() && tmp_marr(i, j, k) < 0) ||
496 (ori.isHigh() && tmp_marr(i, j, k) > 0);
497 if ((bctype[ori] == BC::mass_inflow_outflow) &&
498 is_outflow) {
499 marr(i, j, k) = marr(i, j, k);
500 } else {
501 marr(i, j, k) = tmp_marr(i, j, k);
502 }
503 });
504 }
505 }
506 }
507 }
508
509protected:
510 Functor bc_functor() { return m_op(); }
511
512 Functor bc_functor_face(const int face_dir) { return m_op(face_dir); }
513
515 {
516 if (std::any_of(
517 m_mesh.refRatio().begin(), m_mesh.refRatio().end(),
518 [](amrex::IntVect iv) { return iv != amrex::IntVect(2); })) {
519 amrex::Print()
520 << "WARNING: Changing the face interpolator to FaceLinear "
521 "because a refinement ratio is different than 2"
522 << '\n';
525 }
526 }
527
529 const amrex::AmrCore& m_mesh;
531
533
535 amrex::Interpolater* m_mapper;
536
538 amrex::Interpolater* m_face_mapper;
539};
540
541} // namespace kynema_sgf
542
543#endif /* FIELDFILLPATCHOPS_H */
void fillpatch_sibling_fields(int, amrex::Real, amrex::Array< amrex::MultiFab *, AMREX_SPACEDIM > &mfabs, amrex::Array< amrex::MultiFab *, AMREX_SPACEDIM > &, amrex::Array< amrex::MultiFab *, AMREX_SPACEDIM > &, const amrex::IntVect &, const amrex::Vector< amrex::BCRec > &, const amrex::Vector< amrex::BCRec > &, const FieldState) override
Implementation that handles filling patches on a single level as well as across a coarse-fine interfa...
Definition FieldFillPatchOps.H:127
void fillphysbc(int, amrex::Real, amrex::MultiFab &mfab, const amrex::IntVect &, const FieldState) override
Implementation that handles filling physical boundary conditions.
Definition FieldFillPatchOps.H:153
void set_inflow(int, amrex::Real, amrex::MultiFab &, const amrex::IntVect &, const FieldState) override
Definition FieldFillPatchOps.H:163
void fillpatch_from_coarse(int, amrex::Real, amrex::MultiFab &mfab, const amrex::IntVect &, const FieldState) override
Implementation that handles filling patches from a coarse to fine level.
Definition FieldFillPatchOps.H:143
void fillpatch(int, amrex::Real, amrex::MultiFab &mfab, const amrex::IntVect &, const FieldState) override
Implementation that handles filling patches on a single level as well as across a coarse-fine interfa...
Definition FieldFillPatchOps.H:117
amrex::Real m_fill_val
Definition FieldFillPatchOps.H:174
FieldFillConstScalar(Field &, amrex::Real fill_val)
Definition FieldFillPatchOps.H:113
virtual void fillpatch(int lev, amrex::Real time, amrex::MultiFab &mfab, const amrex::IntVect &nghost, FieldState fstate=FieldState::New)=0
Implementation that handles filling patches on a single level as well as across a coarse-fine interfa...
virtual void fillpatch_sibling_fields(int lev, amrex::Real time, amrex::Array< amrex::MultiFab *, AMREX_SPACEDIM > &mfabs, amrex::Array< amrex::MultiFab *, AMREX_SPACEDIM > &ffabs, amrex::Array< amrex::MultiFab *, AMREX_SPACEDIM > &cfabs, const amrex::IntVect &nghost, const amrex::Vector< amrex::BCRec > &fillpatch_bcrec, const amrex::Vector< amrex::BCRec > &physbc_bcrec, FieldState fstate=FieldState::New)=0
Implementation that handles filling patches on a single level as well as across a coarse-fine interfa...
virtual void set_inflow_sibling_fields(int lev, amrex::Real time, amrex::Array< amrex::MultiFab *, AMREX_SPACEDIM > mfabs)=0
virtual void fillphysbc_type(int lev, amrex::Real time, amrex::BCType::mathematicalBndryTypes bctype, amrex::MultiFab &mfab, const amrex::IntVect &nghost, FieldState fstate=FieldState::New)=0
virtual void set_inflow(int lev, amrex::Real time, amrex::MultiFab &mfab, const amrex::IntVect &nghost, FieldState fstate=FieldState::New)=0
virtual void fillphysbc(int lev, amrex::Real time, amrex::MultiFab &mfab, const amrex::IntVect &nghost, FieldState fstate=FieldState::New)=0
Implementation that handles filling physical boundary conditions.
virtual ~FieldFillPatchOpsBase()=default
virtual void fillpatch_from_coarse(int lev, amrex::Real time, amrex::MultiFab &mfab, const amrex::IntVect &nghost, FieldState fstate=FieldState::New)=0
Implementation that handles filling patches from a coarse to fine level.
void fillpatch(int lev, amrex::Real time, amrex::MultiFab &mfab, const amrex::IntVect &nghost, const FieldState fstate=FieldState::New) override
Implementation that handles filling patches on a single level as well as across a coarse-fine interfa...
Definition FieldFillPatchOps.H:250
FieldFillPatchOps(Field &field, const amrex::AmrCore &mesh, const SimTime &time, FieldInterpolator itype=FieldInterpolator::CellConsLinear, FieldInterpolator face_itype=FieldInterpolator::FaceDivFree)
Definition FieldFillPatchOps.H:195
amrex::Vector< amrex::MultiFab * > get_mfab_vec(int lev)
Definition FieldFillPatchOps.H:234
void set_inflow_sibling_fields(const int lev, const amrex::Real time, const amrex::Array< amrex::MultiFab *, AMREX_SPACEDIM > mfabs) override
Definition FieldFillPatchOps.H:441
amrex::Interpolater * m_mapper
Function that handles interpolation from coarse to fine level.
Definition FieldFillPatchOps.H:535
void fillpatch_sibling_fields(int lev, amrex::Real time, amrex::Array< amrex::MultiFab *, AMREX_SPACEDIM > &mfabs, amrex::Array< amrex::MultiFab *, AMREX_SPACEDIM > &ffabs, amrex::Array< amrex::MultiFab *, AMREX_SPACEDIM > &cfabs, const amrex::IntVect &nghost, const amrex::Vector< amrex::BCRec > &fillpatch_bcrec, const amrex::Vector< amrex::BCRec > &physbc_bcrec, const FieldState) override
Implementation that handles filling patches on a single level as well as across a coarse-fine interfa...
Definition FieldFillPatchOps.H:280
FieldFillPatchOps(Field &field, const amrex::AmrCore &mesh, const SimTime &time, const BCOpCreator &bc_op, FieldInterpolator itype=FieldInterpolator::CellConsLinear, FieldInterpolator face_itype=FieldInterpolator::FaceDivFree)
Definition FieldFillPatchOps.H:211
typename BCOpCreator::FunctorType Functor
Definition FieldFillPatchOps.H:186
void set_inflow(int lev, amrex::Real time, amrex::MultiFab &mfab, const amrex::IntVect &nghost, const FieldState) override
Definition FieldFillPatchOps.H:391
void check_face_mapper()
Definition FieldFillPatchOps.H:514
Functor bc_functor()
Definition FieldFillPatchOps.H:510
void fillphysbc_type(int lev, amrex::Real time, amrex::BCType::mathematicalBndryTypes bctype, amrex::MultiFab &mfab, const amrex::IntVect &nghost, const FieldState) override
Definition FieldFillPatchOps.H:371
void fillpatch_from_coarse(int lev, amrex::Real time, amrex::MultiFab &mfab, const amrex::IntVect &nghost, const FieldState fstate=FieldState::New) override
Implementation that handles filling patches from a coarse to fine level.
Definition FieldFillPatchOps.H:339
amrex::Interpolater * m_face_mapper
Function that handles interpolation from coarse to fine level for faces.
Definition FieldFillPatchOps.H:538
Field & m_field
Definition FieldFillPatchOps.H:530
void fillphysbc(int lev, amrex::Real time, amrex::MultiFab &mfab, const amrex::IntVect &nghost, const FieldState) override
Implementation that handles filling physical boundary conditions.
Definition FieldFillPatchOps.H:359
const BCOpCreator m_op
Definition FieldFillPatchOps.H:532
const SimTime & m_time
Definition FieldFillPatchOps.H:528
Functor bc_functor_face(const int face_dir)
Definition FieldFillPatchOps.H:512
const amrex::AmrCore & m_mesh
Definition FieldFillPatchOps.H:529
Definition Field.H:112
Definition SimTime.H:33
AMREX_INLINE amrex::Interpolater * get_interpolation_operator(const FieldInterpolator itype)
Definition FieldUtils.H:85
FieldState
Definition FieldDescTypes.H:16
FieldInterpolator
Coarse-to-fine field interpolation options.
Definition FieldDescTypes.H:39
@ New
Same as FieldState::NP1.
Definition FieldDescTypes.H:22
@ FaceLinear
Linear face interpolation.
Definition FieldDescTypes.H:44
@ FaceDivFree
Divergence free face interpolation.
Definition FieldDescTypes.H:43
@ CellConsLinear
Linear interpolation.
Definition FieldDescTypes.H:41
@ mass_inflow_outflow
Definition incflo_enums.H:16
@ mass_inflow
Definition incflo_enums.H:15
@ wave_generation
Definition incflo_enums.H:23
Definition FieldUtils.H:8
This test case is intended as an evaluation of the momentum advection scheme.
Definition BCInterface.cpp:10
Definition FieldBCOps.H:229
DirichletOp< InflowOpType, WallOpType > FunctorType
Definition FieldBCOps.H:232