3.3 Meshing Layer

As mentioned earlier the mesh plays a crucial role in TCAD simulations. It is a strong demand to use different meshing algorithms for different problems (c. f. Section 2.2.2). This chapter describes the meshing interface and the available implementations used from within the WAFER-STATE-SERVER. Fig. 3.10 depicts a flowchart of the algorithm used to define the regions that are to be gridded, and to retrieve the grid elements respectively.

Figure 3.10: Gridding algorithm.
\begin{figure}\centering\psfig{file=pics/gridder, width=0.7\linewidth}\par\end{figure}

Figure 3.11: UML diagram of Gridder.
\begin{figure}\centering\psfig{file=pics/gridder-uml, width=0.3\linewidth}\par\end{figure}

First of all, points of all segments must be defined. This also includes the points that are not part of the hull of a segment (inner points). The points are numbered consecutively in the way they are inserted, starting with the index 0. In the next step the boundaries of all regions are defined by adding one boundary element at a time. For a three-dimensional gridder a boundary element consists of three point references (surface triangle), a two-dimensional gridder expects two point references (surface line). The boundaries are numbered in the same way as the points. The boundary elements that define a segment must be identified. Each segment is defined by a list of boundary element numbers and a unique user defined number. When the grid elements are retrieved each element contains the segment number of the segment it belongs to. As a last step, the actual gridding process must be initiated by calling the start method. Once this method returns, the gridding process is finished and the generated points and grid elements can be retrieved from the gridder data structures.

The interface is realized in a completely dimension independent way. The data structure of the returned grid element has a fixed size (four point references, the number of valid point references, and the segment number). The geometrical dimension of the grid element is indicated by the number of valid point references.

Since the interface is comprised of only $ 2$ classes its implementation is quite simple. Fig. 3.11 depicts the classes and methods.

In the following sections a brief description of all gridders that are available in the WAFER-STATE-SERVER at the time of the writing of this thesis.