To offer a wide range of possibilities AMIGOS is equipped with a powerful adaptive grid algorithm that can handle various different grid elements in all dimensions (Fig. 4.1). The Grid & Element Manager automatically detects the types of elements defined on a given mesh as well as their dimensions. The implemented algorithm supports a mixedelement decomposition method for local refinement of fully unstructured grids [Lei95][Lei97]. The method guarantees to prevent the grid quality using a hierarchical adaptation under the condition that elements of the same shape are of the same quality (Fig. 4.13). Thus the shape of elements can be preserved even in case of local anisotropies of the initial grid.

Before starting Newton iterations over the complete PDE systems AMIGOS evaluates the grid criterion given in any defined analytical model and adapts the grid in a manner so that a maximum error of a given epsilon criterion is achieved. Afterwards it starts calculating the first Newton iteration and if necessary it readapts the mesh accounting to the changes of the grid criterions per mesh. This scheme continues until the complete system has converged.
To define a gridcriterion for a model an additional line has to be added to the model
MODEL <modelname>=[...]; { residuum = [...]; jacobian = [[...]]; gridcrit = <any analytical expression> }