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

iterates through the IntVects of a Box More...

#include <BoxIterator.H>

Public Member Functions

 BoxIterator ()
 BoxIterator (const Box &a_bx)
void setBox (const Box &a_bx)
void define (const Box &a_bx)
 BoxIterator (const BoxIterator &a_iterIn)
 ~BoxIterator ()
void begin ()
void reset ()
void operator++ ()
void next ()
const IntVectoperator() () const
bool ok ()
unsigned long long size () const
IntVect at (unsigned long long pt) const

Protected Attributes

IntVect m_current
IntVect m_boxLo
IntVect m_boxHi

Detailed Description

iterates through the IntVects of a Box

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

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

Constructor & Destructor Documentation

◆ BoxIterator() [1/3]

BoxIterator::BoxIterator ( )

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

References m_boxHi, m_boxLo, m_current, IntVect::Unit, and IntVect::Zero.

◆ BoxIterator() [2/3]

BoxIterator::BoxIterator ( const Box a_bx)

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

References define().

◆ BoxIterator() [3/3]

BoxIterator::BoxIterator ( const BoxIterator a_iterIn)

Copy constructor. Arguments: a_iterIn (not modified) the BoxIterator to copy.

References m_boxHi, m_boxLo, and m_current.

◆ ~BoxIterator()

BoxIterator::~BoxIterator ( )

Member Function Documentation

◆ setBox()

void BoxIterator::setBox ( const Box a_bx)

◆ define()

void BoxIterator::define ( const Box a_bx)

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

Referenced by BoundaryIterator::begin(), BoxIterator(), BoundaryIterator::next(), and BoundaryIterator::nextBox().

◆ begin()

void BoxIterator::begin ( )

◆ reset()

void BoxIterator::reset ( )

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

References begin().

Referenced by ~BoxIterator().

◆ operator++()

void BoxIterator::operator++ ( )

Modifies this BoxIterator 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 ~BoxIterator().

◆ next()

void BoxIterator::next ( )

◆ operator()()

const IntVect & BoxIterator::operator() ( ) const

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

References CH_assert, m_boxHi, m_boxLo, and m_current.

Referenced by ~BoxIterator().

◆ ok()

bool BoxIterator::ok ( )

◆ size()

unsigned long long BoxIterator::size ( ) const

References m_boxHi, and m_boxLo.

Referenced by ~BoxIterator().

◆ at()

IntVect BoxIterator::at ( unsigned long long  pt) const

References m_boxHi, and m_boxLo.

Referenced by ~BoxIterator().

Member Data Documentation

◆ m_current

IntVect BoxIterator::m_current

Referenced by begin(), BoxIterator(), next(), ok(), and operator()().

◆ m_boxLo

IntVect BoxIterator::m_boxLo

◆ m_boxHi

IntVect BoxIterator::m_boxHi

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