#include <BoundaryIterator.H>
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) }
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 IntVect & | operator() () const |
bool | ok () const |
const Box & | box () const |
void | nextBox () |
Protected Attributes | |
BoxIterator | m_current |
Box | m_box [CH_SPACEDIM *2] |
int | m_sdir |
BoundaryIterator::BoundaryIterator | ( | ) | [inline] |
Default constructor. This constructs an invalid iterator. The user must call define before using.
References CH_SPACEDIM, and m_sdir.
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 | ( | ) | [inline] |
void BoundaryIterator::setBox | ( | const Box & | a_bx | ) |
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().
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().
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().
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().
void BoundaryIterator::next | ( | ) | [inline] |
References BoxIterator::begin(), CH_SPACEDIM, BoxIterator::define(), m_box, m_current, m_sdir, BoxIterator::next(), and BoxIterator::ok().
Referenced by operator++().
const IntVect & BoundaryIterator::operator() | ( | ) | const [inline] |
Returns the value of the InVect for the current location of this BoundaryIterator.
References m_current.
bool BoundaryIterator::ok | ( | ) | const [inline] |
Returns true if this BoundaryIterator's location is within its Box.
References CH_SPACEDIM, and m_sdir.
const Box & BoundaryIterator::box | ( | ) | const [inline] |
void BoundaryIterator::nextBox | ( | ) | [inline] |
BoxIterator BoundaryIterator::m_current [protected] |
Referenced by begin(), next(), nextBox(), and operator()().
Box BoundaryIterator::m_box[CH_SPACEDIM *2] [protected] |
int BoundaryIterator::m_sdir [protected] |