[-O string]
Specify a shorthand mesh optimization script. Although the automatic
mesh improvement scheme creates excellent meshes, it can be quite
slow. For this reason, the optimization string option has been revived.
The string encodes a sequence of actions for optimization. For more
information about the individual optimization procedures, see [3].
The full list of supported options is:
- Swapping.
- There are three swapping suboptions: 'wi',
'wm', and 'ws'.
- [wi] Insphere swapping. Use of this criterion results
in a mesh which is locally Delaunay with respect to all faces which
can be swapped either 2 tets for 3 or 3 for 2. The Delaunay tetrahedralization
has, in principle, a number of excellent properties. Insphere swapping
essentially tries to make tetrahedra as equilateral as possible, but
it has blind spots which allow tetrahedra with very small or very
large dihedral angles to remain and even proliferate in the mesh.
This is often a good choice for a first pass of swapping when
improving a mesh, but a very poor choice for later passes, in that
it will undo much of the good done by other operations. tetra
produces a Delaunay mesh at the end of its insertion process anyway,
so this option is of no use with tetra.
- [wm] Minmax dihedral angle. This criterion performs swaps
if and only if the new configuration has a smaller maximum dihedral
angle than the old configuration. This criterion does a better job
of eliminating poor angles from the mesh than the insphere criterion,
but does not do a spectacular job with small dihedral angles.
- [ws] Maxmin sine of dihedral angle. This criterion performs
swaps if and only if the new configuration has a larger minimum sine
of dihedral angle than the old configuration. As such, both very small
and very large dihedral angles are removed. This is
the recommended swapping criterion.
- Smoothing.
- A smoothing command ('mf')2.2 is followed by a single digit to specify the local mesh quality function
to use. The options are:
- [1] Maxmin dihedral angle.
- [2] Minmax dihedral angle.
- [3] Maxmin cosine of dihedral angle.
- [4] Minmax cosine of dihedral angle.
- [5] Maxmin sine of dihedral angle. Recommended.
The objective of each option is self-explanatory from the name of
the quality measure. In each case, the measure is evaluated; a single
Laplacian smoothing step is made; the quality measure is re-evaluated;
the Laplacian step is kept if and only if the mesh is improved by
it; and a non-smooth optimization procedure is invoked if the local
sub-mesh is not yet sufficiently good.
- Bad tetrahedron repair.
- Use 'r' to repair bad tetrahedra
using a full range of swapping techniques, and 'R' to additionally
use strategic point insertion to remove bad tetrahedra; the latter
should be used with caution.
The default optimization string for tetra is “-O wsmf5”.
For meshopt3d, the value recommended by Freitag and Ollivier-Gooch [3]
is used: “-O wsmf5mf5rmf5mf5”. The difference
between the two is that tetra is known to create meshes that
are reasonably good to begin with and need little cleanup, whereas
meshopt3d can't make any assumptions about the quality of
the input mesh.