Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

ShiftIterator Class Reference

#include <ProblemDomain.H>

Collaboration diagram for ShiftIterator:

Collaboration graph
[legend]
List of all members.

Detailed Description

Class to manage box-shifting used to enforce periodic BC's.

The ShiftIterator class contains a list of shift vectors necessary to enforce periodic boundary conditions (enforced by shifting the Box of each Fab, then copying any overlapping valid cells with ghost cells of the shifted Fab. Depending on the number of periodic directions, the list of shift vectors over which to iterate differs.


Public Member Functions

 ShiftIterator ()
 Basic constructor.

 ShiftIterator (const bool *a_isPeriodic)
 Defining Constructor.

 ShiftIterator (const ShiftIterator &a_shiftIt)
 Copy constructor.

 ~ShiftIterator ()
 Destructor.

ShiftIteratoroperator= (const ShiftIterator &a_src)
 Assignment operator.

void computeShifts (const bool *a_isPeriodic)
 Recompute shift vectors based on periodic directions.

IntVect operator() () const
 Returns the current shift unit vector.

IntVect i () const
 Equivalent to the () operator.

void operator++ ()
 Increment to the next shift unit vector.

void incr ()
 Equivalent to the ++ operator.

bool ok () const
 Is the iterator still within its range of shift vectors?

void reset ()
 Reset to first shift unit vector.

void begin ()
 Equivalent to reset().

void end ()
 Skip the iterator to the end.


Private Attributes

unsigned int m_index
Vector< IntVectm_shift_vectors


Constructor & Destructor Documentation

ShiftIterator::ShiftIterator  )  [inline]
 

Basic constructor.

ShiftIterator::ShiftIterator const bool *  a_isPeriodic  ) 
 

Defining Constructor.

Builds a ShiftIterator based on the periodicity in a_isPeriodic

ShiftIterator::ShiftIterator const ShiftIterator a_shiftIt  )  [inline]
 

Copy constructor.

ShiftIterator::~ShiftIterator  ) 
 

Destructor.


Member Function Documentation

ShiftIterator & ShiftIterator::operator= const ShiftIterator a_src  )  [inline]
 

Assignment operator.

void ShiftIterator::computeShifts const bool *  a_isPeriodic  ) 
 

Recompute shift vectors based on periodic directions.

IntVect ShiftIterator::operator()  )  const [inline]
 

Returns the current shift unit vector.

IntVect ShiftIterator::i  )  const [inline]
 

Equivalent to the () operator.

void ShiftIterator::operator++  )  [inline]
 

Increment to the next shift unit vector.

void ShiftIterator::incr  )  [inline]
 

Equivalent to the ++ operator.

bool ShiftIterator::ok  )  const [inline]
 

Is the iterator still within its range of shift vectors?

void ShiftIterator::reset  )  [inline]
 

Reset to first shift unit vector.

void ShiftIterator::begin  )  [inline]
 

Equivalent to reset().

void ShiftIterator::end  )  [inline]
 

Skip the iterator to the end.

ok() will return false after this method is called.


Member Data Documentation

unsigned int ShiftIterator::m_index [private]
 

Vector<IntVect> ShiftIterator::m_shift_vectors [private]
 


The documentation for this class was generated from the following file:
Generated on Fri Jul 2 17:56:02 2004 for Chombo by doxygen 1.3.2