The initial mixed mesh, containing a large number of triangular elements, is subjected to an optimization process it terms of several cycles of the Laplacian smoothing and topological cleanup. While the smoothing improves the shape and consequently the quality of individual elements, the cleanup removes the triangular elements from the mesh whenever possible and optimizes the mesh connectivity, resulting again in the improvement of the overall mesh quality. In each cycle, the smoothing is followed by the cleanup. However in the last cycle, only the smoothing is performed followed by the convexity check. Typically, only a few cycles (around six) are sufficient to obtain a reasonably optimized mesh with only a very low percentage of triangular elements.