A.4.2 Surface Related Methods

The top-level class also defines some topological methods. These are methods to retrieve the surface of a segment and the surface of the whole Wafer. Fig. A.10 depicts the definition of the surface class, Fig. A.11 depicts the surface related Wafer methods.

Figure A.10: Definition of the surface class.
\begin{figure}\hrulefill
{\footnotesize\begin{verbatim}class Surface
{
unsi...
...unsigned int&) const;
};\end{verbatim}}
\vspace*{-0.3cm}\hrulefill
\end{figure}

The surface class contains two data members, the number of points (nrPts) and an array of $ 3$ point handles. The nrPts variable makes it possible to use this class as a three-dimensional, two-dimensional and one-dimensional surface. The constructors take care to initialize the nrPts variable accordingly. nextPoint is an iterator to retrieve all points independently from the dimension of the surface element.

Figure A.11: Surface related methods of Wafer class.
\begin{figure}\hrulefill
{\footnotesize\begin{verbatim}typedef Handle<Surface...
...getSurfaceElements();
};\end{verbatim}}
\vspace*{-0.3cm}\hrulefill
\end{figure}

All except one method depicted in Fig. A.11 return a handle to a vector of handled surface elements (Surface_hvh). An instance of such a class can be passed as return value without worrying about memory consumption or performance through copy operations.

The method getSurface returns the surface of the whole Wafer.

getInterface returns the interface between two segments identified by the string arguments.

getExternalInterface returns the surface of the segment identified by the string argument. In case the specified segment does not have a surface an empty handle is returned.

getSegmentSurface returns the surface of the specified segment.

getSurfaceElements does almost the same as getSurface. It returns a map of surface elements in which a grid element (locatable element, LocEl $ \equiv$ Tetrahedron, Triangle or Line) is stored additionally to each surface element.

2003-03-27