IBAMR  IBAMR version 0.19.
Public Member Functions | Private Attributes | List of all members
SAMRAI::pdat::ArrayDataIterator< DIM > Class Template Reference

#include <ArrayDataIterator.h>

Public Member Functions

 ArrayDataIterator ()
 
 ArrayDataIterator (const hier::Box< DIM > &box)
 
 ArrayDataIterator (const ArrayDataIterator< DIM > &iterator)
 
ArrayDataIterator< DIM > & operator= (const ArrayDataIterator< DIM > &iterator)
 
 ~ArrayDataIterator ()
 
const hier::Index< DIM > & operator* () const
 
const hier::Index< DIM > & operator() () const
 
 operator bool () const
 
 operator const void * () const
 
bool operator! () const
 
void operator++ (int)
 
bool operator== (const ArrayDataIterator< DIM > &iterator) const
 
bool operator!= (const ArrayDataIterator< DIM > &iterator) const
 

Private Attributes

hier::Index< DIM > d_index
 
hier::Box< DIM > d_box
 

Detailed Description

template<int DIM>
class SAMRAI::pdat::ArrayDataIterator< DIM >

Class ArrayDataIterator is an iterator that provides methods for stepping through the index space associated with a pdat_ArrayData object. The indices are enumerated in column-major (e.g., Fortran) order. The iterator should be used as follows:

hier::Box<DIM> box;
...
for (ArrayDataIterator<DIM> c(box); c; c++) {
   // use index c of the box
}

Note that the array data iterator may not compile to efficient code, depending on your compiler. Many compilers are not smart enough to optimize the looping constructs and indexing operations.

See also
pdat::ArrayData
hier::Index

Constructor & Destructor Documentation

◆ ArrayDataIterator() [1/3]

template<int DIM>
SAMRAI::pdat::ArrayDataIterator< DIM >::ArrayDataIterator ( )

Default constructor for the array data iterator. The iterator must be initialized before it can be used to iterate over a box.

◆ ArrayDataIterator() [2/3]

template<int DIM>
SAMRAI::pdat::ArrayDataIterator< DIM >::ArrayDataIterator ( const hier::Box< DIM > &  box)

Constructor for the array data iterator. The iterator will enumerate the indices in the argument box.

◆ ArrayDataIterator() [3/3]

template<int DIM>
SAMRAI::pdat::ArrayDataIterator< DIM >::ArrayDataIterator ( const ArrayDataIterator< DIM > &  iterator)

Copy constructor for the array data iterator

◆ ~ArrayDataIterator()

template<int DIM>
SAMRAI::pdat::ArrayDataIterator< DIM >::~ArrayDataIterator ( )

Destructor for the array data iterator.

Member Function Documentation

◆ operator=()

template<int DIM>
ArrayDataIterator<DIM>& SAMRAI::pdat::ArrayDataIterator< DIM >::operator= ( const ArrayDataIterator< DIM > &  iterator)

Assignment operator for the array data iterator.

◆ operator*()

template<int DIM>
const hier::Index<DIM>& SAMRAI::pdat::ArrayDataIterator< DIM >::operator* ( ) const

Extract the index corresponding to the iterator position in the box.

◆ operator()()

template<int DIM>
const hier::Index<DIM>& SAMRAI::pdat::ArrayDataIterator< DIM >::operator() ( ) const

Extract the index corresponding to the iterator position in the box.

◆ operator bool()

template<int DIM>
SAMRAI::pdat::ArrayDataIterator< DIM >::operator bool ( ) const

Return true if the iterator points to a valid index within the box.

◆ operator const void *()

template<int DIM>
SAMRAI::pdat::ArrayDataIterator< DIM >::operator const void * ( ) const

Return a non-NULL if the iterator points to a valid index within the box.

◆ operator!()

template<int DIM>
bool SAMRAI::pdat::ArrayDataIterator< DIM >::operator! ( ) const

Return whether the iterator points to a valid index within the box. This operator mimics the !p operation applied to a pointer p.

◆ operator++()

template<int DIM>
void SAMRAI::pdat::ArrayDataIterator< DIM >::operator++ ( int  )

Increment the iterator to point to the next index in the box.

◆ operator==()

template<int DIM>
bool SAMRAI::pdat::ArrayDataIterator< DIM >::operator== ( const ArrayDataIterator< DIM > &  iterator) const

Test two iterators for equality (same index value).

◆ operator!=()

template<int DIM>
bool SAMRAI::pdat::ArrayDataIterator< DIM >::operator!= ( const ArrayDataIterator< DIM > &  iterator) const

Test two iterators for inequality (different index values).

Member Data Documentation

◆ d_index

template<int DIM>
hier::Index<DIM> SAMRAI::pdat::ArrayDataIterator< DIM >::d_index
private

◆ d_box

template<int DIM>
hier::Box<DIM> SAMRAI::pdat::ArrayDataIterator< DIM >::d_box
private

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