Chombo + EB + MF  3.2
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
DenseIntVectSet Class Reference

Dense representation implementation of IntVectSet class. More...

#include <DenseIntVectSet.H>

Public Member Functions

 DenseIntVectSet ()
 
 DenseIntVectSet (const Box &a_domain, bool init=true)
 
DenseIntVectSetoperator-= (const Box &box)
 
DenseIntVectSetoperator-= (const IntVect &intvect)
 
DenseIntVectSetoperator-= (const DenseIntVectSet &ivs)
 
DenseIntVectSetoperator &= (const Box &box)
 
DenseIntVectSetoperator &= (const ProblemDomain &domain)
 
DenseIntVectSetoperator|= (const IntVect &intvect)
 
DenseIntVectSetoperator|= (const Box &b)
 
DenseIntVectSetoperator|= (const DenseIntVectSet &b)
 
DenseIntVectSetoperator &= (const DenseIntVectSet &ivs)
 
void shift (const IntVect &iv)
 Shift every cell in the set by the input. Fast. More...
 
bool operator[] (const IntVect &index) const
 O(1) time inquiry of containment. More...
 
bool contains (const Box &box) const
 O(1) time inquiry of containment. More...
 
void coarsen (int iref)
 
void refine (int iref)
 
void grow (int igrow)
 
void grow (int idir, int igrow)
 
void growHi ()
 
void growHi (const int a_dir)
 
void makeEmptyBits ()
 
DenseIntVectSet chop (int dir, int chop_pnt)
 
const Boxbox () const
 
void nestingRegion (int a_radius, const Box &a_domain)
 
void nestingRegion (int a_radius, const ProblemDomain &a_domain)
 
bool isEmpty () const
 cheaper than numPts()==0 by wide margin More...
 
bool isFull () const
 cheaper than numPts()==box().numPts(), by significant margin More...
 
bool isHighEmpty () const
 
bool isHighEmpty (const int a_dir) const
 
int numPts () const
 
bool operator== (const DenseIntVectSet &a_lhs) const
 
bool operator< (const DenseIntVectSet &a_ivs) const
 
Vector< BoxcreateBoxes () const
 
void compact () const
 
void recalcMinBox () const
 
const BoxmBox () const
 
Linearization routines
int linearSize () const
 
void linearIn (const void *const inBuf)
 
void linearOut (void *const a_outBuf) const
 

Private Member Functions

void grow (const IntVect &iv)
 
DenseIntVectSetintersect (const DenseIntVectSet &rhs)
 
bool isHighEmpty (const int a_dirS, const int a_dirE) const
 

Private Attributes

Box m_domain
 
BitSet m_bits
 
Box m_minBox
 

Friends

class DenseIntVectSetIterator
 

Detailed Description

Dense representation implementation of IntVectSet class.

Performance-oriented class that reproduces most of the functionality of IntVectSet. This object stores a dense representation of an IntVectSet over the box of definition

Storage is performed with a BitSet. This stores 0 or 1 on a per-bit basis for each location in the IntVectSet.

For an explanation of undocumented functions look at IntVectSet

See also
IntVectSet

Constructor & Destructor Documentation

◆ DenseIntVectSet() [1/2]

DenseIntVectSet::DenseIntVectSet ( )
inline

◆ DenseIntVectSet() [2/2]

DenseIntVectSet::DenseIntVectSet ( const Box a_domain,
bool  init = true 
)

you can either have the domain begin all true, or all false

Member Function Documentation

◆ operator-=() [1/3]

DenseIntVectSet& DenseIntVectSet::operator-= ( const Box box)

make this set the complement of itself and the input

Referenced by DenseIntVectSet().

◆ operator-=() [2/3]

DenseIntVectSet & DenseIntVectSet::operator-= ( const IntVect intvect)
inline

make this set the complement of itself and the input

References Box::contains(), Box::index(), m_bits, m_domain, and BitSet::setFalse().

◆ operator-=() [3/3]

DenseIntVectSet& DenseIntVectSet::operator-= ( const DenseIntVectSet ivs)

make this set the complement of itself and the input

◆ operator &=() [1/3]

DenseIntVectSet& DenseIntVectSet::operator&= ( const Box box)

make this set the intersection of itself and the input

Referenced by DenseIntVectSet().

◆ operator &=() [2/3]

DenseIntVectSet& DenseIntVectSet::operator&= ( const ProblemDomain domain)

make this set the intersection of itself and the input

◆ operator|=() [1/3]

DenseIntVectSet& DenseIntVectSet::operator|= ( const IntVect intvect)

make this set the union of itself and the input. intvect MUST be within the domain of of the DenseIntVectSet or this will throw an error

Referenced by DenseIntVectSet().

◆ operator|=() [2/3]

DenseIntVectSet& DenseIntVectSet::operator|= ( const Box b)

make this set the union of itself and the input. b MUST be within the domain of of the DenseIntVectSet or this will throw an error

◆ operator|=() [3/3]

DenseIntVectSet& DenseIntVectSet::operator|= ( const DenseIntVectSet b)

make this set the union of itself and the input. resulting DenseIntVectSet has domain of the minBox holding both oeprator and operand

◆ operator &=() [3/3]

DenseIntVectSet& DenseIntVectSet::operator&= ( const DenseIntVectSet ivs)

make this set the intersection of itself and the input

◆ shift()

void DenseIntVectSet::shift ( const IntVect iv)
inline

Shift every cell in the set by the input. Fast.

Shift every cell in the set by the input.

References m_domain, m_minBox, and Box::shift().

Referenced by DenseIntVectSet().

◆ operator[]()

bool DenseIntVectSet::operator[] ( const IntVect index) const

O(1) time inquiry of containment.

Referenced by DenseIntVectSet().

◆ contains()

bool DenseIntVectSet::contains ( const Box box) const

O(1) time inquiry of containment.

returns 'true' if the entire set of points specified by the box 'b' is a member of the IntvectSet

Referenced by DenseIntVectSet().

◆ coarsen()

void DenseIntVectSet::coarsen ( int  iref)

coarsen the set by the input

Referenced by DenseIntVectSet().

◆ refine()

void DenseIntVectSet::refine ( int  iref)

refine the set by the input

Referenced by DenseIntVectSet().

◆ grow() [1/3]

void DenseIntVectSet::grow ( int  igrow)

grow the set by the input

Referenced by DenseIntVectSet(), and mBox().

◆ grow() [2/3]

void DenseIntVectSet::grow ( int  idir,
int  igrow 
)

grow the set by the input

◆ growHi() [1/2]

void DenseIntVectSet::growHi ( )
See also
IntVectSet::growHi

Referenced by DenseIntVectSet().

◆ growHi() [2/2]

void DenseIntVectSet::growHi ( const int  a_dir)

◆ makeEmptyBits()

void DenseIntVectSet::makeEmptyBits ( )

Make empty by setting all bits to false

Referenced by DenseIntVectSet().

◆ chop()

DenseIntVectSet DenseIntVectSet::chop ( int  dir,
int  chop_pnt 
)

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

See also
IntVectSet::chop

Referenced by DenseIntVectSet().

◆ box()

const Box & DenseIntVectSet::box ( ) const
inline

References m_domain.

Referenced by DenseIntVectSet().

◆ nestingRegion() [1/2]

void DenseIntVectSet::nestingRegion ( int  a_radius,
const Box a_domain 
)

◆ nestingRegion() [2/2]

void DenseIntVectSet::nestingRegion ( int  a_radius,
const ProblemDomain a_domain 
)

◆ isEmpty()

bool DenseIntVectSet::isEmpty ( ) const

cheaper than numPts()==0 by wide margin

return true if the set has no points

Referenced by DenseIntVectSet().

◆ isFull()

bool DenseIntVectSet::isFull ( ) const

cheaper than numPts()==box().numPts(), by significant margin

return true if the set consists of a set of a full box

Referenced by DenseIntVectSet().

◆ isHighEmpty() [1/3]

bool DenseIntVectSet::isHighEmpty ( ) const

Return true if all bits on the high hyperfaces are zero

Referenced by DenseIntVectSet(), and mBox().

◆ isHighEmpty() [2/3]

bool DenseIntVectSet::isHighEmpty ( const int  a_dir) const

Return true if all bits on the high hyperface are zero

◆ numPts()

int DenseIntVectSet::numPts ( ) const

return the number of points in the set

Referenced by DenseIntVectSet().

◆ operator==()

bool DenseIntVectSet::operator== ( const DenseIntVectSet a_lhs) const

Referenced by DenseIntVectSet().

◆ operator<()

bool DenseIntVectSet::operator< ( const DenseIntVectSet a_ivs) const

Primary sorting criterion: Box::operator<() applied to m_domain. Secondary sorting criterion: BitSet::operator<() applied to m_bits.

Referenced by DenseIntVectSet().

◆ createBoxes()

Vector<Box> DenseIntVectSet::createBoxes ( ) const

turn DenseIntVectSet into a Vector of Boxes

Referenced by DenseIntVectSet().

◆ compact()

void DenseIntVectSet::compact ( ) const

set object to its minimum representation. changes data, but is a logically const operation

Referenced by DenseIntVectSet().

◆ recalcMinBox()

void DenseIntVectSet::recalcMinBox ( ) const

Referenced by DenseIntVectSet().

◆ mBox()

const Box& DenseIntVectSet::mBox ( ) const
inline

◆ linearSize()

int DenseIntVectSet::linearSize ( ) const

Referenced by mBox().

◆ linearIn()

void DenseIntVectSet::linearIn ( const void *const  inBuf)

Referenced by mBox().

◆ linearOut()

void DenseIntVectSet::linearOut ( void *const  a_outBuf) const

Referenced by mBox().

◆ grow() [3/3]

void DenseIntVectSet::grow ( const IntVect iv)
private

◆ intersect()

DenseIntVectSet& DenseIntVectSet::intersect ( const DenseIntVectSet rhs)
private

Referenced by mBox().

◆ isHighEmpty() [3/3]

bool DenseIntVectSet::isHighEmpty ( const int  a_dirS,
const int  a_dirE 
) const
private

Friends And Related Function Documentation

◆ DenseIntVectSetIterator

friend class DenseIntVectSetIterator
friend

Member Data Documentation

◆ m_domain

Box DenseIntVectSet::m_domain
private

◆ m_bits

BitSet DenseIntVectSet::m_bits
private

◆ m_minBox

Box DenseIntVectSet::m_minBox
private

Referenced by mBox(), and shift().


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