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

#include <EdgeIterator.h>

Public Member Functions

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

Private Attributes

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

Detailed Description

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

Class EdgeIterator<DIM> is an iterator that provides methods for stepping through the index space associated with a edge 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 (EdgeIterator<DIM> c(box, axis); c; c++) {
   // use index c of the box
}

Note that the edge 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::EdgeData
pdat::EdgeGeometry
pdat::EdgeIndex

Constructor & Destructor Documentation

◆ EdgeIterator() [1/3]

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

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

◆ EdgeIterator() [2/3]

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

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

◆ EdgeIterator() [3/3]

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

Copy constructor for the edge iterator

◆ ~EdgeIterator()

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

Destructor for the edge iterator.

Member Function Documentation

◆ operator=()

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

Assignment operator for the edge iterator.

◆ operator*()

template<int DIM>
const EdgeIndex<DIM>& SAMRAI::pdat::EdgeIterator< DIM >::operator* ( ) const

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

◆ operator()()

template<int DIM>
const EdgeIndex<DIM>& SAMRAI::pdat::EdgeIterator< DIM >::operator() ( ) const

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

◆ operator bool()

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

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

◆ operator==()

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

Test two iterators for equality (same index value).

◆ operator!=()

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

Test two iterators for inequality (different index values).

Member Data Documentation

◆ d_box

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

◆ d_index

template<int DIM>
EdgeIndex<DIM> SAMRAI::pdat::EdgeIterator< DIM >::d_index
private

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