BoxDomain Class Reference

: A List of Disjoint Boxes More...

#include <BoxDomain.H>

Inheritance diagram for BoxDomain:

Inheritance graph
[legend]
Collaboration diagram for BoxDomain:

Collaboration graph
[legend]

List of all members.

Public Types

typedef BoxList::const_iterator const_iterator

Public Member Functions

 BoxDomain ()
 Construct an empty BoxDomain of IndexType::TheCellType().
 BoxDomain (const Box &bx)
 A Box Domain out of single Box.
 BoxDomain (IndexType itype)
 Construct an empty BoxDomain of IndexType itype.
void add (const Box &b)
 Add a Box to the domain.
void add (const BoxList &bl)
 Add all Boxes in the BoxList to the domain.
BoxDomainrmBox (const Box &b)
 Remove a box from the domain.
bool ok () const
 Returns True if this BoxDomain is valid.
BoxList boxList () const
 Create a BoxList from this BoxDomain.
bool operator== (const BoxDomain &rhs) const
 Are the BoxDomains equal?
bool operator!= (const BoxDomain &rhs) const
 Are the BoxDomains not equal?
BoxDomainrefine (int ratio)
 Refine all Boxes in the domain by the refinement ratio.
BoxDomaincoarsen (int ratio)
 Coarsen all Boxes in the domain by the refinement ratio.
BoxDomainintersect (const Box &b)
 Intersect this BoxDomain with Box b.
BoxDomainaccrete (int sz)
 Grow each Box by size sz.
BoxDomaincomplementIn (const Box &b, const BoxDomain &bl)
 Creates the complement of BoxDomain bl in Box b.

Protected Types

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

Protected Member Functions

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 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 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 (const IntVect &ratio)
 Refine each Box in the BoxList by the ratio.
BoxListcoarsen (const IntVect &ratio)
 Coarsen each Box in the BoxList by the ratio.
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.
std::list< Box > & listBox ()
const std::list< Box > & listBox () const

Protected Attributes

std::list< Boxlbox

Friends

class BoxDomain


Detailed Description

: A List of Disjoint Boxes

A BoxDomain is a BoxList with the restriction that Boxes in the list are disjoint.

Note that a BoxDomain is NOT a BoxList due to the protected inheritance.

This is a concrete class, not a polymorphic one.


Member Typedef Documentation

Reimplemented from BoxList.

typedef std::list<Box>::iterator BoxList::iterator [inherited]


Constructor & Destructor Documentation

BoxDomain::BoxDomain (  ) 

Construct an empty BoxDomain of IndexType::TheCellType().

BoxDomain::BoxDomain ( const Box bx  ) 

A Box Domain out of single Box.

BoxDomain::BoxDomain ( IndexType  itype  )  [explicit]

Construct an empty BoxDomain of IndexType itype.


Member Function Documentation

void BoxDomain::add ( const Box b  ) 

void BoxDomain::add ( const BoxList bl  ) 

Add all Boxes in the BoxList to the domain.

References BoxList::begin(), and BoxList::end().

BoxDomain & BoxDomain::rmBox ( const Box b  ) 

bool BoxDomain::ok (  )  const

Returns True if this BoxDomain is valid.

Checks for disjointness. Returns true if the BoxDomain is empty.

Reimplemented from BoxList.

References BoxList::begin(), BoxList::end(), and BoxList::ok().

Referenced by add(), complementIn(), intersect(), and refine().

BoxList BoxDomain::boxList (  )  const

Create a BoxList from this BoxDomain.

References BoxList::BoxList().

Referenced by operator<<().

bool BoxDomain::operator== ( const BoxDomain rhs  )  const

Are the BoxDomains equal?

References BoxList::operator==().

bool BoxDomain::operator!= ( const BoxDomain rhs  )  const

Are the BoxDomains not equal?

References BoxList::operator==().

BoxDomain & BoxDomain::refine ( int  ratio  ) 

Refine all Boxes in the domain by the refinement ratio.

Reimplemented from BoxList.

References BL_ASSERT, ok(), and BoxList::refine().

Referenced by BoxLib::refine().

BoxDomain & BoxDomain::coarsen ( int  ratio  ) 

Coarsen all Boxes in the domain by the refinement ratio.

Reimplemented from BoxList.

References BoxList::clear(), and BoxList::coarsen().

Referenced by BoxLib::coarsen().

BoxDomain & BoxDomain::intersect ( const Box b  ) 

Intersect this BoxDomain with Box b.

Reimplemented from BoxList.

References BL_ASSERT, BoxList::intersect(), and ok().

Referenced by BoxLib::intersect().

BoxDomain & BoxDomain::accrete ( int  sz  ) 

Grow each Box by size sz.

Reimplemented from BoxList.

References BoxList::accrete(), and BoxList::clear().

Referenced by BoxLib::accrete().

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

Creates the complement of BoxDomain bl in Box b.

References BL_ASSERT, BoxList::complementIn(), and ok().

Referenced by BoxLib::complementIn().

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

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

Prepend a Box to this BoxList.

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

void BoxList::join ( const BoxList blist  )  [inherited]

Join the BoxList to ourselves.

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

void BoxList::catenate ( BoxList blist  )  [inherited]

Catenate the BoxList to ourselves. Removes entries from blist.

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

void BoxList::clear (  )  [inline, inherited]

Remove all Boxes from this BoxList.

References BoxList::lbox.

Referenced by accrete(), FabArrayCopyDescriptor< FAB >::AddBox(), coarsen(), and BoxList::complementIn().

int BoxList::size (  )  const [inline, inherited]

The number of Boxes in this BoxList.

References BoxList::lbox.

Referenced by BoxList::maxSize(), BoxArray::maxSize(), operator<<(), and BoxList::operator==().

BoxList::iterator BoxList::begin (  )  [inline, inherited]

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

References BoxList::lbox.

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

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

References BoxList::lbox.

bool BoxList::operator== ( const BoxList rhs  )  const [inherited]

Is this BoxList equal to rhs?

References BoxList::begin(), BoxList::end(), and BoxList::size().

Referenced by BoxList::operator!=(), operator!=(), and operator==().

bool BoxList::operator!= ( const BoxList rhs  )  const [inherited]

Is this BoxList notequal to rhs?

References BoxList::operator==().

bool BoxList::isEmpty (  )  const [inline, inherited]

Is this BoxList empty?

References BoxList::lbox.

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

bool BoxList::isNotEmpty (  )  const [inline, inherited]

Is this BoxList not empty?

References BoxList::lbox.

Referenced by BoxList::complementIn().

bool BoxList::isDisjoint (  )  const [inherited]

True if the set of intersecting Boxes is empty.

References BoxList::begin(), and BoxList::end().

bool BoxList::contains ( const IntVect v  )  const [inherited]

True if the IntVect is within any of the Boxes in this BoxList.

References BoxList::begin(), and BoxList::end().

Referenced by BoxList::contains().

bool BoxList::contains ( const Box b  )  const [inherited]

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 BoxList::isEmpty().

bool BoxList::contains ( const BoxList bl  )  const [inherited]

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

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

bool BoxList::contains ( const BoxArray ba  )  const [inherited]

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

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

BoxList & BoxList::intersect ( const BoxList b  )  [inherited]

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

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

BoxList & BoxList::remove ( const Box bx  )  [inherited]

Remove the Box from this BoxList.

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

BoxList & BoxList::remove ( iterator  bli  )  [inherited]

Remove the pointed to Box from this BoxList.

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

BoxList & BoxList::complementIn ( const Box b,
const BoxList bl 
) [inherited]

BoxList & BoxList::refine ( const IntVect ratio  )  [inherited]

Refine each Box in the BoxList by the ratio.

References BoxList::begin(), BoxList::end(), and BoxList::refine().

BoxList & BoxList::coarsen ( const IntVect ratio  )  [inherited]

Coarsen each Box in the BoxList by the ratio.

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

BoxList & BoxList::shift ( int  dir,
int  nzones 
) [inherited]

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

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

Referenced by BoxList::shift().

BoxList & BoxList::shiftHalf ( int  dir,
int  num_halfs 
) [inherited]

BoxList & BoxList::shiftHalf ( const IntVect iv  )  [inherited]

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

References BoxList::begin(), BoxList::end(), and BoxList::shiftHalf().

int BoxList::simplify (  )  [inherited]

Merge adjacent Boxes in this BoxList.

Return the number of Boxes merged.

References BoxList::begin(), BoxList::end(), BoxList::lbox, and BoxLib::max().

Referenced by BoxList::minimize().

int BoxList::minimize (  )  [inherited]

Merges all possible adjacent Boxes.

Returns the total number of Boxes merged.

References BoxList::simplify().

BoxList & BoxList::maxSize ( int  chunk  )  [inherited]

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

Referenced by BoxArray::maxSize().

BoxList & BoxList::maxSize ( const IntVect chunk  )  [inherited]

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

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

Box BoxList::minimalBox (  )  const [inherited]

Returns smallest Box that contains all Boxes in this BoxList.

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

IndexType BoxList::ixType (  )  const [inline, inherited]

BoxList & BoxList::surroundingNodes (  )  [inherited]

Applies surroundingNodes(Box) to each Box in BoxArray.

See the documentation of Box for details.

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

Referenced by BoxList::surroundingNodes().

BoxList & BoxList::surroundingNodes ( int  dir  )  [inherited]

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

See the documentation of Box for details.

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

BoxList & BoxList::enclosedCells (  )  [inherited]

BoxList & BoxList::enclosedCells ( int  dir  )  [inherited]

BoxList & BoxList::convert ( IndexType  typ  )  [inherited]

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

References BoxList::begin(), and BoxList::end().

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

References BoxList::lbox.

Referenced by add(), and rmBox().

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

References BoxList::lbox.


Friends And Related Function Documentation

friend class BoxDomain [friend, inherited]


Member Data Documentation

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


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