28 #include "NamespaceHeader.H" 112 void unset (
int dir);
119 bool test (
int dir)
const;
246 friend std::ostream&
operator<< (std::ostream& os,
254 friend std::istream&
operator>> (std::istream& is,
261 static unsigned char mask (
int k);
305 itype =
D_TERM6((iv[0]?1:0), | ((iv[1]?1:0)<<1), | ((iv[2]?1:0)<<2),
306 | ((iv[3]?1:0)<<3), | ((iv[4]?1:0)<<4), | ((iv[5]?1:0)<<5));
312 itype =
D_TERM6((iv[0]?1:0), | ((iv[1]?1:0)<<1), | ((iv[2]?1:0)<<2),
313 | ((iv[3]?1:0)<<3), | ((iv[4]?1:0)<<4), | ((iv[5]?1:0)<<5));
322 | (l<<3), | (m<<4), | (n<<5));
532 void define(
const IntVect& small,
554 void define(
const IntVect& small,
565 void define(
const Box& b);
579 const IntVect& smallEnd ()
const;
595 int smallEnd (
int dir)
const;
602 const IntVect& bigEnd ()
const;
611 int bigEnd (
int dir)
const;
620 const int* loVect ()
const;
629 const int* hiVect ()
const;
638 const int* getVect ()
const;
647 long index (
const IntVect& v)
const;
692 int size (
int dir)
const;
701 size_t numPts ()
const;
710 size_t volume ()
const;
719 int longside (
int& dir)
const;
726 int longside ()
const;
735 int shortside (
int& dir)
const;
742 int shortside ()
const;
767 bool contains (
const IntVect& p)
const;
776 bool contains (
const Box& b)
const;
785 bool intersects (
const Box& b)
const;
796 bool intersectsNotEmpty (
const Box& b)
const;
804 bool sameSize (
const Box& b)
const;
811 bool sameType (
const Box &b)
const;
821 bool eq(
const Box& b)
const;
829 bool neq(
const Box& b)
const;
850 bool lt(
const Box& rhs)
const;
878 Box& setSmall (
int dir,
898 Box& setBig (
int dir,
907 Box& setRange (
int dir,
952 Box& convert (
int dir,
976 Box& surroundingNodes_int(
int dir);
1022 Box& enclosedCells_int (
int dir);
1058 Box& shift (
int dir,
1085 Box& shiftHalf (
int dir,
1089 void convertOldToNew(
const IntVect& a_permutation,
1091 const IntVect& a_translation);
1095 void convertNewToOld(
const IntVect& a_permutation,
1097 const IntVect& a_translation);
1241 Box operator& (
const Box&)
const;
1250 Box& operator&= (
const Box&);
1253 friend Box adjCellBox (
const Box& b,
1345 Box& growLo (
int idir,
1353 Box& growDir (
int a_idir,
1367 Box& growHi (
int idir,
1400 int refinement_ratio);
1430 const IntVect& refinement_ratio);
1442 return (test==*
this);
1480 int refinement_ratio);
1516 const IntVect& refinement_ratio);
1531 const int* shv)
const;
1565 void degenerate(
Box& a_to,
const SliceSpec& a_sliceSpec,
1566 bool* a_outofbounds=0 )
const;
1575 friend std::ostream&
operator<< (std::ostream& os,
1583 friend std::istream&
operator>> (std::istream& os,
1598 void dumpOn (std::ostream& strm)
const;
1621 void computeBoxLen ();
1622 void computeBoxLenNotEmpty();
1625 static void setTempestOutputFormat(
bool );
1638 #include "NamespaceFooter.H" 1650 void linearIn(CH_XDIR::Box& a_outputT,
const void*
const a_inBuf);
1654 void linearOut(
void*
const a_outBuf,
const CH_XDIR::Box& a_inputT);
1674 #include "NamespaceHeader.H" 1702 const IntVect& refinement_ratio);
1704 int refinement_ratio);
1706 const IntVect& refinement_ratio);
1708 int refinement_ratio);
1746 retval = smallEnd();
1763 return smallend[dir];
1791 return btype.ixType();
1798 return btype.ixType(dir);
1806 bigend[1]-smallend[1]+1,
1807 bigend[2]-smallend[2]+1,
1808 bigend[3]-smallend[3]+1,
1809 bigend[4]-smallend[4]+1,
1810 bigend[5]-smallend[5]+1));
1818 return bigend[dir]-smallend[dir]+1;
1825 return smallend.getVect();
1832 return bigend.getVect();
1839 return smallend.getVect();
1849 return D_TERM6((bigend[0] < smallend[0]),
1850 || (bigend[1] < smallend[1]),
1851 || (bigend[2] < smallend[2]),
1852 || (bigend[3] < smallend[3]),
1853 || (bigend[4] < smallend[4]),
1854 || (bigend[5] < smallend[5]) );
1866 return (bigend >= smallend);
1875 return (p >= smallend && p <= bigend);
1882 return btype == b.
btype;
1925 return !btype.any();
1933 long result = v.
vect[0]-smallend.vect[0];
1934 #if CH_SPACEDIM == 1 1936 #elif CH_SPACEDIM==2 1937 int len0=(bigend[0]-smallend[0]+1);
1938 result += len0*(v.
vect[1]-smallend.vect[1]);
1939 #elif CH_SPACEDIM==3 1940 long int len0=(bigend[0]-smallend[0]+1);
1941 long int len1=(bigend[1]-smallend[1]+1);
1942 long int dif1= v.
vect[1]-smallend.vect[1];
1943 long int dif2= v.
vect[2]-smallend.vect[2];
1944 result += len0*(dif1
1946 #elif CH_SPACEDIM==4 1947 int len0=(bigend[0]-smallend[0]+1);
1948 int len1=(bigend[1]-smallend[1]+1);
1949 int len2=(bigend[2]-smallend[2]+1);
1950 result += len0*((v.
vect[1]-smallend.vect[1])
1951 +len1*((v.
vect[2]-smallend.vect[2])
1952 +len2*(v.
vect[3]-smallend[3])));
1953 #elif CH_SPACEDIM==5 1954 int len0=(bigend[0]-smallend[0]+1);
1955 int len1=(bigend[1]-smallend[1]+1);
1956 int len2=(bigend[2]-smallend[2]+1);
1957 int len3=(bigend[3]-smallend[3]+1);
1958 result += len0*(v.
vect[1]-smallend.vect[1]
1959 +len1*(v.
vect[2]-smallend.vect[2]
1960 +len2*(v.
vect[3]-smallend[3]
1961 +len3*(v.
vect[4]-smallend[4]))));
1962 #elif CH_SPACEDIM==6 1963 int len0=(bigend[0]-smallend[0]+1);
1964 int len1=(bigend[1]-smallend[1]+1);
1965 int len2=(bigend[2]-smallend[2]+1);
1966 int len3=(bigend[3]-smallend[3]+1);
1967 int len4=(bigend[4]-smallend[4]+1);
1968 result += len0*(v.
vect[1]-smallend.vect[1]
1969 +len1*(v.
vect[2]-smallend.vect[2]
1970 +len2*(v.
vect[3]-smallend[3]
1971 +len3*(v.
vect[4]-smallend[4]
1972 +len4*(v.
vect[5]-smallend[5])))));
2023 smallend.setVal(dir,sm_index);
2046 bigend.setVal(dir,bg_index);
2059 smallend.setVal(dir,sm_index);
2060 bigend.setVal(dir,sm_index+n_cells-1);
2072 smallend.
shift(dir,nzones);
2073 bigend.
shift(dir,nzones);
2097 IntVect shft(typ - btype.ixType());
2113 bigend.
shift(dir,1);
2132 bigend.
shift(dir,-1);
2195 return(
Box().convert(btype));
2203 return Box(small,big,btype);
2233 return(
Box().convert(btype));
2241 return Box(small,big,btype);
2251 smallend.diagShift(-i);
2252 bigend.diagShift(i);
2253 if (!(bigend >= smallend)) *
this =
Box().
convert(btype);
2271 if (!(big >= small))
2286 if (!(bigend >= smallend)) *
this =
Box().
convert(btype);
2305 if (!(big >= small))
2323 smallend.
shift(idir, -n_cell);
2324 bigend.
shift(idir, n_cell);
2325 if (!(bigend >= smallend)) *
this =
Box().
convert(btype);
2338 smallend.
shift(idir, -n_cell);
2339 if (!(bigend >= smallend)) *
this =
Box().
convert(btype);
2353 growLo(idir, n_cell);
2357 growHi(idir, n_cell);
2369 bigend.
shift(idir,n_cell);
2370 if (!(bigend >= smallend)) *
this =
Box().
convert(btype);
2386 #include "NamespaceFooter.H" #define D_DECL6(a, b, c, d, e, f)
Definition: CHArray.H:39
Box & coarsen(int refinement_ratio)
Box & operator-=(const IntVect &v)
Definition: Box.H:2209
void unset(int dir)
Definition: Box.H:334
bool operator<(const Box &rhs) const
Definition: Box.H:2221
Box & refine(int refinement_ratio)
refinement
C::self_type operator-(const C &, const C &)
Definition: GenericArithmeticI.H:124
IntVect size() const
size functions
Definition: Box.H:1803
const int * hiVect() const
Definition: Box.H:1830
#define D_TERM6(a, b, c, d, e, f)
Definition: CHArray.H:40
bool operator!=(const Box &b) const
Definition: Box.H:1916
#define CH_SPACEDIM
Definition: SPACE.H:51
#define CH_assert(cond)
Definition: CHArray.H:37
Box refine(const Box &b, const IntVect &refinement_ratio)
bool operator==(const Box &b) const
Definition: Box.H:1909
bool test(int dir) const
Definition: Box.H:341
friend std::istream & operator>>(std::istream &is, IndexType &itype)
const int * getVect() const
Definition: Box.H:1837
bool cellCentered() const
Definition: Box.H:1923
bool sameSize(const Box &b) const
Definition: Box.H:1896
bool operator!=(const IndexType &t) const
Definition: Box.H:397
Box coarsen(const Box &b, const IntVect &refinement_ratio)
one dimensional dynamic array
Definition: Vector.H:53
Box operator &(const Box &) const
intersection functions
friend std::ostream & operator<<(std::ostream &os, const IndexType &itype)
const int * loVect() const
Definition: Box.H:1823
void clear()
Definition: Box.H:355
IndexType btype
Definition: Box.H:1633
Definition: SliceSpec.H:41
void flip(int i)
Definition: Box.H:376
IndexTM< T, N > diagShift(const IndexTM< T, N > &a_p, T a_s)
Definition: IndexTMI.H:388
IntVect type() const
Definition: Box.H:1789
bool contains(const IntVect &p) const
Definition: Box.H:1871
IndexType()
Definition: Box.H:282
Box copy() const
Definition: Box.H:567
int isEmpty(const box2d *)
Box operator-(const IntVect &v) const
Definition: Box.H:2229
void linearOut(void *const a_outBuf, const CH_XDIR::Box &a_inputT)
bool ok() const
Definition: Box.H:369
IntVect sideEnd(Side::LoHiSide a_side) const
Definition: Box.H:1742
Box minBox(const Box &b1, const Box &b2)
void setType(int dir, CellIndex t)
Definition: Box.H:418
const IntVect & bigEnd() const
Definition: Box.H:1768
C::self_type operator+(const C &, const C &)
Definition: GenericArithmeticI.H:120
IntVect bigend
Definition: Box.H:1631
Box & setSmall(const IntVect &sm)
{ Modification Functions}
Definition: Box.H:2007
IntVect ixType() const
Definition: Box.H:440
static const IntVect Unit
Definition: IntVect.H:659
static IndexType TheNodeType()
const IntVect & smallEnd() const
{ Accessors}
Definition: Box.H:1754
int vect[CH_SPACEDIM]
Definition: IntVect.H:686
Box surroundingNodes(const Box &b, int dir)
Definition: Box.H:2145
IndexType ixType() const
centering
Definition: Box.H:1782
Box bdryBox(const Box &b, int dir, Side::LoHiSide a_sd, int len=1)
Box & growDir(int a_idir, const Side::LoHiSide &a_sd, int a_cell)
Definition: Box.H:2347
Box grow(const Box &b, int i)
Definition: Box.H:2261
Box adjCellLo(const Box &b, int dir, int len=1)
static IndexType TheCellType()
void linearIn(CH_XDIR::Box &a_outputT, const void *const a_inBuf)
Box enclosedCells(const Box &b, int dir)
Definition: Box.H:2162
LoHiSide
Definition: LoHiSide.H:27
void set(int dir)
Definition: Box.H:327
bool nodeCentered() const
Definition: Box.H:411
Box & setRange(int dir, int sm_index, int n_cells=1)
Definition: Box.H:2053
IntVect smallend
Definition: Box.H:1630
static const IntVect Zero
Definition: IntVect.H:654
Box adjCellHi(const Box &b, int dir, int len=1)
bool sameType(const Box &b) const
Definition: Box.H:1880
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:465
long index(const IntVect &v) const
Definition: Box.H:1931
int linearSize(const CH_XDIR::Box &a_input)
void setall()
Definition: Box.H:348
static bool s_tempestOutputFormat
Definition: Box.H:1635
unsigned char itype
Definition: Box.H:266
Box & convert(IndexType typ)
centering type conversion functions
Handle to a particular group in an HDF file.
Definition: CH_HDF5.H:294
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
Definition: LoHiSide.H:30
Cell-Based or Node-Based Indices.
Definition: Box.H:41
void computeBoxLen()
{ Box Constants}
Definition: Box.H:1982
bool operator==(const IndexType &t) const
Definition: Box.H:383
Box & shift(int dir, int nzones)
shift functions
Definition: Box.H:2067
static unsigned char mask(int k)
Definition: Box.H:276
Box & operator+=(const IntVect &v)
Definition: Box.H:2179
bool cellCentered() const
Definition: Box.H:404
Box & grow(int i)
grow functions
Definition: Box.H:2247
Box & setBig(const IntVect &bg)
Definition: Box.H:2030
Box & growLo(int idir, int n_cell=1)
Definition: Box.H:2333
Box bdryHi(const Box &b, int dir, int len=1)
Box operator+(const IntVect &v) const
Definition: Box.H:2191
CellIndex
Definition: Box.H:49
bool coarsenable(int refrat) const
coarsening
Definition: Box.H:1437
IndexType & operator=(const IndexType &rhs)
Definition: Box.H:296
void computeBoxLenNotEmpty()
Definition: Box.H:1998
bool isEmpty() const
{ Comparison Functions}
Definition: Box.H:1846
bool ok() const
Definition: Box.H:1859
bool any() const
Definition: Box.H:362
Box bdryLo(const Box &b, int dir, int len=1)
bool operator<(const IndexType &t) const
Definition: Box.H:390
Box & growHi(int idir, int n_cell=1)
Definition: Box.H:2364
int operator[](int dir) const
Definition: Box.H:433