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

#include <FaceIterator.h>

Public Member Functions

 FaceIterator ()
 
 FaceIterator (const hier::Box< DIM > &box, const int axis)
 
 FaceIterator (const FaceIterator< DIM > &iterator)
 
FaceIterator< DIM > & operator= (const FaceIterator< DIM > &iterator)
 
 ~FaceIterator ()
 
const FaceIndex< DIM > & operator* () const
 
const FaceIndex< DIM > & operator() () const
 
 operator bool () const
 
 operator const void * () const
 
bool operator! () const
 
void operator++ (int)
 
bool operator== (const FaceIterator< DIM > &iterator) const
 
bool operator!= (const FaceIterator< DIM > &iterator) const
 

Private Attributes

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

Detailed Description

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

Class FaceIterator<DIM> is an iterator that provides methods for stepping through the index space associated with a face centered box. The indices are enumerated in column-major (e.g., Fortran) order. The iterator should be used as follows:

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

Note that the face 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::FaceData
pdat::FaceGeometry
pdat::FaceIndex

Constructor & Destructor Documentation

◆ FaceIterator() [1/3]

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

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

◆ FaceIterator() [2/3]

template<int DIM>
SAMRAI::pdat::FaceIterator< DIM >::FaceIterator ( const hier::Box< DIM > &  box,
const int  axis 
)

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

◆ FaceIterator() [3/3]

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

Copy constructor for the face iterator

◆ ~FaceIterator()

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

Destructor for the face iterator.

Member Function Documentation

◆ operator=()

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

Assignment operator for the face iterator.

◆ operator*()

template<int DIM>
const FaceIndex<DIM>& SAMRAI::pdat::FaceIterator< DIM >::operator* ( ) const

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

◆ operator()()

template<int DIM>
const FaceIndex<DIM>& SAMRAI::pdat::FaceIterator< DIM >::operator() ( ) const

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

◆ operator bool()

template<int DIM>
SAMRAI::pdat::FaceIterator< 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::FaceIterator< 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::FaceIterator< 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::FaceIterator< DIM >::operator++ ( int  )

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

◆ operator==()

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

Test two iterators for equality (same index value).

◆ operator!=()

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

Test two iterators for inequality (different index values).

Member Data Documentation

◆ d_index

template<int DIM>
FaceIndex<DIM> SAMRAI::pdat::FaceIterator< DIM >::d_index
private

◆ d_box

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

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