mmg2d - Man Page

Adaptation and optimization of bidimensional meshes


mmg2dmesh_file⟩ [output_file] [-solsolution_file⟩] [-metmetric_file⟩] [-h] [-v] [-mn⟩] [-d] [-val] [-default] [-A] [-arx⟩ | -nr] [-hminx⟩] [-hmaxx⟩] [-hsizx⟩] [-hausdx⟩] [-hgradx⟩] [-hgradreqx⟩] [-rmc x] [-lagn⟩] [-ls x] [-noinsert] [-nomove] [-noswap] [-nosurf] [-nosizreq] [-nreg] [-nsdn⟩] [-opnbdy] [-optim] [-3dMeditn⟩]


The mmg2d application is dedicated to bidimensional triangular mesh remeshing.

By default it improve the mesh quality with respect to its initial size.
Providing a metric file, it adapts the mesh to the prescribed sizes at nodes. -ls option allows to explicitly mesh an implicit domain.
Without metric file, the -optim option allow to improve the mesh quality with respect to the initial mesh size.

Command Line Arguments

  1. Generic options:


    Print help.

    -v ⟨n⟩

    Tune level of verbosity.
    Takes values between -1 and 10.

    -m ⟨n⟩

    Set maximal memory size to n MBytes.


    Turn on debug mode.


    Write a local parameter file (with extension .mmg2d) with setted values.


    Print the default parameters values.

  2. File specifications:

    -in ⟨mesh_file⟩

    Input triangulation.

    -out ⟨output_file⟩

    Output triangulation.

    -sol ⟨solution_file⟩

    Load metric, level-set or displacement file.

    -met ⟨metric_file⟩

    Load metric file in level-set mode.

  3. Mode specifications (default is mesh adaptation):

    -lag ⟨n⟩

    Lagrangian mesh displacement according to mode 0 ( n=0 ), 1 ( n=1 ) or 2 ( n=2 ). This option is only available with the USE_ELAS compilation flag. The LinearElasticity library must be founded to activate this flag.

    -ls x

    Create mesh of isovalue x (0.0 if x is not provided).

  4. Parameters:


    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.

    -rmc x

    Remove componants whose volumic fraction is less than x (1.e-5 if x is not provided) of the whole mesh volume (level-set mode).


    Preserve input edges at the interface of two domains of the same reference.


    No point insertion/deletion.


    No point relocation


    No surface modifications.


    No edge or face flipping.


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


    Normal regularization using laplacian - antilaplacian smoothing.

    -nsd ⟨n⟩

    Save the subdomain of index n (default is n=0 which save all subdomains).


    Mesh improvement with respect to the initial mesh size.

    -3dMedit ⟨n⟩

    Write and/or read Medit mesh file in 3D. If val=1 write the 2D mesh in 3D. If val=2 read and write 2D mesh in 3D. If val=3 read a 2D mesh in 3D and write it in 2D.

Return Values

mmg2d returns:

See Also

mmg3d(1) mmgs(1)

Referenced By

mmg3d(1), mmgs(1).

May 4, 2015