#include <BoxList.H>
Public Types | |
typedef std::list< Box >::iterator | iterator |
typedef std::list< Box > ::const_iterator | const_iterator |
Public Member Functions | |
BoxList () | |
Construct an empty BoxList with IndexType::TheCellType(). | |
BoxList (const Box &bx) | |
Make a boxList consisting of a single Box. | |
BoxList (IndexType btyp) | |
Construct an empty BoxList with IndexType btyp. | |
BoxList (const BoxArray &ba) | |
Construct a BoxList from a BoxArray. | |
void | push_back (const Box &bn) |
Append a Box to this BoxList. | |
void | push_front (const Box &bn) |
Prepend a Box to this BoxList. | |
void | join (const BoxList &blist) |
Join the BoxList to ourselves. | |
void | catenate (BoxList &blist) |
Catenate the BoxList to ourselves. Removes entries from blist. | |
void | clear () |
Remove all Boxes from this BoxList. | |
int | size () const |
The number of Boxes in this BoxList. | |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
bool | ok () const |
True if this BoxList is valid; i.e. | |
bool | operator== (const BoxList &rhs) const |
Is this BoxList equal to rhs? | |
bool | operator!= (const BoxList &rhs) const |
Is this BoxList notequal to rhs? | |
bool | isEmpty () const |
Is this BoxList empty? | |
bool | isNotEmpty () const |
Is this BoxList not empty? | |
bool | isDisjoint () const |
True if the set of intersecting Boxes is empty. | |
bool | contains (const IntVect &v) const |
True if the IntVect is within any of the Boxes in this BoxList. | |
bool | contains (const Box &b) const |
True if the Box is within any of the Boxes in the List. | |
bool | contains (const BoxList &bl) const |
True if all Boxes in bl are contained in this BoxList. | |
bool | contains (const BoxArray &ba) const |
True if all Boxes in ba are contained in this BoxList. | |
BoxList & | intersect (const Box &b) |
Modify this BoxList to contain only its intersection with Box b. | |
BoxList & | intersect (const BoxList &b) |
Modify this BoxList to contain only its intersection with BoxList b. | |
BoxList & | remove (const Box &bx) |
Remove the Box from this BoxList. | |
BoxList & | remove (iterator bli) |
Remove the pointed to Box from this BoxList. | |
BoxList & | complementIn (const Box &b, const BoxList &bl) |
Creates the complement of BoxList bl in Box b. | |
BoxList & | refine (int ratio) |
Refine each Box in the BoxList by the ratio. | |
BoxList & | refine (const IntVect &ratio) |
Refine each Box in the BoxList by the ratio. | |
BoxList & | coarsen (int ratio) |
Coarsen each Box in the BoxList by the ratio. | |
BoxList & | coarsen (const IntVect &ratio) |
Coarsen each Box in the BoxList by the ratio. | |
BoxList & | accrete (int sz) |
Grow each Box in the BoxList by size sz. | |
BoxList & | shift (int dir, int nzones) |
Applies Box::shift(int,int) to each Box in the BoxList. | |
BoxList & | shiftHalf (int dir, int num_halfs) |
Applies Box::shiftHalf(int,int) to each Box in the BoxList. | |
BoxList & | shiftHalf (const IntVect &iv) |
Applies Box::shiftHalf(IntVect) to each Box in BoxList. | |
int | simplify () |
Merge adjacent Boxes in this BoxList. | |
int | minimize () |
Merges all possible adjacent Boxes. | |
BoxList & | maxSize (int chunk) |
Forces each Box in the BoxList to have sides of length <= chunk. | |
BoxList & | maxSize (const IntVect &chunk) |
Forces each Box in the BoxList to have dimth side of length <= chunk[dim]. | |
Box | minimalBox () const |
Returns smallest Box that contains all Boxes in this BoxList. | |
IndexType | ixType () const |
Returns the IndexType of Boxes in this BoxList. | |
BoxList & | surroundingNodes () |
Applies surroundingNodes(Box) to each Box in BoxArray. | |
BoxList & | surroundingNodes (int dir) |
Applies surroundingNodes(Box,int) to each Box in BoxList. | |
BoxList & | enclosedCells () |
Applies Box::enclosedCells() to each Box in the BoxList. | |
BoxList & | enclosedCells (int dir) |
Applies Box::enclosedCells(int) to each Box in the BoxList. | |
BoxList & | convert (IndexType typ) |
Applies Box::convert(IndexType) to each Box in the BoxList. | |
Protected Member Functions | |
std::list< Box > & | listBox () |
const std::list< Box > & | listBox () const |
Protected Attributes | |
std::list< Box > | lbox |
Friends | |
class | BoxDomain |
A BoxList is a class for managing a List of Boxes that share a common IndexType. This class implements operations for sets of Boxes.
This is a concrete class, not a polymorphic one.
typedef std::list<Box>::iterator BoxList::iterator |
typedef std::list<Box>::const_iterator BoxList::const_iterator |
Reimplemented in BoxDomain.
BoxList::BoxList | ( | ) |
BoxList::BoxList | ( | const Box & | bx | ) |
BoxList::BoxList | ( | const BoxArray & | ba | ) | [explicit] |
void BoxList::push_back | ( | const Box & | bn | ) | [inline] |
References BL_ASSERT, Box::ixType(), ixType(), and lbox.
Referenced by FabArrayCopyDescriptor< FAB >::AddBoxDoIt(), BoxList(), BoxArray::boxList(), complementIn(), intersect(), and maxSize().
void BoxList::push_front | ( | const Box & | bn | ) | [inline] |
void BoxList::join | ( | const BoxList & | blist | ) |
void BoxList::catenate | ( | BoxList & | blist | ) |
void BoxList::clear | ( | ) | [inline] |
Remove all Boxes from this BoxList.
References lbox.
Referenced by BoxDomain::accrete(), FabArrayCopyDescriptor< FAB >::AddBox(), BoxDomain::coarsen(), and complementIn().
int BoxList::size | ( | ) | const [inline] |
The number of Boxes in this BoxList.
References lbox.
Referenced by maxSize(), BoxArray::maxSize(), operator<<(), and operator==().
BoxList::iterator BoxList::begin | ( | ) | [inline] |
References lbox.
Referenced by accrete(), BoxDomain::add(), coarsen(), complementIn(), BoxLib::complementIn(), contains(), convert(), enclosedCells(), intersect(), isDisjoint(), maxSize(), BoxArray::maxSize(), minimalBox(), ok(), BoxDomain::ok(), operator<<(), operator==(), refine(), BaseFab< T >::setComplement(), shift(), shiftHalf(), simplify(), and surroundingNodes().
BoxList::const_iterator BoxList::begin | ( | ) | const [inline] |
References lbox.
BoxList::iterator BoxList::end | ( | ) | [inline] |
References lbox.
Referenced by accrete(), BoxDomain::add(), coarsen(), complementIn(), BoxLib::complementIn(), contains(), convert(), enclosedCells(), intersect(), isDisjoint(), maxSize(), BoxArray::maxSize(), minimalBox(), ok(), BoxDomain::ok(), operator<<(), operator==(), refine(), BaseFab< T >::setComplement(), shift(), shiftHalf(), simplify(), and surroundingNodes().
BoxList::const_iterator BoxList::end | ( | ) | const [inline] |
References lbox.
bool BoxList::ok | ( | ) | const |
bool BoxList::operator== | ( | const BoxList & | rhs | ) | const |
Is this BoxList equal to rhs?
References begin(), end(), and size().
Referenced by operator!=(), BoxDomain::operator!=(), and BoxDomain::operator==().
bool BoxList::operator!= | ( | const BoxList & | rhs | ) | const |
bool BoxList::isEmpty | ( | ) | const [inline] |
bool BoxList::isNotEmpty | ( | ) | const [inline] |
bool BoxList::isDisjoint | ( | ) | const |
bool BoxList::contains | ( | const IntVect & | v | ) | const |
True if the IntVect is within any of the Boxes in this BoxList.
References begin(), and end().
Referenced by contains().
bool BoxList::contains | ( | const Box & | b | ) | const |
bool BoxList::contains | ( | const BoxList & | bl | ) | const |
bool BoxList::contains | ( | const BoxArray & | ba | ) | const |
Modify this BoxList to contain only its intersection with Box b.
Reimplemented in BoxDomain.
References begin(), end(), and lbox.
Referenced by BoxLib::intersect(), and BoxDomain::intersect().
Modify this BoxList to contain only its intersection with BoxList b.
References begin(), end(), and push_back().
Creates the complement of BoxList bl in Box b.
References begin(), BoxLib::boxDiff(), clear(), end(), isNotEmpty(), lbox, and push_back().
Referenced by BoxDomain::complementIn().
BoxList & BoxList::refine | ( | int | ratio | ) |
Refine each Box in the BoxList by the ratio.
Reimplemented in BoxDomain.
References begin(), end(), and refine().
Referenced by refine(), BoxLib::refine(), and BoxDomain::refine().
BoxList & BoxList::coarsen | ( | int | ratio | ) |
Coarsen each Box in the BoxList by the ratio.
Reimplemented in BoxDomain.
References begin(), coarsen(), and end().
Referenced by coarsen(), BoxLib::coarsen(), and BoxDomain::coarsen().
BoxList & BoxList::accrete | ( | int | sz | ) |
Grow each Box in the BoxList by size sz.
Reimplemented in BoxDomain.
References begin(), and end().
Referenced by BoxLib::accrete(), and BoxDomain::accrete().
BoxList & BoxList::shift | ( | int | dir, | |
int | nzones | |||
) |
BoxList & BoxList::shiftHalf | ( | int | dir, | |
int | num_halfs | |||
) |
Applies Box::shiftHalf(int,int) to each Box in the BoxList.
References begin(), end(), and shiftHalf().
Referenced by shiftHalf().
int BoxList::simplify | ( | ) |
Merge adjacent Boxes in this BoxList.
Return the number of Boxes merged.
References begin(), end(), lbox, and BoxLib::max().
Referenced by minimize().
int BoxList::minimize | ( | ) |
Merges all possible adjacent Boxes.
Returns the total number of Boxes merged.
References simplify().
BoxList & BoxList::maxSize | ( | int | chunk | ) |
Box BoxList::minimalBox | ( | ) | const |
IndexType BoxList::ixType | ( | ) | const [inline] |
Returns the IndexType of Boxes in this BoxList.
Referenced by BoxDomain::add(), BoxList(), catenate(), join(), operator<<(), push_back(), push_front(), remove(), and BoxDomain::rmBox().
BoxList & BoxList::surroundingNodes | ( | ) |
Applies surroundingNodes(Box) to each Box in BoxArray.
See the documentation of Box for details.
References begin(), end(), and surroundingNodes().
Referenced by surroundingNodes().
BoxList & BoxList::surroundingNodes | ( | int | dir | ) |
BoxList & BoxList::enclosedCells | ( | ) |
Applies Box::enclosedCells() to each Box in the BoxList.
References begin(), enclosedCells(), and end().
Referenced by enclosedCells().
BoxList & BoxList::enclosedCells | ( | int | dir | ) |
Applies Box::enclosedCells(int) to each Box in the BoxList.
References begin(), enclosedCells(), and end().
std::list< Box > & BoxList::listBox | ( | ) | [inline, protected] |
friend class BoxDomain [friend] |
std::list<Box> BoxList::lbox [protected] |
Referenced by BoxDomain::add(), begin(), catenate(), clear(), complementIn(), end(), intersect(), isEmpty(), isNotEmpty(), join(), listBox(), push_back(), push_front(), remove(), BoxDomain::rmBox(), simplify(), and size().