Chombo + EB + MF  3.2
Public Member Functions | Protected Attributes | List of all members
BoundaryIterator Class Reference

iterates through the IntVects on the surface of a Box More...

#include <BoundaryIterator.H>

Public Member Functions

 BoundaryIterator ()
 
 BoundaryIterator (const Box &a_bx)
 
void setBox (const Box &a_bx)
 
void define (const Box &a_bx)
 
 ~BoundaryIterator ()
 
void begin ()
 
void reset ()
 
void operator++ ()
 
void next ()
 
const IntVectoperator() () const
 
bool ok () const
 
const Boxbox () const
 
void nextBox ()
 

Protected Attributes

BoxIterator m_current
 
Box m_box [CH_SPACEDIM *2]
 
int m_sdir
 

Detailed Description

iterates through the IntVects on the surface of a Box

BoundaryIterator iterates through the IntVects on the surface of a box. The actual sqeuence of IntVects is implementation-specific. Typical usage:

Box b; ... BoundaryIterator bit (b); for (bit.begin(); bit.ok(); ++bit) { IntVect iv = bit(); (do operations involving iv) }

Constructor & Destructor Documentation

◆ BoundaryIterator() [1/2]

BoundaryIterator::BoundaryIterator ( )
inline

Default constructor. This constructs an invalid iterator. The user must call define before using.

References CH_SPACEDIM, and m_sdir.

◆ BoundaryIterator() [2/2]

BoundaryIterator::BoundaryIterator ( const Box a_bx)
inline

Constructs a BoundaryIterator and associates it with a Box. Arguments: a_bx (not modified) the Box to iterate over.

References define().

◆ ~BoundaryIterator()

BoundaryIterator::~BoundaryIterator ( )
inline

Member Function Documentation

◆ setBox()

void BoundaryIterator::setBox ( const Box a_bx)

◆ define()

void BoundaryIterator::define ( const Box a_bx)

Associates a Box with this BoundaryIterator. Arguments: a_bx (not modified) the Box to iterate over.

Referenced by BoundaryIterator().

◆ begin()

void BoundaryIterator::begin ( )
inline

Sets this BoundaryIterator to the first IntVect in its Box. The definition of the "first" IntVect is implementation-dependent.

References BoxIterator::define(), m_box, m_current, and m_sdir.

Referenced by reset(), and ~BoundaryIterator().

◆ reset()

void BoundaryIterator::reset ( )
inline

Sets this BoundaryIterator to the first IntVect in its Box. The definition of the "first" IntVect is implementation-dependent.

References begin().

Referenced by ~BoundaryIterator().

◆ operator++()

void BoundaryIterator::operator++ ( )
inline

Modifies this BoundaryIterator to set it to the next location in its Box. The definition of the "next location" of a Box is implementation-dependent.

References next().

Referenced by ~BoundaryIterator().

◆ next()

void BoundaryIterator::next ( )
inline

◆ operator()()

const IntVect & BoundaryIterator::operator() ( ) const
inline

Returns the value of the InVect for the current location of this BoundaryIterator.

References m_current.

Referenced by ~BoundaryIterator().

◆ ok()

bool BoundaryIterator::ok ( ) const
inline

Returns true if this BoundaryIterator's location is within its Box.

References CH_SPACEDIM, and m_sdir.

Referenced by box(), nextBox(), and ~BoundaryIterator().

◆ box()

const Box & BoundaryIterator::box ( ) const
inline

Can request the current boundary box that this iterator is working on

References CH_assert, m_box, m_sdir, and ok().

Referenced by ~BoundaryIterator().

◆ nextBox()

void BoundaryIterator::nextBox ( )
inline

skip to the next boundary box in this iterator

References BoxIterator::define(), m_box, m_current, m_sdir, and ok().

Referenced by ~BoundaryIterator().

Member Data Documentation

◆ m_current

BoxIterator BoundaryIterator::m_current
protected

Referenced by begin(), next(), nextBox(), and operator()().

◆ m_box

Box BoundaryIterator::m_box[CH_SPACEDIM *2]
protected

Referenced by begin(), box(), next(), and nextBox().

◆ m_sdir

int BoundaryIterator::m_sdir
protected

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