Grid generation (see Section 2.3) is a crucial factor in device simulation since the number of grid points directly affects memory consumption and the simulation time. Furthermore, the grid has a direct impact on the condition of the system matrix and therefore on the accuracy and also on the convergence of the numerical solution procedure.
The main challenges of grid generation are:
The denser a grid is the more accurately quantities can be discretized. This applies for the doping profile at junctions or regions with a higher rate of change of doping levels. Therefore, the grid must be dense enough to keep the discretization error small. On the other hand, the grid must be coarse in regions where a smaller grid density suffices to keep the total number of grid points small.
To obtain different grid densities a pure tensor-product grid is not sufficient. In this case, a terminating line algorithm has to be used to prevent lines from going far into regions where they are not needed. As an example, in  a terminating line tensor-product grid is shown for the application of a thermal simulation tool. Due to the large discretization error at line terminations a smooth transition to a coarser grid has to be done using triangular (at the surface) and tetrahedral (3D) elements.
Again, tensor-product and prismatic grids are not suitable to describe arbitrary shaped segments. Octree-based grid generators as proposed in [80,81,82] generally are not able to describe regions near arbitrarily shaped surfaces very well.
For the representation of arbitrarily shaped surfaces the best approach is to triangulate the area. The gridding process then has to start from the triangulated surfaces where surface conforming layers have to be used if it is necessary.
For automatic grid generation additional information beside the geometric description is needed. This information is in which regions a refined grid is required and the preferred direction of grid lines. Therefore, a detailed knowledge on the device behavior and the simulated effect is necessary. If this knowledge is not available, the problem arises that only device simulation can show where critical regions are and how the optimal grid should look like.
To overcome this problem for an automated approach grid generators like CGG  solve Poisson's equation for the whole device area starting from an initial grid. Grid points are then inserted at the iso-surfaces of the calculated potential distribution. Nevertheless, solving Poisson's equation does not predict the current flow.
To minimize the number of grid points non-tensor-product grids have to be used. To minimize the number of connections between points hybrid grids are most suitable. A state-of-the-art device simulator must be capable to handle these kind of grids.
Robert Klima 2003-02-06