Box.H File Reference

#include "SPACE.H"
#include <iostream>
#include "IntVect.H"
#include "Misc.H"
#include "LoHiSide.H"
#include "Vector.H"
#include "SPMD.H"
#include "NamespaceHeader.H"
#include "NamespaceFooter.H"
#include "BaseNamespaceHeader.H"
#include "NamespaceVar.H"
#include "BaseNamespaceFooter.H"

Include dependency graph for Box.H:

Go to the source code of this file.

Classes

class  IndexType
 Cell-Based or Node-Based Indices. More...
class  Box
 A Rectangular Domain on an Integer Lattice. More...

Functions

template<>
int linearSize (const CH_XDIR::Box &a_input)
template<>
void linearIn (CH_XDIR::Box &a_outputT, const void *const a_inBuf)
template<>
void linearOut (void *const a_outBuf, const CH_XDIR::Box &a_inputT)
template<>
int linearSize (const Vector< CH_XDIR::Box > &a_input)
template<>
void linearIn (Vector< CH_XDIR::Box > &a_outputT, const void *const inBuf)
template<>
void linearOut (void *const a_outBuf, const Vector< CH_XDIR::Box > &a_inputT)
template<>
int linearSize (const Vector< Vector< CH_XDIR::Box > > &a_input)
template<>
void linearIn (Vector< Vector< CH_XDIR::Box > > &a_outputT, const void *const inBuf)
template<>
void linearOut (void *const a_outBuf, const Vector< Vector< CH_XDIR::Box > > &a_inputT)
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=1)
Box bdryLo (const Box &b, int dir, int len=1)
Box bdryHi (const Box &b, int dir, int len=1)
Box adjCellLo (const Box &b, int dir, int len=1)
Box adjCellHi (const Box &b, int dir, int len=1)
Box minBox (const Box &b1, const Box &b2)
Box coarsen (const Box &b, const IntVect &refinement_ratio)
Box coarsen (const Box &b, int refinement_ratio)
Box refine (const Box &b, const IntVect &refinement_ratio)
Box refine (const Box &b, int refinement_ratio)
Box grow (const Box &b, int i)
Box grow (const Box &b, const IntVect &v)


Function Documentation

template<>
int linearSize ( const CH_XDIR::Box &  a_input  )  [inline]

template<>
void linearIn ( CH_XDIR::Box &  a_outputT,
const void *const   a_inBuf 
) [inline]

template<>
void linearOut ( void *const   a_outBuf,
const CH_XDIR::Box &  a_inputT 
) [inline]

template<>
int linearSize ( const Vector< CH_XDIR::Box > &  a_input  )  [inline]

template<>
void linearIn ( Vector< CH_XDIR::Box > &  a_outputT,
const void *const   inBuf 
) [inline]

template<>
void linearOut ( void *const   a_outBuf,
const Vector< CH_XDIR::Box > &  a_inputT 
) [inline]

template<>
int linearSize ( const Vector< Vector< CH_XDIR::Box > > &  a_input  )  [inline]

template<>
void linearIn ( Vector< Vector< CH_XDIR::Box > > &  a_outputT,
const void *const   inBuf 
) [inline]

template<>
void linearOut ( void *const   a_outBuf,
const Vector< Vector< CH_XDIR::Box > > &  a_inputT 
) [inline]

Box surroundingNodes ( const Box b,
int  dir 
) [inline]

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.

References Box::surroundingNodes().

Referenced by BaseEBFaceFAB< T >::copy(), dataSize(), BaseIFFAB< T >::define(), BaseEBFaceFAB< T >::define(), ViscousTensorOp::getFlux(), NWOViscousTensorOp::getFlux(), BaseEBFaceFAB< T >::linearIn(), BaseEBFaceFAB< T >::linearOut(), and BaseEBFaceFAB< T >::size().

Box surroundingNodes ( const Box b  )  [inline]

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.

References Box::surroundingNodes().

Box enclosedCells ( const Box b,
int  dir 
) [inline]

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.

References Box::enclosedCells().

Box enclosedCells ( const Box b  )  [inline]

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.

References Box::enclosedCells().

Box bdryBox ( const Box b,
int  dir,
Side::LoHiSide  a_sd,
int  len = 1 
)

Box bdryLo ( const Box b,
int  dir,
int  len = 1 
)

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 bdryHi ( const Box b,
int  dir,
int  len = 1 
)

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 adjCellLo ( const Box b,
int  dir,
int  len = 1 
)

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 != 0. A negative length results in cells _inside_ the original box. \

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.

Referenced by adjCellLo_dbl().

Box adjCellHi ( const Box b,
int  dir,
int  len = 1 
)

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 != 0. A Negative length results in cells _inside_ the original box. \

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.

Referenced by adjCellHi_dbl().

Box minBox ( const Box b1,
const Box b2 
)

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

Box coarsen ( const Box b,
const IntVect refinement_ratio 
)

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 
)

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 refine ( const Box b,
const IntVect refinement_ratio 
)

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.

Referenced by refine_bl(), and refine_dbl().

Box refine ( const Box b,
int  refinement_ratio 
)

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 grow ( const Box b,
int  i 
) [inline]

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.

References Box::bigend, Box::Box(), Box::btype, diagShift(), Box::isEmpty(), and Box::smallend.

Box grow ( const Box b,
const IntVect v 
) [inline]

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.

References Box::bigend, Box::Box(), Box::btype, Box::isEmpty(), and Box::smallend.


Generated on Thu Jun 21 03:58:12 2018 for Chombo + EB by  doxygen 1.5.5