13 #ifndef _BASEEBFACEFABI_H_ 14 #define _BASEEBFACEFABI_H_ 17 #include "NamespaceHeader.H" 25 const bool& a_doMulti)
30 if (m_ebisBox.isAllRegular())
34 else if (m_ebisBox.isAllCovered())
36 m_regFAB.setVal(a_val, a_comp);
46 if ( (faces.
size()==0) || (faces.
size()>1) )
48 const int& hilo =
sign(sit());
54 m_regFAB(ivFace,a_comp) = a_val;
68 int retval = m_regFAB.size(RFace, comps);
69 retval += m_irrFAB.size(R, comps);
80 unsigned char* buffer = (
unsigned char*)buf;
81 m_regFAB.linearOut(buffer, RFace, comps);
82 buffer+= m_regFAB.size(RFace, comps);
83 m_irrFAB.linearOut(buffer, R, comps);
91 unsigned char* buffer = (
unsigned char*)buf;
92 m_regFAB.linearIn(buffer, RFace, comps);
93 buffer+= m_regFAB.size(RFace, comps);
94 m_irrFAB.linearIn(buffer, R, comps);
98 template <
class T>
inline 116 Box overlap(m_region);
119 this->copy(overlap,comps,overlap,a_src,comps);
129 const Box& a_regionTo,
143 CH_assert(m_region.contains(a_regionTo));
144 Box RFromCell = a_regionFrom;
146 Box RToCell = a_regionTo;
149 CH_assert(m_regionFace.contains(RToFace));
153 m_regFAB.copy(RFromFace, a_dstInt, RToFace, a_src.
m_regFAB, a_srcInt);
156 m_irrFAB.copy(RFromCell, a_dstInt, RToCell, a_src.
m_irrFAB, a_srcInt);
160 template <
class T>
inline 168 template <
class T>
inline 171 int a_iDir,
int a_nComp)
174 define(a_ebisBox, a_region, a_iDir, a_nComp);
179 template <
class T>
inline 183 int a_iDir,
int a_nComp)
192 m_ebisBox = a_ebisBox;
202 Box grownRegion = m_region;
203 grownRegion.
grow(a_iDir, 1);
208 m_regFAB.resize(m_regionFace, m_nComp);
210 m_irrFAB.define(a_region, m_ebisBox.getEBGraph(), m_iDir, m_nComp);
215 template <
class T>
inline 223 template <
class T>
inline 234 template <
class T>
inline 238 m_irrFAB.setVal(value);
239 m_regFAB.setVal(value);
243 template <
class T>
inline 247 m_irrFAB.setVal(ivar, value);
248 m_regFAB.setVal(value, m_regFAB.box(), ivar, 1);
253 template <
class T>
inline 257 return (m_isDefined);
262 template <
class T>
inline 272 template <
class T>
inline 282 template <
class T>
inline 292 template <
class T>
inline 302 template <
class T>
inline 312 template <
class T>
inline 322 template <
class T>
inline 331 template <
class T>
inline 341 template <
class T>
inline 346 CH_assert((a_nCompLoc >= 0)&&(a_nCompLoc < m_nComp));
353 bool isFaceHere =
false;
354 for (
int iface = 0; iface< multiFaces.size(); iface++)
356 const FaceIndex& face = multiFaces[iface];
357 if (face == a_facein)
364 returnval = &m_irrFAB(a_facein, a_nCompLoc);
368 returnval = &m_regFAB(ivhi, a_nCompLoc);
375 template <
class T>
inline 380 CH_assert((a_nCompLoc >= 0)&&(a_nCompLoc < m_nComp));
387 bool isFaceHere =
false;
388 for (
int iface = 0; iface< multiFaces.size(); iface++)
390 const FaceIndex& face = multiFaces[iface];
391 if (face == a_facein)
398 returnval = &m_irrFAB(a_facein, a_nCompLoc);
402 returnval = &m_regFAB(ivhi, a_nCompLoc);
409 template <
class T>
inline 418 #include "NamespaceFooter.H" int m_nComp
number of data values at each face in BaseEBFaceFAB
Definition: BaseEBFaceFAB.H:255
void clear()
Definition: BaseEBFaceFABI.H:225
bool ok()
Definition: BoxIterator.H:215
const Box & getRegion() const
Definition: BaseEBFaceFABI.H:324
void setVal(const T &value)
Definition: BaseEBFaceFABI.H:236
#define CH_assert(cond)
Definition: CHArray.H:37
int nComp() const
Definition: BaseEBFaceFABI.H:264
bool cellCentered() const
Definition: Box.H:1940
void setCoveredFaceVal(const T &a_val, const int &a_comp, const bool &a_doMulti=true)
Definition: BaseEBFaceFABI.H:23
Definition: FaceIndex.H:28
const ProblemDomain & getDomain() const
int size() const
Definition: Interval.H:64
int begin() const
Definition: Interval.H:86
Box m_region
the cell-centered region over which the BaseEBFaceFAB lives
Definition: BaseEBFaceFAB.H:264
bool contains(const IntVect &p) const
Definition: Box.H:1888
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:343
const int SpaceDim
Definition: SPACE.H:39
void linearOut(void *buf, const Box &R, const Interval &comps) const
Definition: BaseEBFaceFABI.H:76
virtual ~BaseEBFaceFAB()
Definition: BaseEBFaceFABI.H:216
BaseFab< T > m_regFAB
data at faces between two single-valued cells
Definition: BaseEBFaceFAB.H:252
Structure for passing component ranges in code.
Definition: Interval.H:23
int sign(const Side::LoHiSide &a_side)
MiniIFFAB< T > m_irrFAB
data at faces which abut multi-valued cells
Definition: BaseEBFaceFAB.H:250
void copy(const Box &RegionFrom, const Interval &destInt, const Box &RegionTo, const BaseEBFaceFAB< T > &source, const Interval &srcInt)
Definition: BaseEBFaceFABI.H:127
Box surroundingNodes(const Box &b, int dir)
Definition: Box.H:2166
const Box & getCellRegion() const
Definition: BaseEBFaceFABI.H:333
const EBISBox & getEBISBox() const
Definition: BaseEBFaceFABI.H:100
void linearIn(void *buf, const Box &R, const Interval &comps)
Definition: BaseEBFaceFABI.H:88
size_t size() const
Definition: Vector.H:177
int size(const Box &R, const Interval &comps) const
Definition: BaseEBFaceFABI.H:64
const BaseFab< T > & getSingleValuedFAB() const
Definition: BaseEBFaceFABI.H:294
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:161
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
Box & grow(int i)
grow functions
Definition: Box.H:2268
int end() const
Definition: Interval.H:91
Box m_regionFace
the face-centered region over which the BaseEBFaceFAB lives
Definition: BaseEBFaceFAB.H:261
const Box & domainBox() const
Returns the logical computational domain.
Definition: ProblemDomain.H:868
int direction() const
Definition: BaseEBFaceFABI.H:314
bool isEmpty() const
{ Comparison Functions}
Definition: Box.H:1863
virtual void define(const EBISBox &a_ebisBox, const Box &a_region, int a_iDir, int a_nVar)
Definition: BaseEBFaceFABI.H:181
void setDefaultValues()
Definition: BaseEBFaceFABI.H:411
int m_iDir
Definition: BaseEBFaceFAB.H:258
const MiniIFFAB< T > & getMultiValuedFAB() const
Definition: BaseEBFaceFABI.H:274
bool isDefined() const
Definition: BaseEBFaceFABI.H:255