18 #include <AMReX_ParallelDescriptor.H>
19 #include <AMReX_ParmParse.H>
20 #include <AMReX_BCRec.H>
21 #include <AMReX_PhysBCFunct.H>
22 #include <AMReX_LO_BCTYPES.H>
23 #include <AMReX_Mask.H>
24 #include <AMReX_Periodicity.H>
38 yhi = 1 + AMREX_SPACEDIM,
39 zhi = 2 + AMREX_SPACEDIM)
49 void define(
const amrex::Geometry& a_geom) { m_geom = a_geom; };
51 virtual void FillBoundary(amrex::BaseFab<T>& in,
52 const amrex::Box& box,
53 int ngrow,
int dcomp,
int ncomp,
56 const amrex::Mask* mask =
nullptr) = 0;
60 amrex::Real time,
int )
62 mf.FillBoundary(m_geom.periodicity());
63 for (amrex::MFIter mfi(mf,
true); mfi.isValid(); ++mfi)
65 const amrex::Box& box = mfi.tilebox();
66 amrex::BaseFab<T>& in = mf[mfi];
67 FillBoundary(in, box, mf.nGrow(), dcomp, ncomp, time);
72 int dcomp,
int ncomp, amrex::IntVect
const& ,
73 amrex::Real time,
int bccomp)
75 FillBoundary(mf, dcomp, ncomp, time, bccomp);
78 void operator () (amrex::FabArray<amrex::BaseFab<T>>& mf,
79 int dcomp,
int ncomp, amrex::IntVect
const& ,
80 amrex::Real time,
int bccomp)
82 FillBoundary(mf, dcomp, ncomp, time, bccomp);
87 template <
class Q = T>
88 typename std::enable_if<std::is_same<Q, amrex::Real>::value>::type
91 amrex::Real time,
int )
93 mf.FillBoundary(m_geom.periodicity());
94 for (amrex::MFIter mfi(mf,
true); mfi.isValid(); ++mfi)
96 const amrex::Box& box = mfi.tilebox();
97 amrex::BaseFab<T>& in = mf[mfi];
98 FillBoundary(in, box, mf.nGrow(), dcomp, ncomp, time);
102 template <
class Q = T>
103 typename std::enable_if<std::is_same<Q, amrex::Real>::value>::type
104 operator () (amrex::MultiFab& mf,
105 int dcomp,
int ncomp, amrex::IntVect
const& ,
106 amrex::Real time,
int bccomp)
108 FillBoundary(mf, dcomp, ncomp, time, bccomp);
112 virtual amrex::BCRec GetBCRec() = 0;
116 return { {
AMREX_D_DECL(m_geom.isPeriodic(0),m_geom.isPeriodic(1),m_geom.isPeriodic(2))} };
120 return m_geom.periodicity();
124 return m_geom.periodicity(b);