11 #ifndef _CODIMBOXIMPLEM_H_ 12 #define _CODIMBOXIMPLEM_H_ 16 #include "NamespaceHeader.H" 117 for (
int i = 1; i !=
numAI; ++i)
140 for (
int iCodim = 0; iCodim !=
numCD; ++iCodim)
145 for (
int i = 0; i != nOrient; ++i)
182 for (
int iOrient = 0; iOrient < nOrient; ++iOrient)
198 for (
int iOrient = 0; iOrient < nOrient; ++iOrient)
200 if (
m_S[iOrient] != NULL)
225 unsigned bOrient =
seq2bit(a_iOrient);
251 unsigned bOrient = 0;
261 return getS(bOrient);
269 unsigned bOrient = 0;
279 return getS(bOrient);
323 return getS((1 << a_dir0));
331 return getS((1 << a_dir0));
336 const int a_dir1)
const 343 return getS((1 << a_dir0) +
355 return getS((1 << a_dir0) +
362 const int a_dir2)
const 372 return getS((1 << a_dir0) +
389 return getS((1 << a_dir0) +
398 const int a_dir3)
const 407 return getS((1 << a_dir0) +
425 return getS((1 << a_dir0) +
436 const int a_dir4)
const 446 return getS((1 << a_dir0) +
467 return getS((1 << a_dir0) +
480 const int a_dir5)
const 491 return getS((1 << a_dir0) +
515 return getS((1 << a_dir0) +
532 for (
int iOrient = 0; iOrient < nOrient; ++iOrient)
534 m_S[iOrient]->setVal(a_x);
566 for (
int iOrient = 0; iOrient != nOrient; ++iOrient)
569 const S& srcFab = *a_src.
m_S[iOrient];
573 cdbox &= srcFab.box();
574 cdbox &=
m_S[iOrient]->box();
577 m_S[iOrient]->copy(cdbox, a_Cd, cdbox, srcFab, a_Cs);
616 for (
int iOrient = 0; iOrient != nOrient; ++iOrient)
621 cdboxd &=
m_S[iOrient]->box();
629 cdboxs.
shift(shiftVect);
633 m_S[iOrient]->copy(cdboxs, a_Cd, cdboxd,
634 *a_src.
m_S[iOrient], a_Cs);
653 for (
int iOrient = 0; iOrient != nOrient; ++iOrient)
656 totalSize += tempFab.size(cdbox, a_comps);
674 Real* buffer =
static_cast<Real*
>(a_buf);
676 for (
int iOrient = 0; iOrient != nOrient; ++iOrient)
680 const int orientSize =
m_S[iOrient]->
size(cdbox, a_comps);
681 m_S[iOrient]->linearOut(buffer, cdbox, a_comps);
682 buffer += orientSize/
sizeof(
Real);
697 Real* buffer =
static_cast<Real*
>(a_buf);
699 for (
int iOrient = 0; iOrient != nOrient; ++iOrient)
703 const int orientSize =
m_S[iOrient]->
size(cdbox, a_comps);
704 m_S[iOrient]->linearIn(buffer, cdbox, a_comps);
705 buffer += orientSize/
sizeof(
Real);
735 for (
int i = 0; i != a_codim; ++i)
743 for (
int i = iStart; i < a_codim; ++i)
797 #include "NamespaceFooter.H" ~CodimBox()
Destructor.
Definition: CodimBoxImplem.H:82
unsigned seq2bit(const int a_iOrient) const
Definition: CodimBox.H:360
#define CH_assert(cond)
Definition: CHArray.H:37
const S & operator()() const
Returns S in the given direction (codimension 0)
Definition: CodimBoxImplem.H:303
bool sameSize(const Box &b) const
Definition: Box.H:1896
Number of codimensions.
Definition: CodimBox.H:71
static int totOrient[numCD]
Definition: CodimBox.H:252
static unsigned bitOrient[CodimBox::numAI]
Definition: CodimBox.H:254
static void initialize()
Initialize static lookup tables.
Definition: CodimBoxImplem.H:101
int size(const Box &a_R, const Interval &a_comps) const
Returns size of serialized data.
Definition: CodimBoxImplem.H:648
Vector< S * > m_S
The Ses for each orientation.
Definition: CodimBox.H:272
const int SpaceDim
Definition: SPACE.H:38
static int numOrient[numCD]
Definition: CodimBox.H:250
void resize(unsigned int isize)
Definition: Vector.H:346
void clear()
Definition: Vector.H:180
Structure for passing component ranges in code.
Definition: Interval.H:23
const IntVect & smallEnd() const
{ Accessors}
Definition: Box.H:1754
void linearOut(void *a_buf, const Box &a_R, const Interval &a_comps) const
Writes a serialized representation of this CodimBox.
Definition: CodimBoxImplem.H:672
double Real
Definition: REAL.H:33
int m_nvar
Number of components in the S.
Definition: CodimBox.H:271
size_t size() const
Definition: Vector.H:192
static Box genOrientBox(int a_bOrient, Box a_cbox)
Definition: CodimBoxImplem.H:760
void copy(const Box &a_R, const Interval &a_Cd, const CodimBox &a_src, const Interval &a_Cs)
Copy from another CodimBox.
Definition: CodimBoxImplem.H:559
static void genGetDirections(const int a_codim, int a_bOrient, int *const a_dir)
Get all the orthogonal directions of an orientation (general)
Definition: CodimBoxImplem.H:731
int m_codim
Definition: CodimBox.H:269
void linearIn(void *a_buf, const Box &a_R, const Interval &a_comps)
Reads a serialized representation of this CodimBox.
Definition: CodimBoxImplem.H:695
Definition: CodimBox.H:72
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:465
void clear()
Deallocate.
Definition: CodimBoxImplem.H:193
An FArrayBox container for storage on the codimensions of a box.
Definition: CodimBox.H:65
S & getS(const unsigned i)
Return the FArray box from a bit description of the orientation.
Definition: CodimBox.H:545
int getDirection(const int a_iOrient, int a_i) const
Get the 'i'th orthogonal direction of an orientation.
Definition: CodimBoxImplem.H:222
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
Cell-Based or Node-Based Indices.
Definition: Box.H:41
void define(const int a_codim, const Box &a_box, const int a_nvar)
Full define function.
Definition: CodimBoxImplem.H:159
Box & shift(int dir, int nzones)
shift functions
Definition: Box.H:2067
void setVal(const Real a_x)
Set all values in all FAB.
Definition: CodimBoxImplem.H:529
bool isEmpty() const
{ Comparison Functions}
Definition: Box.H:1846
static int indexFAB[CodimBox::numAI]
Definition: CodimBox.H:258
Box m_box
Definition: CodimBox.H:267
CodimBox()
Default constructor.
Definition: CodimBoxImplem.H:57
Box orientBox(const int a_iOrient) const
Definition: CodimBox.H:468