MMG3D(1)

πŸ“¦ version 5.8.0, in fedora 43, fedora 44, nixpkgs unstable

πŸ’– MMG3D πŸ’–

okay bestie, so this is the page for mmg3d, and it lives in the General Commands Manual β€” section 1, no cap. it's giving mesh wizardry, and i'm gonna walk you through every single flag so you don't have to squint at it alone 🫢


✨ NAME ✨

mmg3d β€” adaptation and optimization of a tetrahedral mesh and implicit domain meshing. that's the whole pitch, short and iconic πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

mmg3d ⟨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⟩] [-rmc x] [-opnbdy]
      [-lag ⟨n⟩] [-ls x] [-lssurf x] [-nofem] [-noinsert] [-nomove]
      [-noswap] [-nosurf] [-nosizreq] [-nreg] [-xreg] [-nsd] [-optim]
      [-optimLES] [-octree ⟨n⟩] [-rn ⟨n⟩]

🌸 DESCRIPTION 🌸

the mmg3d application is dedicated to tetrahedral remeshing. and not just one mesh β€” both the surface mesh and the volume mesh get modified. equal opportunity glow-up ✨

by default it performs mesh modifications in order to control the surface approximation. that's the out-of-the-box behaviour, no extra input needed.

hand it a metric file and it adapts the mesh to the prescribed sizes at nodes. very "i have opinions about your edge lengths" of it πŸŽ€

without a metric file, the -optim option lets it improve the mesh quality with respect to the initial mesh size. and the -optimLES option? that one improves strongly the isotropic mesh quality for LES simulations. main character energy fr fr πŸ”₯

now, if you give it a level-set file containing the values of the level-set function at the mesh nodes, the -ls option lets you explicitly mesh an implicit domain, and -lssurf splits mesh boundaries on a provided isovalue. so many doors opening 🌈

and if you provide a displacement file, -lag applies a lagrangian displacement to boundary mesh nodes. wig. πŸ’«


πŸŽ€ COMMAND LINE ARGUMENTS πŸŽ€

1. Generic options

  • -h β€” print help. your safety net when you're lost πŸ’€
  • -v ⟨n⟩ β€” tune level of verbosity. takes values between -1 and 10.
  • -m ⟨n⟩ β€” set maximal memory size to n MBytes.
  • -d β€” turn on debug mode. bring a snack, it's chatty πŸ“
  • -default β€” write a local parameter file (with extension .mmg3d) with setted values.
  • -val β€” print the default parameters values.

2. File specifications

  • -in ⟨mesh_file⟩ β€” input triangulation.
  • -out ⟨output_file⟩ β€” output triangulation.
  • -sol ⟨solution_file⟩ β€” load metric, displacement or level-set 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. no flag, no vibes, sorry 😭
  • -ls x β€” create mesh of isovalue x (0.0 if x is not provided).
  • -lssurf x β€” split boundary mesh on isovalue x (0.0 if x is not provided).

4. 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 between the surface mesh and 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).
  • -opnbdy β€” preserve input triangles at the interface of two domains of the same reference.
  • -nofem β€” do not force Mmg to create a finite element mesh.
  • -noinsert β€” no point insertion/deletion.
  • -nomove β€” no point relocation.
  • -nosurf β€” no surface modifications.
  • -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.
  • -xreg β€” vertex coordinates regularization using laplacian - antilaplacian smoothing.
  • -nsd ⟨n⟩ β€” save the subdomain of index n (default is n=0 which save all subdomains).
  • -octree ⟨n⟩ β€” specify the maximal number of point per octree cell (only available without the PATTERN compilation flag).
  • -optim β€” mesh improvement with respect to the initial mesh size.
  • -optimLES β€” strong isotropic mesh optimization for LES computations.
  • -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 πŸ’œ

mmg3d returns:

  • the 0 value if successful; πŸŽ‰
  • the 1 value if the process fail but can save a conform mesh;
  • the 2 value if the process fail and can't save a comform mesh. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

mmgs(1) mmg2d(1) β€” go say hi to the siblings, they're family 🫢


and that's the whole page, bestie!! this one's the mmg3d page, version/date stamped May 04, 2015, footer label MMG3D(1) β€” the mmg3d tool, dated May 04, 2015, tagged MMG3D(1). go forth and remesh, you absolute icon πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from