next up previous
Next: Level Hierarchies Up: Basic Data Structures Previous: Irregular Geometries and Arrays

Stencils and Iterators

NodeStencil s and EdgeStencil s are essentially Vectors of Node s and Edge s, respectively, constrained so that all the elements in the Vector satisfy consistency constraints: all the elements must belong to the same EBIndexSpace , and, for EdgeStencil s, all of the Edge s must have the same normal direction. However, we note that stencils are not subject to the same constraints as IrregGeom s, in that they are allowed to be arbitrary collections of Node s or Edge s.

As stated above, computations in the EB algorithm space are organized around iterations over subsets of the index space. For that reason, we introduce iterator classes to manage the iteration over stencils, as well as over IrregGeom s and EBIndexSpace s. We will make the iterator classes templated: NodeIterator<T>, EdgeIterator<T>, where T can the appropriate stencil class, an IrregGeom, or an EBIndexSpace. For the latter two cases, the iterations are carried out in a well-defined order depending only on the contents of the IrregGeom or the EBIndexSpace , so that linear arrays can be built for such iterators in a fashion similar to that for stencils. The iterator classes have the following member functions.


next up previous
Next: Level Hierarchies Up: Basic Data Structures Previous: Irregular Geometries and Arrays

David L. Modiano
Fri Dec 12 17:29:58 PST 1997