#include <BoxIterator.H>
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) }
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 IntVect & | operator() () 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 |
| BoxIterator::BoxIterator | ( | ) | [inline] |
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::BoxIterator | ( | const Box & | a_bx | ) | [inline] |
Constructs a BoxIterator and associates it with a Box. Arguments: a_bx (not modified) the Box to iterate over.
References define().
| BoxIterator::BoxIterator | ( | const BoxIterator & | a_iterIn | ) | [inline] |
Copy constructor. Arguments: a_iterIn (not modified) the BoxIterator to copy.
| BoxIterator::~BoxIterator | ( | ) | [inline] |
| void BoxIterator::setBox | ( | const Box & | a_bx | ) |
| 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().
| void BoxIterator::begin | ( | ) | [inline] |
Sets this BoxIterator to the first IntVect in its Box. The definition of the "first" IntVect is implementation-dependent.
References m_boxHi, m_boxLo, and m_current.
Referenced by NormalDerivativeNew< dim >::calculateAll(), NormalDerivativeNew< dim >::calculatePhiDerivs(), PetscSolver< T >::create_mat_vec(), BoundaryIterator::next(), PetscSolver< T >::putChomboInPetsc(), PetscSolver< T >::putPetscInChombo(), reset(), PetscSolver< T >::setup_solver(), PetscSolver< T >::solve_mfree_private(), and PetscSolver< T >::solve_private().
| void BoxIterator::reset | ( | ) | [inline] |
Sets this BoxIterator to the first IntVect in its Box. The definition of the "first" IntVect is implementation-dependent.
References begin().
| void BoxIterator::operator++ | ( | ) | [inline] |
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().
| void BoxIterator::next | ( | ) | [inline] |
References m_boxHi, m_boxLo, and m_current.
Referenced by PetscSolver< T >::create_mat_vec(), BoundaryIterator::next(), operator++(), PetscSolver< T >::putChomboInPetsc(), PetscSolver< T >::putPetscInChombo(), PetscSolver< T >::setup_solver(), PetscSolver< T >::solve_mfree_private(), and PetscSolver< T >::solve_private().
| const IntVect & BoxIterator::operator() | ( | ) | const [inline] |
Returns the value of the InVect for the current location of this BoxIterator.
| bool BoxIterator::ok | ( | ) | [inline] |
Returns true if this BoxIterator's location is within its Box.
References m_boxHi, and m_current.
Referenced by NormalDerivativeNew< dim >::calculateAll(), NormalDerivativeNew< dim >::calculatePhiDerivs(), PetscSolver< T >::create_mat_vec(), BoundaryIterator::next(), PetscSolver< T >::putChomboInPetsc(), PetscSolver< T >::putPetscInChombo(), PetscSolver< T >::setup_solver(), PetscSolver< T >::solve_mfree_private(), and PetscSolver< T >::solve_private().
| IntVect BoxIterator::at | ( | unsigned long long | pt | ) | const |
IntVect BoxIterator::m_current [protected] |
Referenced by begin(), BoxIterator(), next(), ok(), and operator()().
IntVect BoxIterator::m_boxLo [protected] |
Referenced by begin(), BoxIterator(), next(), operator()(), and size().
IntVect BoxIterator::m_boxHi [protected] |
Referenced by begin(), BoxIterator(), next(), ok(), operator()(), and size().
1.5.5