An IrregGeom is a subset of an EBIndexSpace. It is used as an index set over which arrays can be defined, analogous to a Box in BoxLib.
An IrregGeom is defined as the collection of Node s contained in some
set of cells in
. In particular, if an
IrregGeom contains one
Node in a cell, then it must contain all of the nodes in that cell.
The Edge s contained in an IrregGeom are the collection of all the Edge s
such that one of the Node s in the IrregGeom is connected by that Edge .
Arrays indexed by Edge s are indexed by one of the subsets of the
Edge s whose normal is in a specified coordinate direction. In
addition,
can be used as an index set. Given an IrregGeom ig, and a normal direction
idir,
there are four distinguished subsets of the Edge s, any one of which
can be used as an index set.
We denote these four case using an enumeration class:
enum EdgeSetType{SurroundingEdges,InteriorEdges,LowEdges,HighEdges}
The constructor for an IrregGeom establishes the EBIndexSpace to which it belongs: IrregGeom (EBIndexSpace & isp). Other than the constructor, the basic operation that can be applied to an IrregGeom ig is that of adding a cell's worth of Node s: ig.addNodes(IntVect iv). From this basic operation, one can build more elaborate composite constructions. We also have the following Boolean functions: ig.contains(Node n), ig.contains(Edge e), ig.contains(IntVect iv), are each true if the argument is contained in ig.
IrregGeom s are the index sets on which the Node - centered (INFab<T>INFab<
>) and
Edge -centered (IEFab<T>IEFab<
>) arrays can be built.
These are templated classes,
with the template class T specifying the type of the values of the
arrays. These follow the usual conventions for BoxLib Fabs, in
which one can specify the number of components.
Here are some of the key member functions for the INFab<T>INFab<
>, IEFab<T>IEFab<
>
classes:
INFab<T>INFab<
>(IrregGeom & ig, int numcomps=1),
IEFab<T>IEFab<
>(IrregGeom & ig, int idir,
EdgeSetType est, int numcomps=1).
Edge -centered Fabs are allowed to be centered only on Edge s with a common normal direction, specified in the constructor by idir = 0 ... d-1. The edge set is also an argument to the constructor. We also have default constructors (for creating arrays of such objects), and correcponding define member functions with the same arguments as the constructors given above.
inf.(Node n, int ncomp=0)
returns a reference of type T& to the storage location indexed by n.
inf.(Node n, BaseFab<T>BaseFab<
>A ,int ncomp=0)
returns a reference to the storage location in inf if n is in the domain of inf; otherwise, it returns a reference to A(n.gridIndex(),ncomp).
Similar rules hold for the indexing operators for an IEFab<T>IEFab<
>
ief:
ief.(Edge e, int ncomp=0),
ief.(Edge e, BaseFab<T>BaseFab<
>A ,int ncomp=0).