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

IntVectSet Class Reference

An irregular domain on an integer lattice. More...

#include <IntVectSet.H>

Collaboration diagram for IntVectSet:

Collaboration graph
[legend]
List of all members.

Public Methods

 ~IntVectSet ()
 {\bf Constructors, Destructor, and defines}

 IntVectSet ()
void define ()
 IntVectSet (const IntVectSet &ige_in)
void define (const IntVectSet &ige_in)
IntVectSet copy () const
void define_intvectset (const IntVectSet &ige_in)
 IntVectSet (const DenseIntVectSet &a_dense)
void define (const DenseIntVectSet &a_dense)
 IntVectSet (const TreeIntVectSet &a_tree)
void define (const TreeIntVectSet &a_tree)
 IntVectSet (const IntVect &iv_in)
void define (const IntVect &iv_in)
void define_intvect (const IntVect &iv_in)
 IntVectSet (const Box &b)
void define (const Box &b)
void define_box (const Box &b)
IntVectSet & operator|= (const IntVectSet &ivs)
void or_intvectset (const IntVectSet &ivs)
IntVectSet & operator|= (const IntVect &iv)
void or_intvect (const IntVect &ivs)
IntVectSet & operator|= (const Box &b)
void or_box (const Box &b)
IntVectSet operator- (const IntVectSet &ivs) const
 {\bf complement operators}

IntVectSet operator- (const Box &b) const
IntVectSet operator- (const IntVect &iv) const
IntVectSet & operator-= (const IntVectSet &ivs)
void minus (const IntVectSet &ivs)
IntVectSet & operator-= (const Box &b)
void minus_box (const Box &b)
IntVectSet & operator-= (const IntVect &iv)
void minus_intvect (const IntVect &iv)
IntVectSet & operator &= (const IntVectSet &ivs)
void and_intvectset (const IntVectSet &ivs)
IntVectSet & operator &= (const Box &b)
void and_box (const Box &b)
IntVectSet & operator &= (const ProblemDomain &domain)
void and_domain (const ProblemDomain &d)
void grow (int igrow)
 {\bf modification functions}

IntVectSet & grow (int idir, int igrow)
void grow_dir (int idir, int igrow)
IntVectSet & refine (int iref=2)
IntVectSet & coarsen (int iref=2)
void shift (const IntVect &iv)
void nestingRegion (int radius, const Box &domain)
void nestingRegion (int radius, const ProblemDomain &domain)
void nestingRegion_prob (int radius, const ProblemDomain &domain)
void makeEmpty ()
IntVectSet chop (int dir, int chop_pnt)
int numPts () const
 {\bf accessor and inquiry functions}

const BoxminBox () const
void recalcMinBox () const
bool isEmpty () const
bool isDense () const
bool contains (const IntVect &iv) const
bool contains (const IntVectSet &iv) const
bool contains_intvectset (const IntVectSet &iv) const
bool contains (const Box &box) const
bool contains_box (const Box &b) const
Vector< Boxboxes () const
void compact () const
void printBoxes (std::ostream &a_ostrm) const
void p () const
void convert () const

Static Public Attributes

long int count
long int peakcount

Static Private Methods

void clearStaticMemory ()

Private Attributes

bool m_isdense
TreeIntVectSet m_ivs
DenseIntVectSet m_dense

Friends

class IVSIterator
IntVectSet operator| (const IntVectSet &ivs1, const IntVectSet &ivs2)
 {\bf union operators}

IntVectSet operator| (const IntVectSet &ivs, const IntVect &iv)
IntVectSet operator| (const IntVect &iv, const IntVectSet &ivs)
IntVectSet operator| (const IntVectSet &ivs, const Box &b)
IntVectSet operator| (const Box &b, const IntVectSet &ivs)
IntVectSet operator & (const IntVectSet &ivs1, const IntVectSet &ivs2)
 {\bf Intersection operators}

IntVectSet operator & (const IntVectSet &ivs, const Box &b)
IntVectSet operator & (const Box &b, const IntVectSet &ivs)
IntVectSet grow (const IntVectSet &ivs, int igrow)
IntVectSet refine (const IntVectSet &ivs, int iref=2)
IntVectSet coarsen (const IntVectSet &ivs, int iref=2)
std::ostream & operator<< (std::ostream &os, const IntVectSet &ivs)
void dumpmemoryatexit ()

Detailed Description

An irregular domain on an integer lattice.

IntVectSet represents an irregular region in an integer lattice SpaceDim-dimensional index space as an arbitrary collection of IntVects. A full set calculus is defined. Any IntVect or cell-centered Box can be fully represented as an IntVectSet. There is an iterator that provides access to the contents of an IntVectSet. IntVectSets are implicitly cell-centered. Intersection, union, and complement operations are defined for pairs of IntVectSets (and, by extension, an IntVectSet and an IntVect or an IntVectSet and a Box). The minimum Box of an IntVectSet is defined as the smallest Box that contains every IntVect in the IntVectSet.

The IntVects in an IntVectSet do not have a canonical ordering.


Constructor & Destructor Documentation

IntVectSet::~IntVectSet  
 

{\bf Constructors, Destructor, and defines}

IntVectSet::IntVectSet   [inline]
 

default constructor: defines an empty IntVectSet.

IntVectSet::IntVectSet const IntVectSet &    ige_in [inline]
 

copy constructor: defines this to be a copy of ige_in.

IntVectSet::IntVectSet const DenseIntVectSet   a_dense [explicit]
 

conversion constructor.

IntVectSet::IntVectSet const TreeIntVectSet   a_tree [explicit]
 

conversion constructor.

IntVectSet::IntVectSet const IntVect   iv_in [explicit]
 

IntVect constructor: defines this to be an IntVectSet with just one IntVect.

IntVectSet::IntVectSet const Box   b [explicit]
 

Box constructor: defines this to be an IntVectSet with all the cells in a Box.


Member Function Documentation

void IntVectSet::and_box const Box   b [inline]
 

void IntVectSet::and_domain const ProblemDomain   d [inline]
 

void IntVectSet::and_intvectset const IntVectSet &    ivs [inline]
 

Vector<Box> IntVectSet::boxes   const
 

Returns Vector<Box> representation of this IntVectSet.

IntVectSet IntVectSet::chop int    dir,
int    chop_pnt
 

Chop the IntVectSet at the chop_pnt in the dir direction \ Returns one IntVectSet and modifies the object IntVectSet. \ The union of the two is the original IntVectSet. \ The modified IntVectSet is the low end, the returned IntvectSet \ is the high end.

void IntVectSet::clearStaticMemory   [static, private]
 

IntVectSet& IntVectSet::coarsen int    iref = 2
 

Modifies this IntVectSet by coarsening it by a specified factor iref. It is an error if iref <= 0. Definition of coarsening: For each IntVect iv in the original IntVectSet, the refined IntVectSet will contain the IntVect coarsen(iv,iref).\ {\bf This:} \ ---This object is modified.---

void IntVectSet::compact   const
 

attempts to optimize storage for IntVectSet. This will also optimize iteration through the IntVectSet later. Best to call it when you are no longer modifying the IntVectSet

bool IntVectSet::contains const Box   box const
 

is every IntVect in this 'box' contained in the IntvectSet. note: this is not performed in a crude point-wise fashion and is faster than a user doing it pointwise themselves

bool IntVectSet::contains const IntVectSet &    iv const
 

Does this IntVectSet contain the argument IntVectSet?

bool IntVectSet::contains const IntVect   iv const
 

Does this IntVectSet contain the argument IntVect?

bool IntVectSet::contains_box const Box   b const [inline]
 

bool IntVectSet::contains_intvectset const IntVectSet &    iv const [inline]
 

void IntVectSet::convert   const
 

IntVectSet IntVectSet::copy   const [inline]
 

void IntVectSet::define const Box   b
 

void IntVectSet::define const IntVect   iv_in
 

void IntVectSet::define const TreeIntVectSet   a_tree
 

void IntVectSet::define const DenseIntVectSet   a_dense
 

void IntVectSet::define const IntVectSet &    ige_in [inline]
 

void IntVectSet::define  
 

void IntVectSet::define_box const Box   b [inline]
 

void IntVectSet::define_intvect const IntVect   iv_in [inline]
 

void IntVectSet::define_intvectset const IntVectSet &    ige_in [inline]
 

IntVectSet& IntVectSet::grow int    idir,
int    igrow
 

Modifies this IntVectSet by growing it by the specified number of cells in the specified coordinate direction. Directions are zero-based.\ {\bf Arguments:} \ idir (not modified): zero-based coordinate direction to grow in.\ igrow (not modified): number of cells to grow.\ {\bf Returns:} \ This IntVectSet grown by igrow the direction idir.\ {\bf This:} \ ---This object is modified.---

void IntVectSet::grow int    igrow
 

{\bf modification functions}

Modifies this IntVectSet by growing it by the specified number of cells in all directions, including diagonal. It is an error if igrow < 0. \ {\bf Arguments:} \ igrow (not modified): number of cells to grow.\ {\bf Returns:} \ This IntVectSet grown by igrow in all directions.\ {\bf This:} \ ---This object is modified.---

void IntVectSet::grow_dir int    idir,
int    igrow
[inline]
 

bool IntVectSet::isDense   const [inline]
 

Returns true if this IntVectSet is currently being represented in a dense fashion

bool IntVectSet::isEmpty   const
 

Returns true if no cells are in this IntVectSet.

void IntVectSet::makeEmpty  
 

sets this IntVectSet to be empty

const Box& IntVectSet::minBox   const
 

Returns minimum enclosing box of this IntVectSet.

void IntVectSet::minus const IntVectSet &    ivs [inline]
 

void IntVectSet::minus_box const Box   b [inline]
 

void IntVectSet::minus_intvect const IntVect   iv [inline]
 

void IntVectSet::nestingRegion int    radius,
const ProblemDomain   domain
 

remove all IntVects that are not at least 'radius' from the the edge of the IntVectSet in any direction. 'radius' must be positive IntVects that border non-periodic boundaries are spared from this trimming. Radius extends across periodic images.

void IntVectSet::nestingRegion int    radius,
const Box   domain
 

remove all IntVects that are not at least 'radius' from the the edge of the IntVectSet in any direction. 'radius' must be positive IntVects that border the box 'domain' are spared from this trimming

void IntVectSet::nestingRegion_prob int    radius,
const ProblemDomain   domain
[inline]
 

int IntVectSet::numPts   const
 

{\bf accessor and inquiry functions}

Returns number of IntVects in this IntVectSet.

IntVectSet& IntVectSet::operator &= const ProblemDomain   domain
 

Modifies this IntVectSet to be its intersection with a ProblemDomain. \ {\bf Arguments:} \ domain (not modified): \ {\bf Returns:} \ The intersection of the this IntVectSet and the ProblemDomain.\ {\bf This:} \ ---This object is modified.---

IntVectSet& IntVectSet::operator &= const Box   b
 

Modifies this IntVectSet to be its intersection with a Box. \ {\bf Arguments:} \ box (not modified): \ {\bf Returns:} \ The intersection of the this IntVectSet and the Box.\ {\bf This:} \ ---This object is modified.---

IntVectSet& IntVectSet::operator &= const IntVectSet &    ivs
 

Sets this IntVectSet to its intersection with another IntVectSet. \ {\bf Arguments:} \ ivs (not modified): \ {\bf Returns:} \ The intersection of the two IntVectSets.\ {\bf This:} \ ---This object is modified.---

IntVectSet IntVectSet::operator- const IntVect   iv const
 

Return the complement of the argument IntVect within this IntVectSet.

IntVectSet IntVectSet::operator- const Box   b const
 

Return the complement of the argument Box within this IntVectSet.

IntVectSet IntVectSet::operator- const IntVectSet &    ivs const
 

{\bf complement operators}

Return the complement of the argument IntVectSet within this IntVectSet.

IntVectSet& IntVectSet::operator-= const IntVect   iv
 

Modifies this IntVectSet to be the complement of the argument IntVect within this IntVectSet.\ {\bf This:} \ ---This object is modified.---

IntVectSet& IntVectSet::operator-= const Box   b
 

Modifies this IntVectSet to be the complement of the argument Box within this IntVectSet. \ {\bf This:} \ ---This object is modified.---

IntVectSet& IntVectSet::operator-= const IntVectSet &    ivs
 

Modifies this IntVectSet to be the complement of the argument IntVectSet within this IntVectSet. \ {\bf This:} \ ---This object is modified.---

IntVectSet& IntVectSet::operator|= const Box   b
 

Sets this IntVectSet to its union with a Box. \ {\bf Arguments:} \ box (not modified): \ {\bf Returns:} \ The union of this IntVect and the Box.\ {\bf This:} \ ---The object is modified---

IntVectSet& IntVectSet::operator|= const IntVect   iv
 

Sets this IntVectSet to its union with an IntVect. \ {\bf Arguments:} \ iv (not modified): \ {\bf Returns:} \ The union of this IntVectSet and the IntVect.\ {\bf This:} \ ---The object is modified---

IntVectSet& IntVectSet::operator|= const IntVectSet &    ivs
 

Sets this IntVectSet to its union with another IntVectSet. \ {\bf Arguments:} \ ivs (not modified): \ {\bf Returns:} \ The union of the two IntVectSets.\ {\bf This:} \ ---The object is modified---

void IntVectSet::or_box const Box   b [inline]
 

void IntVectSet::or_intvect const IntVect   ivs [inline]
 

void IntVectSet::or_intvectset const IntVectSet &    ivs [inline]
 

void IntVectSet::p   const [inline]
 

void IntVectSet::printBoxes std::ostream &    a_ostrm const
 

Write Vector<Box> representation to an output stream.

void IntVectSet::recalcMinBox   const
 

Forces recalculation of actual minimum box for this IntVectSet

IntVectSet& IntVectSet::refine int    iref = 2
 

Modifies this IntVectSet by refining it by a specified factor iref. It is an error if iref <= 0. Definition of refinement: For each IntVect iv in the original IntVectSet, the refined IntVectSet will contain the Box refine(Box(iv,iv),iref).\ {\bf This:} \ ---This object is modified.---

void IntVectSet::shift const IntVect   iv
 

Increment all the IntVects in this IntVectSet by the given iv.\ --this IS changed--


Friends And Related Function Documentation

IntVectSet coarsen const IntVectSet &    ivs,
int    iref = 2
[friend]
 

Returns the IntVectSet that is the argument IntVectSet coarsened by a specified factor iref. It is an error if iref <= 0. Definition of coarsening: For each IntVect iv in the original IntVectSet, the refined IntVectSet will contain the IntVect coarsen(iv,iref).

void dumpmemoryatexit   [friend]
 

IntVectSet grow const IntVectSet &    ivs,
int    igrow
[friend]
 

Returns the argument IntVectSet grown it by the specified number of cells in all directions, including diagonal. \ {\bf Arguments:} \ ivs (not modified): \ igrow (not midified): number of cells to grow.\ {\bf Returns:} \ The argument IntVectSet grown by igrow in all directions.\

friend class IVSIterator [friend]
 

IntVectSet operator & const Box   b,
const IntVectSet &    ivs
[friend]
 

Returns the intersection of an IntVectSet and a Box. \ {\bf Arguments:} \ ivs (not modified): \ {\bf Returns:} \ The intersection of the IntVectSet and the Box.\

IntVectSet operator & const IntVectSet &    ivs,
const Box   b
[friend]
 

Returns the intersection of an IntVectSet and a Box. \ {\bf Arguments:} \ ivs (not modified): \ {\bf Returns:} \ The intersection of the IntVectSet and the Box.\

IntVectSet operator & const IntVectSet &    ivs1,
const IntVectSet &    ivs2
[friend]
 

{\bf Intersection operators}

Returns the intersection of two IntVectSets. The result may be empty.\ {\bf Arguments:} \ ivs1, ivs2 (not modified): \ {\bf Returns:} \ The intersection of the two IntVectSets ivs1 and ivs2.\

std::ostream& operator<< std::ostream &    os,
const IntVectSet &    ivs
[friend]
 

IntVectSet operator| const Box   b,
const IntVectSet &    ivs
[friend]
 

Returns the union of an IntVectSet and a Box. \ {\bf Arguments:} \ ivs (not midified): \ b (not modified): \ {\bf Returns:} \ The union of the IntVectSet ivs and the Box b.\

IntVectSet operator| const IntVectSet &    ivs,
const Box   b
[friend]
 

Returns the union of an IntVectSet and a Box. \ {\bf Arguments:} \ ivs (not midified): \ b (not modified): \ {\bf Returns:} \ The union of the IntVectSet ivs and the Box b.\

IntVectSet operator| const IntVect   iv,
const IntVectSet &    ivs
[friend]
 

Returns the union of an IntVectSet and an IntVect. \ {\bf Arguments:} \ ivs (not modified) \ iv (not modified): \ {\bf Returns:} \ The union of the IntVectSet ivs and the IntVect iv.\

IntVectSet operator| const IntVectSet &    ivs,
const IntVect   iv
[friend]
 

Returns the union of an IntVectSet and an IntVect. \ {\bf Arguments:} \ ivs (not modified) \ iv (not modified): \ {\bf Returns:} \ The union of the IntVectSet ivs and the IntVect iv.\

IntVectSet operator| const IntVectSet &    ivs1,
const IntVectSet &    ivs2
[friend]
 

{\bf union operators}

Returns the union of two IntVectSets. \ {\bf Arguments:} \ ivs1, ivs2 (not modified): \ {\bf Returns:} \ The union of the two IntVectSets ivs1 and ivs2.\

IntVectSet refine const IntVectSet &    ivs,
int    iref = 2
[friend]
 

Returns the IntVectSet that is the argument IntVectSet refined by a specified factor iref. It is an error if iref <= 0. Definition of refinement: For each IntVect iv in the original IntVectSet, the refined IntVectSet will contain the Box refine(Box(iv,iv),iref).


Member Data Documentation

long int IntVectSet::count [static]
 

DenseIntVectSet IntVectSet::m_dense [private]
 

bool IntVectSet::m_isdense [private]
 

TreeIntVectSet IntVectSet::m_ivs [private]
 

long int IntVectSet::peakcount [static]
 


The documentation for this class was generated from the following file:
Generated on Wed Apr 16 14:35:22 2003 for EBChombo by doxygen1.2.16