We provide some elementary facilities for building an EBIndexSpace , based on providing support for the following two-pass algorithm. In the first pass, one builds the node structure, adding one node at a time. At the same time, one can build auxiliary data structures describing the geometry of the irregular nodes, using the fact that they are being stored in a vector. In the second pass, one uses the information constructed in the first pass to build up the edge structure, again adding one edge at a time. In addition to this facility, we also provide the capability of generating the union of two EBIndexSpace s, i.e. the EBIndexSpace for the union of the two bodies, under the assumption that the bodies are sufficiently well-separated. Finally, we can turn a shape inside-out, reversing the roles of the covered and exposed regions. While these three capabilities are by no means exhaustive, it is possible using these methods to generate grids for a variety of complex shapes.
The member functions for EBIndexSpace that are used in this process are given as follows.
isp.makeRegular(IntVect iv), isp.makeCovered(IntVect iv) makes the cells at iv regular or covered, respectively.
void isp.addEdge(Node nLow, Node nHigh) adds the Edge with low and high Node s nLow,nHigh.