#include <ProblemDomain.H>
The ShiftIterator class contains a list of shift vectors necessary to enforce periodic boundary conditions (enforced by shifting the Box of each Fab, then copying any overlapping valid cells with ghost cells of the shifted Fab. Depending on the number of periodic directions, the list of shift vectors over which to iterate differs.
Public Member Functions | |
ShiftIterator () | |
Basic constructor. | |
ShiftIterator (const bool *a_isPeriodic) | |
Defining Constructor. | |
ShiftIterator (const bool *a_isPeriodic, const IntVect &a_numWraps) | |
Defining Constructor. | |
ShiftIterator (const ShiftIterator &a_shiftIt) | |
Copy constructor. | |
~ShiftIterator () | |
Destructor. | |
ShiftIterator & | operator= (const ShiftIterator &a_src) |
Assignment operator. | |
void | computeShifts (const bool *a_isPeriodic) |
Recompute shift vectors based on periodic directions. | |
void | computeShifts (const bool *a_isPeriodic, const IntVect &a_numWraps) |
Recompute shift vectors based on periodic directions. | |
IntVect | operator() () const |
Returns the current shift unit vector. | |
IntVect | i () const |
Equivalent to the () operator. | |
void | operator++ () |
Increment to the next shift unit vector. | |
void | incr () |
Equivalent to the ++ operator. | |
bool | ok () const |
Is the iterator still within its range of shift vectors? | |
unsigned int | index () const |
which periodic image is this | |
const IntVect & | operator[] (int index) const |
void | reset () |
Reset to first shift unit vector. | |
void | begin () |
Equivalent to reset(). | |
void | end () |
Skip the iterator to the end. | |
Private Attributes | |
unsigned int | m_index |
Vector< IntVect > | m_shift_vectors |
ShiftIterator::ShiftIterator | ( | ) | [inline] |
Basic constructor.
ShiftIterator::ShiftIterator | ( | const bool * | a_isPeriodic | ) |
Defining Constructor.
Builds a ShiftIterator based on the periodicity in a_isPeriodic
ShiftIterator::ShiftIterator | ( | const bool * | a_isPeriodic, | |
const IntVect & | a_numWraps | |||
) |
Defining Constructor.
Builds a ShiftIterator based on the periodicity in a_isPeriodic and also allows for multiple wraps
ShiftIterator::ShiftIterator | ( | const ShiftIterator & | a_shiftIt | ) | [inline] |
ShiftIterator::~ShiftIterator | ( | ) |
Destructor.
ShiftIterator & ShiftIterator::operator= | ( | const ShiftIterator & | a_src | ) | [inline] |
void ShiftIterator::computeShifts | ( | const bool * | a_isPeriodic | ) |
Recompute shift vectors based on periodic directions.
void ShiftIterator::computeShifts | ( | const bool * | a_isPeriodic, | |
const IntVect & | a_numWraps | |||
) |
Recompute shift vectors based on periodic directions.
IntVect ShiftIterator::operator() | ( | ) | const [inline] |
Returns the current shift unit vector.
References CH_assert, m_index, m_shift_vectors, and ok().
Referenced by i().
IntVect ShiftIterator::i | ( | ) | const [inline] |
void ShiftIterator::operator++ | ( | ) | [inline] |
void ShiftIterator::incr | ( | ) | [inline] |
Equivalent to the ++ operator.
bool ShiftIterator::ok | ( | ) | const [inline] |
Is the iterator still within its range of shift vectors?
References m_index, m_shift_vectors, and Vector< T >::size().
Referenced by operator()().
unsigned int ShiftIterator::index | ( | ) | const [inline] |
const IntVect& ShiftIterator::operator[] | ( | int | index | ) | const [inline] |
References m_shift_vectors.
void ShiftIterator::reset | ( | ) | [inline] |
void ShiftIterator::end | ( | ) | [inline] |
Skip the iterator to the end.
ok() will return false after this method is called.
References m_index, m_shift_vectors, and Vector< T >::size().
unsigned int ShiftIterator::m_index [private] |
Referenced by begin(), end(), index(), ok(), operator()(), operator++(), operator=(), reset(), and ShiftIterator().
Vector<IntVect> ShiftIterator::m_shift_vectors [private] |
Referenced by end(), ok(), operator()(), operator=(), operator[](), and ShiftIterator().