# Default mesh optimization in GRUMMP

In two dimensions, the meshes GRUMMP generates in the `tri` executable are already excellent. The `meshopt2d` executable actually operates by computing an appropriate length scale for the input mesh, then using Ruppert's scheme to refine the mesh until quality is high; the guarantees on cell size provided with size and grading control in [11] ensure that the output mesh is still of reasonable size. In both cases, post-processing by using a pass or two smoothing to maximize the minimum sine of angles in the mesh generally increases the minimum angle by a few degrees at low cost.

In three dimensions, GRUMMP again produces good meshes in the `tetra` executable. Because slivers are still generated, `tetra` post-processes its meshes by swapping to increase the minimum sine of the dihedral angles in the mesh, and performs one pass of smoothing with the same goal. `meshopt3d` differs from its 2D counterpart in that insertion is not part of its operation; instead, a user-definable sequence of swapping, smoothing, and bad tetrahedron repair steps are performed. The default optimization sequence follows the experimentally-inspired recommendations of Freitag and Ollivier-Gooch [3], which typically performs well for meshes that are approximately isotropic.