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.
NodeStencil (EBIndexSpace isp)
EdgeStencil (EBIndexSpace isp, int idir).
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.
NodeIterator<T>(T& t),
EdgeIterator<T>(T& t,int idir,EdgeSetType est). For the case that T is an EdgeStencil, the normal direction idir in the constructor must match that for the stencil, and the EdgeSetType is ignored.