# mmgs - Man Page

Adaptation and optimization of a surface triangulation representing a piecewise linear approximation of an underlying surface geometry.

## Synopsis

mmgs | ⟨mesh_file⟩ [output_file] [-sol solution_file⟩] [-met metric_file⟩] [-h] [-v] [-m n⟩] [-d] [-val] [-default] [-A] [-ar x⟩ | -nr] [-hmin x⟩] [-hmax x⟩] [-hsiz x⟩] [-hausd x⟩] [-hgrad x⟩] [-hgradreq x⟩] [-A] [-ls x] [-keep-ref] [-nreg] [-noinsert] [-nomove] [-noswap] [-nosizreq] [-nreg] [-nsd] [-optim] [-rn n⟩] |

## Description

The **mmgs** application is dedicated to surface triangulation remeshing.

By default it performs mesh modifications in order to control the surface approximation.

Providing a metric file, it adapts the mesh to the prescribed sizes at nodes.

Providing a level-set file containing the values of the level-set function at the mesh nodes, the -ls option allows to explicitely mesh an implicit domain. -optim option allow to improve the mesh quality with respect to initial mesh size and the surface approximation respect.

## Command Line Arguments

Generic options:

File specifications:

Mode specifications (default is mesh adaptation):

- -ls
`x` Create mesh of isovalue

*x*(0.0 if*x*is not provided).

- -ls
Parameters:

- -A
Enable anisotropy (without metric file).

- -ar ⟨x⟩ | -nr
Threshold for angle detection or sharp features detection disabling.

- -hmin ⟨x⟩
Minimal mesh size.

- -hmax ⟨x⟩
Maximal mesh size.

- -hsiz ⟨x⟩
Constant mesh size.

- -hausd ⟨x⟩
Control the Hausdorff distance to the underlying surface geometry.

- -hgrad ⟨x⟩
Control the gradation.

- -hgradreq ⟨x⟩
Control the gradation from required entities toward others.

- -keep-ref
Preserve initial domain references when create the mesh of isovalue.

- -noinsert
No point insertion/deletion.

- -nomove
No point relocation

- -noswap
No edge or face flipping.

- -nosizreq
No imposition of the size of required edges over required vertices.

- -nreg
Normal regularization using laplacian - antilaplacian smoothing.

- -nsd ⟨n⟩
Save the subdomain of index

*n*(default is*n=0*which save all subdomains).- -optim
Mesh improvement with respect to the initial mesh size.

- -rn ⟨n⟩
Turn on (

*n=1*) or off (*n=0*) the renumbering using the**SCOTCH**library (only available with the*USE_SCOTCH*compilation flag and if the scotch library is founded).

## Return Values

**mmgs** returns:

the 0 value if successful;

the 1 value if the process fail but we can save a conform mesh;

the 2 value if the process fail and we can't save a conform mesh.