iterates through the IntVects of a Box More...
#include <AMReX_BoxIterator.H>
Public Member Functions | |
| BoxIteratorND () noexcept=default | |
| BoxIteratorND (const BoxND< dim > &a_bx) noexcept | |
| void | setBox (const BoxND< dim > &a_bx) noexcept |
| void | define (const BoxND< dim > &a_bx) noexcept |
| BoxIteratorND | begin () noexcept |
| BoxIteratorND | end () const noexcept |
| void | reset () noexcept |
| BoxIteratorND & | operator++ () noexcept |
| void | next () noexcept |
| const IntVectND< dim > & | operator() () const noexcept |
| IntVectND< dim > | operator* () const noexcept |
| bool | ok () const noexcept |
Private Attributes | |
| IntVectND< dim > | m_current = IntVectND<dim>::TheUnitVector() |
| IntVectND< dim > | m_boxLo = IntVectND<dim>::TheUnitVector() |
| IntVectND< dim > | m_boxHi = IntVectND<dim>::TheZeroVector() |
Friends | |
| bool | operator!= (const BoxIteratorND &b1, const BoxIteratorND &b2) noexcept |
iterates through the IntVects of a Box
BoxIteratorND iterates through the IntVects of a box in the same order as a series of nested for loops with the innermost loop iterating over the first dimension.
Typical usage using a range-based for loop:
Using a traditional for loop:
Note that while regular iteration of the range-based version is reasonably performant, neither version is compatible with omp parallel for or simd autovectorization.
|
defaultnoexcept |
Default constructor. This constructs an invalid iterator. The user must call define before using.
|
inlineexplicitnoexcept |
Constructs a BoxIteratorND and associates it with a Box. Arguments: a_bx (not modified) the Box to iterate over.
|
inlinenoexcept |
Sets this BoxIteratorND to the first IntVect in its Box. This is the smallEnd vector of the Box.
|
inlinenoexcept |
Associates a Box with this BoxIteratorND. Arguments: a_bx (not modified) the Box to iterate over.
|
inlinenoexcept |
Get a BoxIteratorND with its vector set to the end of the Box. Should only be used internally by a range-based for loop.
|
inlinenoexcept |
Modifies this BoxIteratorND to set it to the next location in its Box.
|
inlinenoexcept |
Returns true if this BoxIteratorND's location is within its Box.
|
inlinenoexcept |
Returns the value of the InVect for the current location of this BoxIteratorND.
|
inlinenoexcept |
Returns the value of the InVect for the current location of this BoxIteratorND.
|
inlinenoexcept |
Modifies this BoxIteratorND to set it to the next location in its Box.
|
inlinenoexcept |
Sets this BoxIteratorND to the first IntVect in its Box. This is the smallEnd vector of the Box.
|
inlinenoexcept |
|
friend |
Special operator for range-based for loops. Only checks inequality of the last dimension of the current position for better performance. Should only be used internally by a range-based for loop.
|
private |
|
private |
|
private |