class BoxIterator

iterates through the IntVects of a Box

Inheritance:

BoxIterator


public members:

Constructors, destructors, defines
BoxIterator ()
BoxIterator(const Box& bx)
void define (const Box& bx)
BoxIterator (const BoxIterator& tx)
~BoxIterator ()

Modification functions
void begin()
void reset()
void operator++()

Access functions
const IntVect& operator() () const
bool ok()

Documentation

BoxIterator iterates through the IntVects of a box. The actual sqeuence of IntVects is implementation-specific. Typical usage:

   Box b; 
   ...
   BoxIterator bit (b); 
   for (bit.begin(); bit.ok(); ++bit)  
   {  
     IntVect iv = bit(); 
     (do operations involving iv) 
   }
BoxIterator ()
Default constructor. This constructs an invalid iterator. The user must call define before using.

BoxIterator (const Box& bx)
Constructs a BoxIterator and associates it with a Box.
Arguments:
bx (not modified) the Box to iterate over.
Returns: none.
This:
This object is modified.

void define (const Box& bx)
Associates a Box with this BoxIterator.
Arguments:
bx (not modified) the Box to iterate over.
Returns: none.
This:
This object is modified.

BoxIterator (const BoxIterator& tx)
Copy constructor.
Arguments:
tx (not modified) the BoxIterator to copy.
Returns: none.
This:
This object is modified.

~BoxIterator ()
Destructor.

void begin ()
Sets this BoxIterator to the first IntVect in its Box. The definition of the "first" IntVect is implementation-dependent.
Arguments: none.
Returns: none.
This:
This object is modified.

void reset ()
Sets this BoxIterator to the first IntVect in its Box. The definition of the "first" IntVect is implementation-dependent.
Arguments: none.
Returns: none.
This:
This object is modified.

void operator++ ()
Modifies this BoxIterator to set it to the next location in its Box. The definition of the "next location" of a Box is implementation-dependent.
Arguments: none.
Returns: none.
This:
This object is modified.

const IntVect& operator() () const
Returns the value of the InVect for the current location of this BoxIterator.
Arguments: none.
Returns:
the value of the intvect for the current location.
This:
This object is not modified.

bool ok ()
Returns true if this BoxIterator's location is within its Box.
Arguments: none.
Returns:
true if this BoxIterator's current location is in its Box.
This:
This object is not modified.


this class has no child classes.

alphabetic index hierarchy of classes


Chombo

Copyright Notice

This software is copyright (C) by the Lawrence Berkeley National Laboratory. Permission is granted to reproduce this software for non-commercial purposes provided that this notice is left intact.

It is acknowledged that the U.S. Government has rights to this software under Contract DE-AC03-765F00098 between the U.S. Department of Energy and the University of California.

This software is provided as a professional and academic contribution for joint exchange. Thus it is experimental, is provided ``as is'', with no warranties of any kind whatsoever, no support, no promise of updates, or printed documentation. By using this software, you acknowledge that the Lawrence Berkeley National Laboratory and Regents of the University of California shall have no liability with respect to the infringement of other copyrights by any part of this software.