class IntVectSet

An irregular domain on an integer lattice

Inheritance:

IntVectSet


public members:

~IntVectSet()
Constructors, Destructor, and defines
IntVectSet()
IntVectSet(const IntVectSet & ige_in)
explicit IntVectSet(const DenseIntVectSet & a_dense)
explicit IntVectSet(const TreeIntVectSet & a_tree)
explicit IntVectSet(const IntVect& iv_in)
explicit IntVectSet(const Box& b)

union operators
friend IntVectSet operator|(const IntVectSet & ivs1, const IntVectSet & ivs2)
friend IntVectSet operator|(const IntVectSet & ivs, const IntVect& iv)
friend IntVectSet operator|(const IntVect& iv, const IntVectSet & ivs)
friend IntVectSet operator|(const IntVectSet & ivs, const Box& b)
friend IntVectSet operator|(const Box& b, const IntVectSet & ivs)
IntVectSet & operator|=(const IntVectSet & ivs)
IntVectSet & operator|=(const IntVect& iv)
IntVectSet & operator|=(const Box& b)

complement operators
IntVectSet operator-(const IntVectSet & ivs) const
IntVectSet operator-(const Box& b) const
IntVectSet operator-(const IntVect& iv) const
IntVectSet & operator-=(const IntVectSet & ivs)
IntVectSet & operator-=(const Box& b)
IntVectSet & operator-=(const IntVect& iv)

Intersection operators
friend IntVectSet operator&(const IntVectSet & ivs1, const IntVectSet & ivs2)
friend IntVectSet operator&(const IntVectSet & ivs, const Box& b)
friend IntVectSet operator&(const Box& b, const IntVectSet & ivs)
IntVectSet & operator&=(const IntVectSet & ivs)
IntVectSet & operator&=(const Box& b)
IntVectSet & operator&=(const ProblemDomain & domain)

modification functions
void grow(int igrow)
friend IntVectSet grow(const IntVectSet & ivs, int igrow)
IntVectSet & grow(int idir, int igrow)
IntVectSet & refine(int iref = 2)
friend IntVectSet refine(const IntVectSet & ivs, int iref = 2)
IntVectSet & coarsen(int iref = 2)
friend IntVectSet coarsen(const IntVectSet & ivs, int iref = 2)
void shift(const IntVect& iv)
void nestingRegion(int radius, const Box& domain)
void nestingRegion(int radius, const ProblemDomain & domain)
void makeEmpty()
IntVectSet chop(int dir, int chop_pnt)

accessor and inquiry functions
int numPts() const
const Box& minBox() const
bool isEmpty() const
bool isDense() const
bool contains(const IntVect& iv) const
bool contains(const IntVectSet & iv) const
bool contains(const Box& box ) const
Vector <Box> boxes() const
void compact() const
void printBoxes(std::ostream& a_ostrm) const

Documentation

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.

IntVectSet ()
default constructor: defines an empty IntVectSet.

IntVectSet (const IntVectSet & ige_in)
copy constructor: defines this to be a copy of ige_in.

explicit IntVectSet (const DenseIntVectSet & a_dense)
conversion constructor.

explicit IntVectSet (const TreeIntVectSet & a_tree)
conversion constructor.

explicit IntVectSet (const IntVect& iv_in)
IntVect constructor: defines this to be an IntVectSet with just one IntVect.

explicit IntVectSet (const Box& b)
Box constructor: defines this to be an IntVectSet with all the cells in a Box.

friend IntVectSet operator| (const IntVectSet & ivs1, const IntVectSet & ivs2)
Returns the union of two IntVectSets.
Arguments:
ivs1, ivs2 (not modified):
Returns:
The union of the two IntVectSets ivs1 and ivs2.

friend IntVectSet operator| (const IntVectSet & ivs, const IntVect& iv)
Returns the union of an IntVectSet and an IntVect.
Arguments:
ivs (not modified)
iv (not modified):
Returns:
The union of the IntVectSet ivs and the IntVect iv.

friend IntVectSet operator| (const IntVect& iv, const IntVectSet & ivs)
Returns the union of an IntVectSet and an IntVect.
Arguments:
ivs (not modified)
iv (not modified):
Returns:
The union of the IntVectSet ivs and the IntVect iv.

friend IntVectSet operator| (const IntVectSet & ivs, const Box& b)
Returns the union of an IntVectSet and a Box.
Arguments:
ivs (not midified):
b (not modified):
Returns:
The union of the IntVectSet ivs and the Box b.

friend IntVectSet operator| (const Box& b, const IntVectSet & ivs)
Returns the union of an IntVectSet and a Box.
Arguments:
ivs (not midified):
b (not modified):
Returns:
The union of the IntVectSet ivs and the Box b.

IntVectSet & operator|= (const IntVectSet & ivs)
Sets this IntVectSet to its union with another IntVectSet.
Arguments:
ivs (not modified):
Returns:
The union of the two IntVectSets.
This:
---The object is modified---

IntVectSet & operator|= (const IntVect& iv)
Sets this IntVectSet to its union with an IntVect.
Arguments:
iv (not modified):
Returns:
The union of this IntVectSet and the IntVect.
This:
---The object is modified---

IntVectSet & operator|= (const Box& b)
Sets this IntVectSet to its union with a Box.
Arguments:
box (not modified):
Returns:
The union of this IntVect and the Box.
This:
---The object is modified---

IntVectSet operator- (const IntVectSet & ivs) const
Return the complement of the argument IntVectSet within this IntVectSet.

IntVectSet operator- (const Box& b) const
Return the complement of the argument Box within this IntVectSet.

IntVectSet operator- (const IntVect& iv) const
Return the complement of the argument IntVect within this IntVectSet.

IntVectSet & operator-= (const IntVectSet & ivs)
Modifies this IntVectSet to be the complement of the argument IntVectSet within this IntVectSet.
This:
---This object is modified.---

IntVectSet & operator-= (const Box& b)
Modifies this IntVectSet to be the complement of the argument Box within this IntVectSet.
This:
---This object is modified.---

IntVectSet & operator-= (const IntVect& iv)
Modifies this IntVectSet to be the complement of the argument IntVect within this IntVectSet.
This:
---This object is modified.---

friend IntVectSet operator& (const IntVectSet & ivs1, const IntVectSet & ivs2)
Returns the intersection of two IntVectSets. The result may be empty.
Arguments:
ivs1, ivs2 (not modified):
Returns:
The intersection of the two IntVectSets ivs1 and ivs2.

friend IntVectSet operator& (const IntVectSet & ivs, const Box& b)
Returns the intersection of an IntVectSet and a Box.
Arguments:
ivs (not modified):
Returns:
The intersection of the IntVectSet and the Box.

friend IntVectSet operator& (const Box& b, const IntVectSet & ivs)
Returns the intersection of an IntVectSet and a Box.
Arguments:
ivs (not modified):
Returns:
The intersection of the IntVectSet and the Box.

IntVectSet & operator&= (const IntVectSet & ivs)
Sets this IntVectSet to its intersection with another IntVectSet.
Arguments:
ivs (not modified):
Returns:
The intersection of the two IntVectSets.
This:
---This object is modified.---

IntVectSet & operator&= (const Box& b)
Modifies this IntVectSet to be its intersection with a Box.
Arguments:
box (not modified):
Returns:
The intersection of the this IntVectSet and the Box.
This:
---This object is modified.---

IntVectSet & operator&= (const ProblemDomain & domain)
Modifies this IntVectSet to be its intersection with a ProblemDomain.
Arguments:
domain (not modified):
Returns:
The intersection of the this IntVectSet and the ProblemDomain.
This:
---This object is modified.---

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

friend IntVectSet grow (const IntVectSet & ivs, int igrow)
Returns the argument IntVectSet grown it by the specified number of cells in all directions, including diagonal.
Arguments:
ivs (not modified):
igrow (not midified): number of cells to grow.
Returns:
The argument IntVectSet grown by igrow in all directions.

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.
Arguments:
idir (not modified): zero-based coordinate direction to grow in.
igrow (not modified): number of cells to grow.
Returns:
This IntVectSet grown by igrow the direction idir.
This:
---This object is modified.---

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).
This:
---This object is modified.---

friend IntVectSet refine (const IntVectSet & ivs, int iref = 2)
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).

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).
This:
---This object is modified.---

friend IntVectSet coarsen (const IntVectSet & ivs, int iref = 2)
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 shift (const IntVect& iv)
Increment all the IntVects in this IntVectSet by the given iv.
--this IS changed--

void 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 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 makeEmpty ()
sets this IntVectSet to be empty

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.

int numPts () const
Returns number of IntVects in this IntVectSet.

const Box& minBox () const
Returns minimum enclosing box of this IntVectSet.

bool isEmpty () const
Returns true if no cells are in this IntVectSet.

bool isDense () const
Returns true if this IntVectSet is currently being represented in a dense fashion

bool contains (const IntVect& iv) const
Does this IntVectSet contain the argument IntVect?

bool contains (const IntVectSet & iv) const
Does this IntVectSet contain the argument IntVectSet?

bool 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

Vector <Box> boxes () const
Returns Vector<Box> representation of this IntVectSet.

void 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

void printBoxes (std::ostream& a_ostrm) const
Write Vector<Box> representation to an output stream.


this class has no child classes.

alphabetic index hierarchy of classes


Chombo

Copyright Notice

This software is copyright (C) by the Lawrence Berkeley National Laboratory. Permission is granted to reproduce this software for non-commercial purposes provided that this notice is left intact.

It is acknowledged that the U.S. Government has rights to this software under Contract DE-AC03-765F00098 between the U.S. Department of Energy and the University of California.

This software is provided as a professional and academic contribution for joint exchange. Thus it is experimental, is provided ``as is'', with no warranties of any kind whatsoever, no support, no promise of updates, or printed documentation. By using this software, you acknowledge that the Lawrence Berkeley National Laboratory and Regents of the University of California shall have no liability with respect to the infringement of other copyrights by any part of this software.