13 #ifndef _BASEEBFACEFABI_H_ 14 #define _BASEEBFACEFABI_H_ 17 #include "NamespaceHeader.H" 22 :m_irrFAB(a_interval,a_original.m_irrFAB),
23 m_regFAB(a_interval,a_original.m_regFAB),
24 m_nComp(a_interval.size()),
25 m_iDir(a_original.m_iDir),
26 m_regionFace(a_original.m_regionFace),
27 m_region(a_original.m_region),
28 m_isDefined(a_original.m_isDefined),
29 m_ebisBox(a_original.m_ebisBox)
39 const bool& a_doMulti)
60 if ( (faces.
size()==0) || (faces.
size()>1) )
62 const int& hilo =
sign(sit());
82 int retval =
m_regFAB.size(RFace, comps);
94 unsigned char* buffer = (
unsigned char*)buf;
95 m_regFAB.linearOut(buffer, RFace, comps);
96 buffer+=
m_regFAB.size(RFace, comps);
97 m_irrFAB.linearOut(buffer, R, comps);
105 unsigned char* buffer = (
unsigned char*)buf;
106 m_regFAB.linearIn(buffer, RFace, comps);
107 buffer+=
m_regFAB.size(RFace, comps);
108 m_irrFAB.linearIn(buffer, R, comps);
112 template <
class T>
inline 133 this->
copy(overlap,comps,overlap,a_src,comps);
143 const Box& a_regionTo,
158 Box RFromCell = a_regionFrom;
160 Box RToCell = a_regionTo;
172 Box rfi = RFromCell & db;
173 Box rti = RToCell & db;
179 template <
class T>
inline 187 template <
class T>
inline 190 int a_iDir,
int a_nComp)
193 define(a_ebisBox, a_region, a_iDir, a_nComp);
198 template <
class T>
inline 202 int a_iDir,
int a_nComp)
220 Box grownRegion = a_region;
221 grownRegion.
grow(a_iDir, 1);
224 Box checkRegion = grownRegion;
236 template <
class T>
inline 244 template <
class T>
inline 255 template <
class T>
inline 264 template <
class T>
inline 274 template <
class T>
inline 283 template <
class T>
inline 293 template <
class T>
inline 303 template <
class T>
inline 313 template <
class T>
inline 323 template <
class T>
inline 333 template <
class T>
inline 343 template <
class T>
inline 352 template <
class T>
inline 362 template <
class T>
inline 374 bool isFaceHere =
false;
375 for (
int iface = 0; iface< multiFaces.size(); iface++)
377 const FaceIndex& face = multiFaces[iface];
378 if (face == a_facein)
385 returnval = &
m_irrFAB(a_facein, a_nCompLoc);
389 returnval = &
m_regFAB(ivhi, a_nCompLoc);
396 template <
class T>
inline 408 bool isFaceHere =
false;
409 for (
int iface = 0; iface< multiFaces.size(); iface++)
411 const FaceIndex& face = multiFaces[iface];
412 if (face == a_facein)
419 returnval = &
m_irrFAB(a_facein, a_nCompLoc);
423 returnval = &
m_regFAB(ivhi, a_nCompLoc);
430 template <
class T>
inline 439 #include "NamespaceFooter.H" int m_nComp
number of data values at each face in BaseEBFaceFAB
Definition: BaseEBFaceFAB.H:271
void clear()
Definition: BaseEBFaceFABI.H:246
bool ok()
Definition: BoxIterator.H:281
const Box & getRegion() const
Definition: BaseEBFaceFABI.H:345
void setVal(const T &value)
Definition: BaseEBFaceFABI.H:257
#define CH_assert(cond)
Definition: CHArray.H:37
const EBGraph & getEBGraph() const
define from scratch using irregular graph
int sign(const CH_XD::Side::LoHiSide &a_side)
int nComp() const
Definition: BaseEBFaceFABI.H:285
bool cellCentered() const
Definition: Box.H:1923
void setCoveredFaceVal(const T &a_val, const int &a_comp, const bool &a_doMulti=true)
Definition: BaseEBFaceFABI.H:37
Definition: FaceIndex.H:28
const ProblemDomain & getDomain() const
int size() const
Definition: Interval.H:75
Vector< FaceIndex > getAllFaces(const IntVect &a_iv, const int &a_idir, const Side::LoHiSide &a_sd) const
Definition: EBISBox.H:477
int begin() const
Definition: Interval.H:97
Box m_region
the cell-centered region over which the BaseEBFaceFAB lives
Definition: BaseEBFaceFAB.H:280
bool contains(const IntVect &p) const
Definition: Box.H:1871
const IntVect & gridIndex(const Side::LoHiSide &a_sd) const
iterates through the IntVects of a Box
Definition: BoxIterator.H:37
Array defined at the Faces of an Box in an EBISBox.
Definition: BaseEBFaceFAB.H:43
Definition: LoHiSide.H:31
T & operator()(const FaceIndex &a_facein, int a_nVarLoc)
Definition: BaseEBFaceFABI.H:364
EBISBox m_ebisBox
Definition: BaseEBFaceFAB.H:285
const int SpaceDim
Definition: SPACE.H:38
void linearOut(void *buf, const Box &R, const Interval &comps) const
Definition: BaseEBFaceFABI.H:90
virtual ~BaseEBFaceFAB()
Definition: BaseEBFaceFABI.H:237
BaseFab< T > m_regFAB
data at faces between two single-valued cells
Definition: BaseEBFaceFAB.H:268
Structure for passing component ranges in code.
Definition: Interval.H:23
MiniIFFAB< T > m_irrFAB
data at faces which abut multi-valued cells
Definition: BaseEBFaceFAB.H:266
void copy(const Box &RegionFrom, const Interval &destInt, const Box &RegionTo, const BaseEBFaceFAB< T > &source, const Interval &srcInt)
Definition: BaseEBFaceFABI.H:141
bool isAllRegular() const
Definition: EBISBox.H:439
Box surroundingNodes(const Box &b, int dir)
Definition: Box.H:2145
const Box & getCellRegion() const
Definition: BaseEBFaceFABI.H:354
const EBISBox & getEBISBox() const
Definition: BaseEBFaceFABI.H:114
void linearIn(void *buf, const Box &R, const Interval &comps)
Definition: BaseEBFaceFABI.H:102
size_t size() const
Definition: Vector.H:192
int size(const Box &R, const Interval &comps) const
Definition: BaseEBFaceFABI.H:78
static void Error(const char *const a_msg=m_nullString, int m_exitCode=CH_DEFAULT_ERROR_CODE)
Print out message to cerr and exit with the specified exit code.
const BaseFab< T > & getSingleValuedFAB() const
Definition: BaseEBFaceFABI.H:315
bool sameType(const Box &b) const
Definition: Box.H:1880
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:465
Iterator for low and high side.
Definition: LoHiSide.H:74
const Box & getRegion() const
Definition: MiniIFFAB.H:34
BaseEBFaceFAB()
Definition: BaseEBFaceFABI.H:180
bool isAllCovered() const
Definition: EBISBox.H:433
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
bool m_isDefined
has the full define function been called for the BaseEBFaceFAB?
Definition: BaseEBFaceFAB.H:283
Box & grow(int i)
grow functions
Definition: Box.H:2247
int end() const
Definition: Interval.H:102
Box m_regionFace
the face-centered region over which the BaseEBFaceFAB lives
Definition: BaseEBFaceFAB.H:277
const Box & domainBox() const
Returns the logical computational domain.
Definition: ProblemDomain.H:887
int direction() const
Definition: BaseEBFaceFABI.H:335
bool isEmpty() const
{ Comparison Functions}
Definition: Box.H:1846
virtual void define(const EBISBox &a_ebisBox, const Box &a_region, int a_iDir, int a_nVar)
Definition: BaseEBFaceFABI.H:200
void setDefaultValues()
Definition: BaseEBFaceFABI.H:432
int m_iDir
Definition: BaseEBFaceFAB.H:274
const MiniIFFAB< T > & getMultiValuedFAB() const
Definition: BaseEBFaceFABI.H:295
bool isDefined() const
Definition: BaseEBFaceFABI.H:276