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 regsize =
m_regFAB.size(RFace, comps);
83 int irrsize =
m_irrFAB.size(R, comps);
84 int retval = regsize + irrsize;
88 pout() <<
"baseebfacefab R = " << R <<
", RFace = " << RFace <<
", comps = " << comps;
89 pout() <<
", regbox = " <<
m_regFAB.box() <<
", regsize = " << regsize <<
", irrsize = " << irrsize <<
", total = " << retval << endl;
102 unsigned char* buffer = (
unsigned char*)buf;
103 m_regFAB.linearOut(buffer, RFace, comps);
104 buffer+=
m_regFAB.size(RFace, comps);
105 m_irrFAB.linearOut(buffer, R, comps);
113 unsigned char* buffer = (
unsigned char*)buf;
114 m_regFAB.linearIn(buffer, RFace, comps);
115 buffer+=
m_regFAB.size(RFace, comps);
116 m_irrFAB.linearIn(buffer, R, comps);
120 template <
class T>
inline 141 this->
copy(overlap,comps,overlap,a_src,comps);
151 const Box& a_regionTo,
166 Box RFromCell = a_regionFrom;
168 Box RToCell = a_regionTo;
180 Box rfi = RFromCell & db;
181 Box rti = RToCell & db;
187 template <
class T>
inline 195 template <
class T>
inline 198 int a_iDir,
int a_nComp)
201 define(a_ebisBox, a_region, a_iDir, a_nComp);
206 template <
class T>
inline 210 int a_iDir,
int a_nComp)
228 Box grownRegion = a_region;
229 grownRegion.
grow(a_iDir, 1);
232 Box checkRegion = grownRegion;
244 template <
class T>
inline 252 template <
class T>
inline 263 template <
class T>
inline 272 template <
class T>
inline 282 template <
class T>
inline 291 template <
class T>
inline 301 template <
class T>
inline 311 template <
class T>
inline 321 template <
class T>
inline 331 template <
class T>
inline 341 template <
class T>
inline 351 template <
class T>
inline 360 template <
class T>
inline 370 template <
class T>
inline 382 bool isFaceHere =
false;
383 for (
int iface = 0; iface< multiFaces.size(); iface++)
385 const FaceIndex& face = multiFaces[iface];
386 if (face == a_facein)
393 returnval = &
m_irrFAB(a_facein, a_nCompLoc);
397 returnval = &
m_regFAB(ivhi, a_nCompLoc);
404 template <
class T>
inline 416 bool isFaceHere =
false;
417 for (
int iface = 0; iface< multiFaces.size(); iface++)
419 const FaceIndex& face = multiFaces[iface];
420 if (face == a_facein)
427 returnval = &
m_irrFAB(a_facein, a_nCompLoc);
431 returnval = &
m_regFAB(ivhi, a_nCompLoc);
438 template <
class T>
inline 447 #include "NamespaceFooter.H" std::ostream & pout()
Use this in place of std::cout for program output.
int m_nComp
number of data values at each face in BaseEBFaceFAB
Definition: BaseEBFaceFAB.H:273
void clear()
Definition: BaseEBFaceFABI.H:254
bool ok()
Definition: BoxIterator.H:281
const Box & getRegion() const
Definition: BaseEBFaceFABI.H:353
void setVal(const T &value)
Definition: BaseEBFaceFABI.H:265
#define CH_assert(cond)
Definition: CHArray.H:37
const EBGraph & getEBGraph() const
int sign(const CH_XD::Side::LoHiSide &a_side)
int nComp() const
Definition: BaseEBFaceFABI.H:293
bool cellCentered() const
Definition: Box.H:1939
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:431
int begin() const
Definition: Interval.H:99
Box m_region
the cell-centered region over which the BaseEBFaceFAB lives
Definition: BaseEBFaceFAB.H:282
bool contains(const IntVect &p) const
Definition: Box.H:1887
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:372
EBISBox m_ebisBox
Definition: BaseEBFaceFAB.H:287
const int SpaceDim
Definition: SPACE.H:38
bool m_verbose
Definition: BaseEBFaceFAB.H:47
void linearOut(void *buf, const Box &R, const Interval &comps) const
Definition: BaseEBFaceFABI.H:98
virtual ~BaseEBFaceFAB()
Definition: BaseEBFaceFABI.H:245
BaseFab< T > m_regFAB
data at faces between two single-valued cells
Definition: BaseEBFaceFAB.H:270
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:268
void copy(const Box &RegionFrom, const Interval &destInt, const Box &RegionTo, const BaseEBFaceFAB< T > &source, const Interval &srcInt)
Definition: BaseEBFaceFABI.H:149
bool isAllRegular() const
Definition: EBISBox.H:393
Box surroundingNodes(const Box &b, int dir)
Definition: Box.H:2161
const Box & getCellRegion() const
Definition: BaseEBFaceFABI.H:362
const EBISBox & getEBISBox() const
Definition: BaseEBFaceFABI.H:122
void linearIn(void *buf, const Box &R, const Interval &comps)
Definition: BaseEBFaceFABI.H:110
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:323
bool sameType(const Box &b) const
Definition: Box.H:1896
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:469
Iterator for low and high side.
Definition: LoHiSide.H:74
const Box & getRegion() const
Definition: MiniIFFAB.H:34
BaseEBFaceFAB()
Definition: BaseEBFaceFABI.H:188
bool isAllCovered() const
Definition: EBISBox.H:387
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:285
Box & grow(int i)
grow functions
Definition: Box.H:2263
int end() const
Definition: Interval.H:104
Box m_regionFace
the face-centered region over which the BaseEBFaceFAB lives
Definition: BaseEBFaceFAB.H:279
const Box & domainBox() const
Returns the logical computational domain.
Definition: ProblemDomain.H:887
int direction() const
Definition: BaseEBFaceFABI.H:343
bool isEmpty() const
{ Comparison Functions}
Definition: Box.H:1862
virtual void define(const EBISBox &a_ebisBox, const Box &a_region, int a_iDir, int a_nVar)
Definition: BaseEBFaceFABI.H:208
void setDefaultValues()
Definition: BaseEBFaceFABI.H:440
int m_iDir
Definition: BaseEBFaceFAB.H:276
const MiniIFFAB< T > & getMultiValuedFAB() const
Definition: BaseEBFaceFABI.H:303
bool isDefined() const
Definition: BaseEBFaceFABI.H:284