BoxList Class Reference

: A List of Boxes More...

#include <BoxList.H>

Inheritance diagram for BoxList:

Inheritance graph
[legend]
Collaboration diagram for BoxList:

Collaboration graph
[legend]

List of all members.

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.
BoxListintersect (const Box &b)
 Modify this BoxList to contain only its intersection with Box b.
BoxListintersect (const BoxList &b)
 Modify this BoxList to contain only its intersection with BoxList b.
BoxListremove (const Box &bx)
 Remove the Box from this BoxList.
BoxListremove (iterator bli)
 Remove the pointed to Box from this BoxList.
BoxListcomplementIn (const Box &b, const BoxList &bl)
 Creates the complement of BoxList bl in Box b.
BoxListrefine (int ratio)
 Refine each Box in the BoxList by the ratio.
BoxListrefine (const IntVect &ratio)
 Refine each Box in the BoxList by the ratio.
BoxListcoarsen (int ratio)
 Coarsen each Box in the BoxList by the ratio.
BoxListcoarsen (const IntVect &ratio)
 Coarsen each Box in the BoxList by the ratio.
BoxListaccrete (int sz)
 Grow each Box in the BoxList by size sz.
BoxListshift (int dir, int nzones)
 Applies Box::shift(int,int) to each Box in the BoxList.
BoxListshiftHalf (int dir, int num_halfs)
 Applies Box::shiftHalf(int,int) to each Box in the BoxList.
BoxListshiftHalf (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.
BoxListmaxSize (int chunk)
 Forces each Box in the BoxList to have sides of length <= chunk.
BoxListmaxSize (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.
BoxListsurroundingNodes ()
 Applies surroundingNodes(Box) to each Box in BoxArray.
BoxListsurroundingNodes (int dir)
 Applies surroundingNodes(Box,int) to each Box in BoxList.
BoxListenclosedCells ()
 Applies Box::enclosedCells() to each Box in the BoxList.
BoxListenclosedCells (int dir)
 Applies Box::enclosedCells(int) to each Box in the BoxList.
BoxListconvert (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< Boxlbox

Friends

class BoxDomain


Detailed Description

: A List of Boxes

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.


Member Typedef Documentation

typedef std::list<Box>::iterator BoxList::iterator

Reimplemented in BoxDomain.


Constructor & Destructor Documentation

BoxList::BoxList (  ) 

Construct an empty BoxList with IndexType::TheCellType().

Referenced by BoxDomain::boxList().

BoxList::BoxList ( const Box bx  ) 

Make a boxList consisting of a single Box.

References push_back().

BoxList::BoxList ( IndexType  btyp  )  [explicit]

Construct an empty BoxList with IndexType btyp.

BoxList::BoxList ( const BoxArray ba  )  [explicit]

Construct a BoxList from a BoxArray.

References ixType(), push_back(), and BoxArray::size().


Member Function Documentation

void BoxList::push_back ( const Box bn  )  [inline]

void BoxList::push_front ( const Box bn  )  [inline]

Prepend a Box to this BoxList.

References BL_ASSERT, Box::ixType(), ixType(), and lbox.

void BoxList::join ( const BoxList blist  ) 

Join the BoxList to ourselves.

References BL_ASSERT, ixType(), and lbox.

void BoxList::catenate ( BoxList blist  ) 

Catenate the BoxList to ourselves. Removes entries from blist.

References BL_ASSERT, isEmpty(), ixType(), and lbox.

void BoxList::clear (  )  [inline]

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]

BoxList::const_iterator BoxList::begin (  )  const [inline]

References lbox.

BoxList::iterator BoxList::end (  )  [inline]

BoxList::const_iterator BoxList::end (  )  const [inline]

References lbox.

bool BoxList::ok (  )  const

True if this BoxList is valid; i.e.

all the Boxes are valid and they all have the same IndexType. Also returns true if the BoxList is empty.

Reimplemented in BoxDomain.

References begin(), and end().

Referenced by BoxDomain::ok().

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

Is this BoxList notequal to rhs?

References operator==().

bool BoxList::isEmpty (  )  const [inline]

Is this BoxList empty?

References lbox.

Referenced by catenate(), contains(), and minimalBox().

bool BoxList::isNotEmpty (  )  const [inline]

Is this BoxList not empty?

References lbox.

Referenced by complementIn().

bool BoxList::isDisjoint (  )  const

True if the set of intersecting Boxes is empty.

References begin(), and end().

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

True if the Box is within any of the Boxes in the List.

The Box must also have the same IndexType as those in this BoxList.

References BoxLib::complementIn(), and isEmpty().

bool BoxList::contains ( const BoxList bl  )  const

True if all Boxes in bl are contained in this BoxList.

References begin(), contains(), and end().

bool BoxList::contains ( const BoxArray ba  )  const

True if all Boxes in ba are contained in this BoxList.

References contains(), and BoxArray::size().

BoxList & BoxList::intersect ( const Box b  ) 

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().

BoxList & BoxList::intersect ( const BoxList b  ) 

Modify this BoxList to contain only its intersection with BoxList b.

References begin(), end(), and push_back().

BoxList & BoxList::remove ( const Box bx  ) 

Remove the Box from this BoxList.

References BL_ASSERT, Box::ixType(), ixType(), and lbox.

BoxList & BoxList::remove ( iterator  bli  ) 

Remove the pointed to Box from this BoxList.

References BL_ASSERT, IndexType::ixType(), ixType(), and lbox.

BoxList & BoxList::complementIn ( const Box b,
const BoxList bl 
)

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::refine ( const IntVect ratio  ) 

Refine each Box in the BoxList by the ratio.

References begin(), end(), and 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::coarsen ( const IntVect ratio  ) 

Coarsen each Box in the BoxList by the ratio.

References begin(), coarsen(), and end().

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 
)

Applies Box::shift(int,int) to each Box in the BoxList.

References begin(), end(), and shift().

Referenced by shift().

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().

BoxList & BoxList::shiftHalf ( const IntVect iv  ) 

Applies Box::shiftHalf(IntVect) to each Box in BoxList.

References begin(), end(), and 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  ) 

Forces each Box in the BoxList to have sides of length <= chunk.

Referenced by BoxArray::maxSize().

BoxList & BoxList::maxSize ( const IntVect chunk  ) 

Forces each Box in the BoxList to have dimth side of length <= chunk[dim].

References begin(), end(), push_back(), and size().

Box BoxList::minimalBox (  )  const

Returns smallest Box that contains all Boxes in this BoxList.

References begin(), end(), isEmpty(), and Box::minBox().

IndexType BoxList::ixType (  )  const [inline]

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  ) 

Applies surroundingNodes(Box,int) to each Box in BoxList.

See the documentation of Box for details.

References begin(), end(), and surroundingNodes().

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().

BoxList & BoxList::convert ( IndexType  typ  ) 

Applies Box::convert(IndexType) to each Box in the BoxList.

References begin(), and end().

std::list< Box > & BoxList::listBox (  )  [inline, protected]

References lbox.

Referenced by BoxDomain::add(), and BoxDomain::rmBox().

const std::list< Box > & BoxList::listBox (  )  const [inline, protected]

References lbox.


Friends And Related Function Documentation

friend class BoxDomain [friend]


Member Data Documentation

std::list<Box> BoxList::lbox [protected]


The documentation for this class was generated from the following files:

Generated on Fri Nov 21 10:11:01 2008 for AMRParticlePaths by  doxygen 1.5.5