Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Box Class Reference

#include <Box.H>

Collaboration diagram for Box:

Collaboration graph
[legend]
List of all members.

Public Methods

 Box ()
 {\bf Constructors}

 ~Box ()
 Box (const IntVect &small, const IntVect &big)
void define (const IntVect &small, const IntVect &big)
 Box (const IntVect &small, const int *vec_len)
 Box (const IntVect &small, const IntVect &big, const IntVect &typ)
 Box (const IntVect &small, const IntVect &big, const IndexType &t)
 Box (const Box &b)
void define (const Box &b)
Box copy () const
const IntVectsmallEnd () const
 {\bf Accessors}

IntVect sideEnd (Side::LoHiSide a_side) const
int smallEnd (int dir) const
const IntVectbigEnd () const
int bigEnd (int dir) const
const int * loVect () const
const int * hiVect () const
const int * getVect () const
long index (const IntVect &v) const
IndexType ixType () const
 centering

IntVect type () const
IndexType::CellIndex type (int dir) const
const IntVectsize () const
 size functions

int size (int dir) const
bool numPtsOK () const
long numPts () const
bool volumeOK () const
long volume () const
int longside (int &dir) const
int longside () const
int shortside (int &dir) const
int shortside () const
bool isEmpty () const
 {\bf Comparison Functions}

bool contains (const IntVect &p) const
bool contains (const Box &b) const
bool intersects (const Box &b) const
bool intersectsNotEmpty (const Box &b) const
bool sameSize (const Box &b) const
bool sameType (const Box &b) const
bool operator== (const Box &b) const
bool eq (const Box &b) const
bool operator!= (const Box &b) const
bool neq (const Box &b) const
bool cellCentered () const
bool operator< (const Box &rhs) const
bool lt (const Box &rhs) const
Box & operator= (const Box &b)
 {\bf Modification Functions}

Box & setSmall (const IntVect &sm)
Box & setSmall (int dir, int sm_index)
Box & setBig (const IntVect &bg)
Box & setBig (int dir, int bg_index)
Box & setRange (int dir, int sm_index, int n_cells=1)
Box & convert (IndexType typ)
 centering type conversion functions

Box & convert (const IntVect &typ)
Box & convert (int dir, IndexType::CellIndex typ)
Box & surroundingNodes ()
Box & surroundingNodes (int dir)
Box & surroundingNodes_int (int dir)
Box & enclosedCells ()
Box & enclosedCells (int dir)
Box & enclosedCells_int (int dir)
Box & shift (int dir, int nzones)
 shift functions

Box & shift (const IntVect &iv)
Box & shift_intvect (const IntVect &iv)
Box & shiftHalf (int dir, int num_halfs)
Box & shiftHalf (const IntVect &iv)
Box & shiftHalf_intvect (const IntVect &iv)
Box & operator+= (const IntVect &v)
Box operator+ (const IntVect &v) const
Box & operator-= (const IntVect &v)
Box operator- (const IntVect &v) const
Box operator & (const Box &) const
 intersection functions

Box & operator &= (const Box &)
Box & minBox (const Box &b)
Box & grow (int i)
 grow functions

Box & grow (const IntVect &v)
Box & grow (int idir, int n_cell)
Box & growLo (int idir, int n_cell=1)
Box & growDir (int a_idir, const Side::LoHiSide &a_sd, int a_cell)
Box & growHi (int idir, int n_cell=1)
Box & refine (int refinement_ratio)
 refinement

Box & refine (const IntVect &refinement_ratio)
Box & coarsen (int refinement_ratio)
 coarsening

Box & coarsen (const IntVect &refinement_ratio)
void next (IntVect &) const
void next (IntVect &p, const int *shv) const
Box chop (int dir, int chop_pnt)
 misc

void p () const
void dumpOn (std::ostream &strm) const
void computeBoxLen ()
 {\bf Box Constants}

void computeBoxLenNotEmpty ()

Protected Methods

bool numPtsOK (long &N) const
bool volumeOK (long &N) const

Protected Attributes

IntVect smallend
IntVect bigend
IntVect len
IndexType btype

Friends

class HDF5Handle
Box surroundingNodes (const Box &b, int dir)
Box surroundingNodes (const Box &b)
Box enclosedCells (const Box &b, int dir)
Box enclosedCells (const Box &b)
Box bdryBox (const Box &b, int dir, Side::LoHiSide a_sd, int len)
 neighbor box functions

Box bdryLo (const Box &b, int dir, int len)
Box bdryHi (const Box &b, int dir, int len)
Box adjCellLo (const Box &b, int dir, int len)
Box adjCellHi (const Box &b, int dir, int len)
Box adjCellBox (const Box &b, int dir, Side::LoHiSide a_side, int len)
Box minBox (const Box &b1, const Box &b2)
Box grow (const Box &b, int i)
Box grow (const Box &b, const IntVect &v)
Box refine (const Box &b, int refinement_ratio)
Box refine (const Box &b, const IntVect &refinement_ratio)
Box coarsen (const Box &b, int refinement_ratio)
Box coarsen (const Box &b, const IntVect &refinement_ratio)
std::ostream & operator<< (std::ostream &os, const Box &bx)
 {\bf I/O Functions}

std::istream & operator>> (std::istream &os, Box &bx)

Constructor & Destructor Documentation

Box::Box  
 

{\bf Constructors}

The default constructor. The constructed Box is empty.

Box::~Box   [inline]
 

The destructor.

Box::Box const IntVect   small,
const IntVect   big
 

Construct cell-centered type Box. It is an error if small is greater than big.

Box::Box const IntVect   small,
const int *    vec_len
 

Construct Box with specified lengths. It is an error if the lengths are negative.

Box::Box const IntVect   small,
const IntVect   big,
const IntVect   typ
 

Construct Box with given type. small and big are expected to be consistent with given type. It is an error if small is greater than big. It is an error if typ is not convertible to an IndexType.

Box::Box const IntVect   small,
const IntVect   big,
const IndexType   t
 

Construct Box with given type. small and big are expected to be consistent with given type. It is an error if small is greater than big.

Box::Box const Box &    b [inline]
 

The copy constructor.


Member Function Documentation

int Box::bigEnd int    dir const [inline]
 

Returns the coordinate of the high end of this Box in the given direction. Directions are zero-based. It is an error if not 0 <= dir < SpaceDim.

const IntVect & Box::bigEnd   const [inline]
 

Returns the upper corner of this Box.

bool Box::cellCentered   const [inline]
 

Returns true if this Box is cell-centered in all indexing directions.

Box Box::chop int    dir,
int    chop_pnt
 

misc

Chops the Box at the chop\_pnt in the dir direction returns one Box, modifies the object Box. The union of the two is the original Box. The modified Box is the low end, the returned Box is the high end. If type(dir) = CELL, the Boxes are disjoint with the chop\_pnt included in the high end (new Box). It is an ERROR if chop\_pnt is the low end of the orig Box. If type(dir) = NODE, the chop\_pnt is included in both Boxes but is the only point in common. It is also an error if the chop\_pnt is an end node of the Box. Directions are zero-based. It is an error if not 0 <= dir < SpaceDim.

Box& Box::coarsen const IntVect   refinement_ratio
 

Modifies this Box by coarsening by given (positive) refinement ratio. The Empty Box is not modified by this function. \

NOTE: if type(dir) = CELL centered: lo <- lo/ratio and hi <- hi/ratio.\

NOTE: if type(dir) = NODE centered: lo <- lo/ratio and hi <- hi/ratio + ((hiratio)==0 ? 0 : 1).\

That is, refinement of coarsened Box must contain the original Box.

Box& Box::coarsen int    refinement_ratio
 

coarsening

Modifies this Box by coarsening it by given (positive) refinement ratio. The Empty Box is not modified by this function. \

NOTE: if type(dir) = CELL centered: lo <- lo/ratio and hi <- hi/ratio.\

NOTE: if type(dir) = NODE centered: lo <- lo/ratio and hi <- hi/ratio + ((hiratio)==0 ? 0 : 1).\

That is, refinement of coarsened Box must contain the original Box.

void Box::computeBoxLen   [inline]
 

{\bf Box Constants}

This is a canonical empty Box of cell-centered type.

void Box::computeBoxLenNotEmpty   [inline]
 

bool Box::contains const Box &    b const [inline]
 

Returns true if argument is contained within this Box. It is an error if the Boxes have different types. An empty Box does not contain any IntVect.

bool Box::contains const IntVect   p const [inline]
 

Returns true if argument is contained within this Box. An empty Box does not contain and is not contained by any Box, including itself.

Box& Box::convert int    dir,
IndexType::CellIndex    typ
 

Modifies this Box by converting from the current type into the argument type. This may change the Box coordinates:\

type CELL -> NODE : increase coordinate by one on high end.\

type NODE -> CELL : reduce coordinate by one on high end.\

Other type mappings make no change. Directions are zero-based. It is an error if not 0 <= dir < SpaceDim.

Box & Box::convert const IntVect   typ [inline]
 

Modifies this Box by converting from the current type into the argument type. This may change the Box coordinates:\ type CELL -> NODE : increase coordinate by one on high end.\ type NODE -> CELL : reduce coordinate by one on high end.\ other type mappings make no change. It is an error if typ is not convertible to an IndexType.

Box& Box::convert IndexType    typ
 

centering type conversion functions

Modifies this Box by converting from the current type into the argument type. This may change the Box coordinates:\

type CELL -> NODE : increase coordinate by one on high end.\

type NODE -> CELL : reduce coordinate by one on high end.\

other type mappings make no change.

Box Box::copy   const [inline]
 

void Box::define const Box &    b
 

void Box::define const IntVect   small,
const IntVect   big
 

Construct cell-centered type Box. It is an error if small is greater than big.

void Box::dumpOn std::ostream &    strm const
 

Gives more detail than printOn. Useful for exiting due to an error.

Box & Box::enclosedCells int    dir [inline]
 

Modifies this Box by converting it to CELL type in given direction. This decreases the component of the upper corner in the given direction by one. Directions are zero-based. It is an error if not 0 <= dir < SpaceDim. The Empty Box is not modified by this function except for changing of type.

Box& Box::enclosedCells  
 

Modifies this Box by converting it to CELL type in all directions. This decreases all components of the upper corner by one. The Empty Box is not modified by this function except for changing of type.

Box& Box::enclosedCells_int int    dir
 

bool Box::eq const Box &    b const
 

const int * Box::getVect   const [inline]
 

Returns a constant pointer to the array of coordinates in the Box. Useful for calls to Fortran, but otherwise too dangerous for use.

Box & Box::grow int    idir,
int    n_cell
[inline]
 

Modifies this Box by growing it on the low and high end by n\_cell cells in direction idir. The Empty Box is not modified by this function. NOTE: n\_cell negative shrinks this Box by that number of cells. If shrinking produces an empty Box, the Box is transformed into the canonical Empty Box. Directions are zero-based. It is an error if not 0 <= dir < SpaceDim.

Box & Box::grow const IntVect   v [inline]
 

Modifies this Box by growing it in each direction by specified amount. The Empty Box is not modified by this function. NOTE: components of iv may be negative, which would shrink this Box. If shrinking produces an empty Box, the Box is transformed into the canonical Empty Box.

Box & Box::grow int    i [inline]
 

grow functions

Modifies this Box by growing it in all directions by given amount. The Empty Box is not modified by this function. NOTE: n\_cell negative shrinks the Box by that number of cells. If shrinking produces an empty Box, the Box is transformed into the canonical Empty Box.

Box & Box::growDir int    a_idir,
const Side::LoHiSide   a_sd,
int    a_cell
[inline]
 

growLo if a_sd == Side::Lo \ growHi if a_sd= = Side::Hi

Box & Box::growHi int    idir,
int    n_cell = 1
[inline]
 

Modifies this Box by growing it on the high end by n\_cell cells in direction idir. The Empty Box is not modified by this function. NOTE: n\_cell negative shrinks the Box by that number of cells. If shrinking produces an empty Box, the Box is transformed into the canonical Empty Box. Directions are zero-based. It is an error if not 0 <= dir < SpaceDim.

Box & Box::growLo int    idir,
int    n_cell = 1
[inline]
 

Modifies this Box by growing it on the low end by n\_cell cells in direction idir. The Empty Box is not modified by this function. NOTE: n\_cell negative shrinks this Box by that number of cells. If shrinking produces an empty Box, the Box is transformed into the canonical Empty Box. Directions are zero-based. It is an error if not 0 <= dir < SpaceDim.

const int * Box::hiVect   const [inline]
 

Returns a constant pointer the array of high end coordinates. Useful for calls to Fortran. It should not be used in any other circumstances.

long Box::index const IntVect   v const [inline]
 

Returns offset of point from smallend; i.e. index(smallend) -> 0, bigend would return volume()-1. Is used in accessing FArrayBox.

bool Box::intersects const Box &    b const
 

Returns true if this Box and the argument have non-null intersections. It is an error if the Boxes have different types. An empty Box does not intersect any Box, including itself.

bool Box::intersectsNotEmpty const Box &    b const
 

Returns true if this Box and the argument have non-null intersections. It is an error if the Boxes have different types. This routine does not perform the check to see if *this or b are empty boxes. It is the callers responsibility to ensure that this never happens. If you are unsure, the use the .intersects(..) routine.

bool Box::isEmpty   const [inline]
 

{\bf Comparison Functions}

Returns true if this Box is empty.

IndexType Box::ixType   const [inline]
 

centering

Return the indexing type of this Box.

int Box::longside   const
 

Returns length of the longest side of this Box. Ignores type.

int Box::longside int &    dir const
 

Returns length of the longest side of this Box. The argument dir is modified to give direction with longest side: 0...SpaceDim-1. Ignores type.

const int * Box::loVect   const [inline]
 

Returns a constant pointer to the array of low end coordinates. Useful for calls to Fortran. It should not be used in any other circumstances.

bool Box::lt const Box &    rhs const
 

Box& Box::minBox const Box &    b
 

Modifies this Box to that of the minimum Box containing both this Box and the argument Box. Both Boxes must have identical type.

bool Box::neq const Box &    b const
 

void Box::next IntVect   p,
const int *    shv
const
 

void Box::next IntVect   const
 

long Box::numPts   const
 

Return the volume, in indexing space, of region enclosed by this Box. This is identical to volume(). Abort()s if the number cannot be represented in a long.\

bool Box::numPtsOK long &    N const [protected]
 

bool Box::numPtsOK   const [inline]
 

Is the number calculated by numPts() representable in a long?

Box Box::operator & const Box &    const [inline]
 

intersection functions

Returns the Box that is intersection of this Box and the argument Box. Intersection is commutative. The Boxes MUST be of same type. The intersection of the Empty Box and any Box is the Empty Box.

Box& Box::operator &= const Box &   
 

Modifies this Box by intersection with the argument Box. The Boxes MUST be of the same type. The intersection of the Empty Box and any Box is the Empty Box.

bool Box::operator!= const Box &    b const [inline]
 

Returns true if this Box and the argument differ, including type.

Box Box::operator+ const IntVect   v const [inline]
 

Returns a Box that is this Box shifted by the given IntVect. The Empty Box is not modified by this function.

Box & Box::operator+= const IntVect   v [inline]
 

Modifies this Box by shifting it by given IntVect. The Empty Box is not modified by this function.

Box Box::operator- const IntVect   v const [inline]
 

Returns a Box that is this Box shifted by the given IntVect. The Empty Box is not modified by this function.

Box & Box::operator-= const IntVect   v [inline]
 

Modifies this Box by shifting it by given IntVect. The Empty Box is not modified by this function.

bool Box::operator< const Box &    rhs const [inline]
 

Returns true if this Box is lexigraphically less than rhs box. All comparison is based on lower box corner. In the name of coding efficiency, we do not handle the case where two boxes have the same lower left corner. In DEBUG mode, this is checked for with an assert.

Box & Box::operator= const Box &    b [inline]
 

{\bf Modification Functions}

The assignment operator.

bool Box::operator== const Box &    b const [inline]
 

Returns true if this Box and the argument are identical, including type.

void Box::p   const
 

print to pout()

Box& Box::refine const IntVect   refinement_ratio
 

Modifies this Box by refining it by given (positive) refinement ratio. The Empty Box is not modified by this function. \

NOTE: if type(dir) = CELL centered: lo <- lo*ratio and hi <- (hi+1)*ratio - 1.\

NOTE: if type(dir) = NODE centered: lo <- lo*ratio and hi <- hi*ratio.

Box& Box::refine int    refinement_ratio
 

refinement

Modifies this Box by refining it by given (positive) refinement ratio. The Empty Box is not modified by this function. \

NOTE: if type(dir) = CELL centered: lo <- lo*ratio and hi <- (hi+1)*ratio - 1. \

NOTE: if type(dir) = NODE centered: lo <- lo*ratio and hi <- hi*ratio.

bool Box::sameSize const Box &    b const [inline]
 

Returns true if this Box and the argument are the same size, ie translates of each other. It is an error if they have different types.

bool Box::sameType const Box &    b const [inline]
 

Returns true if this Box and the argument have same type.

Box & Box::setBig int    dir,
int    bg_index
[inline]
 

Redefines the upper end of this Box in the specified coordinate direction. It is an error if the specified value is less than the exisiting lower end of this Box. Directions are zero-based. It is an error if not 0 <= dir < SpaceDim.

Box & Box::setBig const IntVect   bg [inline]
 

Redefines the upper corner of this Box. It is an error if the specified corner is less than the exisiting lower corner of this Box.

Box & Box::setRange int    dir,
int    sm_index,
int    n_cells = 1
[inline]
 

Set the entire range in a given direction, starting at sm\_index with length n\_cells. It is an error if n\_cells <= 0.

Box & Box::setSmall int    dir,
int    sm_index
[inline]
 

Redefines the lower end of this Box in the specified coordinate direction. It is an error if the specified value is greater than the exisiting upper end of this Box. Directions are zero-based. It is an error if not 0 <= dir < SpaceDim.

Box & Box::setSmall const IntVect   sm [inline]
 

Redefine the lower corner of this Box. It is an error if the specified corner is greater than the exisiting upper corner of this Box.

Box & Box::shift const IntVect   iv [inline]
 

Modifies this Box by shifting. Equivalent to b.shift(0,iv[0]).shift(1,iv[1]) .... The Empty Box is not modified by this function.

Box & Box::shift int    dir,
int    nzones
[inline]
 

shift functions

Modifies this Box by shifting it nzones indexing positions in coordinate direction dir. Directions are zero-based. It is an error if not 0 <= dir < SpaceDim. The Empty Box is not modified by this function.

Box& Box::shift_intvect const IntVect   iv
 

Box& Box::shiftHalf const IntVect   iv
 

Modifies this Box by shifting by half indices. Equivalent to b.shiftHalf(0,iv[0]).shiftHalf(1,iv[1]) ... The Empty Box is not modified by this function except for changing of type.

Box& Box::shiftHalf int    dir,
int    num_halfs
 

This member modifies this Box by shifting by "half" indices, thereby converting the Box from type CELL to NODE or vice-versa. b.shiftHalf(0,1) shifts b to the right by 1/2 cells. b.shiftHalf(1,-3) shifts b in the -j direction by 3/2 cells. NOTE: If num\_halfs is EVEN the shift is num\_halfs/2 full zones and hence will not change the type. This is: b.shifthalf(4) == b.shift(2). Directions are zero-based. It is an error if not 0 <= dir < SpaceDim. The Empty Box is not modified by this function except for changing of type.

Box& Box::shiftHalf_intvect const IntVect   iv
 

int Box::shortside   const
 

Returns length of the shortest side of this Box. Ignores type.

int Box::shortside int &    dir const
 

Returns length of shortest side of this Box. The argument dir is modified to give direction with shortest side: 0...SpaceDim-1. Ignores type.

IntVect Box::sideEnd Side::LoHiSide    a_side const [inline]
 

return smallend if side is low, bigend if side is high.

int Box::size int    dir const [inline]
 

Return the size of this Box in the specified coordinate direction. Directions are zero-based. It is an error if not 0 <= dir < SpaceDim.

const IntVect & Box::size   const [inline]
 

size functions

Return an IntVect containing the size of this Box in each coordinate direction.

int Box::smallEnd int    dir const [inline]
 

Returns the coordinate of the low end of this Box in the given direction. Directions are zero-based. It is an error if not 0 <= dir < SpaceDim.

const IntVect & Box::smallEnd   const [inline]
 

{\bf Accessors}

Returns the lower corner of this Box.

Box & Box::surroundingNodes int    dir [inline]
 

Modifies this Box by converting it to NODE type in given direction. This increases the component of the upper corner in the given direction by one. Directions are zero-based. It is an error if not 0 <= dir < SpaceDim. The Empty Box is not modified by this function except for changing of type.

Box& Box::surroundingNodes  
 

Modifies this Box by converting it to NODE type in all directions. This increases all components of the upper corner by one. The Empty Box is not modified by this function except for changing of type.

Box& Box::surroundingNodes_int int    dir
 

IndexType::CellIndex Box::type int    dir const [inline]
 

Return the indexing type of this Box in the specified direction. Directions are zero-based. It is an error if not 0 <= dir < SpaceDim.

IntVect Box::type   const [inline]
 

Return the indexing type of this Box.

long Box::volume   const
 

Return the volume, in indexing space, of region enclosed by this Box. This is identical to numPts(). Abort()s if the number cannot be represented in a long.\

bool Box::volumeOK long &    N const [protected]
 

bool Box::volumeOK   const [inline]
 

Is the number calculated by volume() representable in a long?


Friends And Related Function Documentation

Box adjCellBox const Box &    b,
int    dir,
Side::LoHiSide    a_side,
int    len
[friend]
 

Box adjCellHi const Box &    b,
int    dir,
int    len
[friend]
 

Returns the cell centered Box of the given length adjacent to the argument Box on the high end along the given coordinate direction. The return Box is identical to the argument Box in the other directions. The return Box and the argument Box have an empty intersection. \

NOTE: len >= 1. \

NOTE: Box retval = adjCellHi(b,dir,len) is equivalent to the following set of operations: \

Box retval(b); \

retval.convert(dir,Box::CELL); \

retval.setrange(dir,retval.bigEnd(dir)+1,len);\

Directions are zero-based. It is an error if not 0 <= dir < SpaceDim. The neighbor of an Empty Box is an Empty Box of the appropriate type.

Box adjCellLo const Box &    b,
int    dir,
int    len
[friend]
 

Returns the cell centered Box of the given length adjacent to the argument Box on the low end along the given coordinate direction. The return Box is identical to the argument Box in the other directions. The return Box and the argument Box have an empty intersection. \

NOTE: len >= 1. \

NOTE: Box retval = adjCellLo(b,dir,len) is equivalent to the following set of operations: \

Box retval(b); \

retval.convert(dir,Box::CELL); \

retval.setrange(dir,retval.smallEnd(dir)-len,len); \

Directions are zero-based. It is an error if not 0 <= dir < SpaceDim. The neighbor of an Empty Box is an Empty Box of the appropriate type.

Box bdryBox const Box &    b,
int    dir,
Side::LoHiSide    a_sd,
int    len
[friend]
 

neighbor box functions

Box bdryHi const Box &    b,
int    dir,
int    len
[friend]
 

Returns the edge-centered Box (in direction dir) defining the high side of the argument Box. The return Box will have the given length in the given direction. Directions are zero-based. It is an error if not 0 <= dir < SpaceDim. The neighbor of an Empty Box is an Empty Box of the appropriate type.

Box bdryLo const Box &    b,
int    dir,
int    len
[friend]
 

Returns the edge-centered Box (in direction dir) defining the low side of the argument Box. The output Box will have the given length in the given direction. Directions are zero-based. It is an error if not 0 <= dir < SpaceDim. The neighbor of an Empty Box is an Empty Box of the appropriate type.

Box coarsen const Box &    b,
const IntVect   refinement_ratio
[friend]
 

Returns a Box that is the argument Box coarsened by given (positive) refinement ratio. The Empty Box is not modified by this function. \

NOTE: if type(dir) = CELL centered: lo <- lo/ratio and hi <- hi/ratio.\

NOTE: if type(dir) = NODE centered: lo <- lo/ratio and hi <- hi/ratio + ((hiratio)==0 ? 0 : 1).\

That is, refinement of coarsened Box must contain the original Box.

Box coarsen const Box &    b,
int    refinement_ratio
[friend]
 

Returns a Box that is the argument Box coarsened by given (positive) refinement ratio. The Empty Box is not modified by this function. \

NOTE: if type(dir) = CELL centered: lo <- lo/ratio and hi <- hi/ratio.\

NOTE: if type(dir) = NODE centered: lo <- lo/ratio and hi <- hi/ratio + ((hiratio)==0 ? 0 : 1).\

That is, refinement of coarsened Box must contain the original Box.

Box enclosedCells const Box &    b [friend]
 

Returns a Box with CELL based coordinates in all directions that is enclosed by argument Box. The upper corner of the return Box will be one less in all components than the upper corner of the argument Box. The Empty Box is not modified by this function except for changing of type.

Box enclosedCells const Box &    b,
int    dir
[friend]
 

Returns a Box with CELL based coordinates in direction dir that is enclosed by argument Box. NOTE: equivalent to b.convert(dir,CELL). NOTE: error if b.type(dir) == CELL. Directions are zero-based. It is an error if not 0 <= dir < SpaceDim. The Empty Box is not modified by this function except for changing of type.

Box grow const Box &    b,
const IntVect   v
[friend]
 

Returns a Box that is the argument Box grown in each direction by specified amount. The Empty Box is not modified by this function. NOTE: components of iv may be negative, which would return a shrunken Box. If shrinking produces an empty Box, the Box is transformed into the canonical Empty Box.

Box grow const Box &    b,
int    i
[friend]
 

Returns a Box that is the argument Box grown in all directions by given amount. The Empty Box is not modified by this function. NOTE: n\_cell negative shrinks the Box by that number of cells. If shrinking produces an empty Box, the Box is transformed into the canonical Empty Box.

friend class HDF5Handle [friend]
 

Box minBox const Box &    b1,
const Box &    b2
[friend]
 

Returns a Box that is the minimum Box containing both the argument Boxes. Both Boxes must have identical type.

std::ostream& operator<< std::ostream &    os,
const Box &    bx
[friend]
 

{\bf I/O Functions}

Write an ASCII representation to the ostream.

std::istream& operator>> std::istream &    os,
Box &    bx
[friend]
 

Read from istream.

Box refine const Box &    b,
const IntVect   refinement_ratio
[friend]
 

Returns a Box that is the argument Box refined by given (positive) refinement ratio. The Empty Box is not modified by this function. \

NOTE: if type(dir) = CELL centered: lo <- lo*ratio and hi <- (hi+1)*ratio - 1.\

NOTE: if type(dir) = NODE centered: lo <- lo*ratio and hi <- hi*ratio.

Box refine const Box &    b,
int    refinement_ratio
[friend]
 

Returns a Box that is the argument Box refined by given (positive) refinement ratio. The Empty Box is not modified by this function. \

NOTE: if type(dir) = CELL centered: lo <- lo*ratio and hi <- (hi+1)*ratio - 1.\

NOTE: if type(dir) = NODE centered: lo <- lo*ratio and hi <- hi*ratio.

Box surroundingNodes const Box &    b [friend]
 

Returns a Box with NODE based coordinates in all directions that encloses argument Box. The upper corner of the return Box will be one more in all components than the upper corner of the argument Box. The Empty Box is not modified by this function except for changing of type.

Box surroundingNodes const Box &    b,
int    dir
[friend]
 

Returns a Box with NODE based coordinates in direction dir that encloses the argument Box. NOTE: equivalent to b.convert(dir,NODE). NOTE: error if b.type(dir) == NODE. Directions are zero-based. It is an error if not 0 <= dir < SpaceDim. The Empty Box is not modified by this function except for changing of type.


Member Data Documentation

IntVect Box::bigend [protected]
 

IndexType Box::btype [protected]
 

IntVect Box::len [protected]
 

IntVect Box::smallend [protected]
 


The documentation for this class was generated from the following file:
Generated on Tue Jul 2 10:44:02 2002 for Chombo by doxygen1.2.16