Here we explain the adaption of the physics grid in the computational domain. The way the spatial grid is updated, depends only on the distribution of the quantities, the adaption is independent of the physical model under consideration. In contrast to specialized simulations no specific information, like space charge in device modeling, can be used to get information about local grid quality.
The classical mathematically most justified way to adapt a grid is to equidistribute the local truncation error of the discretization scheme. Since we apply the same grid adaption routines for the ion implantation and diffusion module, we cannot use criteria based on the discretization scheme, and we do not pay regard to the mapping. We restrict ourselves to the equidistribution of two physically motivated but model independent criteria.
First, the dose conservation criterion measures the local dose error. This criterion is responsible for the conservation of dose and forces grid lines to be inserted in the vicinity of the maxima of the profiles. Second, the gradient resolution criterion measures the magnitude of the concentration gradients. Gradient resolution is important for the determination of the exact position of the p-n junctions and fine resolution of model immanent kinks and spikes in the concentration profiles.