Chombo + EB  3.2
Public Member Functions | Private Attributes | List of all members
NeighborIterator Class Reference

An Iterator based on a DisjointBoxLayout object for neighboring boxes. More...

#include <NeighborIterator.H>

Public Member Functions

 NeighborIterator ()
 
 NeighborIterator (const DisjointBoxLayout &dbl)
 
const LayoutIndexoperator() () const
 return the index that this iterator is at More...
 
Box box () const
 
void operator++ ()
 move the iterator to the next index in the neighbor list More...
 
bool ok () const
 return true if this iterator is still in the neighbor list More...
 
void begin (const DataIndex &a_dataIndex)
 initialize this iterator to the first index in the neighbor list More...
 
Box unshift (const Box &a_box) const
 OK, this one requires a little explanation. More...
 

Private Attributes

const DisjointBoxLayoutm_dblPtr
 
std::vector< std::pair< int, LayoutIndex > >::const_iterator m_current
 
std::vector< std::pair< int, LayoutIndex > >::const_iterator m_end
 
LayoutIndex m_lindex
 

Detailed Description

An Iterator based on a DisjointBoxLayout object for neighboring boxes.

Constructor & Destructor Documentation

◆ NeighborIterator() [1/2]

NeighborIterator::NeighborIterator ( )
inline

◆ NeighborIterator() [2/2]

NeighborIterator::NeighborIterator ( const DisjointBoxLayout dbl)

Member Function Documentation

◆ operator()()

const LayoutIndex & NeighborIterator::operator() ( ) const
inline

return the index that this iterator is at

Aborts if the iterator is not ok()

References CH_assert, m_dblPtr, m_lindex, and ok().

Referenced by NeighborIterator().

◆ box()

Box NeighborIterator::box ( ) const

Referenced by NeighborIterator().

◆ operator++()

void NeighborIterator::operator++ ( )
inline

move the iterator to the next index in the neighbor list

References m_current, m_end, and m_lindex.

Referenced by NeighborIterator().

◆ ok()

bool NeighborIterator::ok ( ) const
inline

return true if this iterator is still in the neighbor list

References CH_assert, m_current, m_dblPtr, and m_end.

Referenced by NeighborIterator(), and operator()().

◆ begin()

void NeighborIterator::begin ( const DataIndex a_dataIndex)

initialize this iterator to the first index in the neighbor list

Referenced by NeighborIterator().

◆ unshift()

Box NeighborIterator::unshift ( const Box a_box) const

OK, this one requires a little explanation.

if the current box is a periodic image box, then this operation returns the unmapping of a_box.

Referenced by NeighborIterator().

Member Data Documentation

◆ m_dblPtr

const DisjointBoxLayout* NeighborIterator::m_dblPtr
private

Referenced by ok(), and operator()().

◆ m_current

std::vector<std::pair<int, LayoutIndex> >::const_iterator NeighborIterator::m_current
private

Referenced by ok(), and operator++().

◆ m_end

std::vector<std::pair<int, LayoutIndex> >::const_iterator NeighborIterator::m_end
private

Referenced by ok(), and operator++().

◆ m_lindex

LayoutIndex NeighborIterator::m_lindex
private

Referenced by operator()(), and operator++().


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