**mmg2d#
Description#
This command is used to remesh and optimize a Zebulon triangular mesh by means of MMG2D remeshing library. MMG2D is part of the open source (LGPL license) MMG platform and interfaced with Zebulon through it’s C language API.
Note that only linear elements are handled by mmg2d. A combination of the quad_to_lin (before mmg2d) and lin_to_quad commands (after) may then be used. Yet, the command quad_to_lin may degrade the initial mesh and, when lin_to_quad is used, the quadratic nodes are not projected on the geometry.
Syntax#
We distinguish two types of syntaxes: specific to all mmg tools (mmg3d, mmgs, mmg2d) and necessary for preserving FEM requiered mesh entities.
**mmg2d
\(~\,\) *min_size hmin
\(~\,\) *max_size hmax
\(~\,\) [ *verbose int-value ]
\(~\,\) [ *hgrad double-val ]
\(~\,\) [ *hausd double-val ]
\(~\,\) [ *angleDetection degree ]
\(~\,\) [ *nodetection ]
\(~\,\) [ *nosurf ]
\(~\,\) [ *noinsert ]
\(~\,\) [ *nomove ]
\(~\,\) [ *noswap ]
\(~\,\) *metric [ default/scalar/from_function/from_file/uniform_from_field ]
\(~\,~\,\) [ metric_options ]
\(~\,\) [ *preserve_elsets elsets-names ]
\(~\,\) [ *preserve_elsets_start_with elsets-start-with-names ]
\(~\,\) [ *preserve_bsets bsets-names ]
\(~\,\) [ *preserve_bsets_start_with bsets-start-with-names ]
\(~\,\) [ *freeze_elsets elsets-names ]
\(~\,\) [ *freeze_elsets_start_with elsets-start-with-names ]
\(~\,\) [ *freeze_bsets bsets-names ]
\(~\,\) [ *freeze_bsets_start_with bsets-start-with-names ]
\(~\,\) [ *freeze_nsets nsets-names ]
\(~\,\) [ *freeze_nsets_start_with nsets-start-with-names ]
\(~\,\) [ *corners nsets-names ]
\(~\,\) [ *corners_start_with nsets-start-with-names ]
\(~\,\) [ *output_mmg_files ]
All syntaxes are identical to the ones of **mmg3d and the reader is invited to see their description on page
Example#
****mesher
***mesh
**open ../GEOF/carre.geof
**mmg2d
*metric scalar
value 0.1
*min_size .1
*max_size 2.
*hgrad 1.
*verbose 6
*preserve_elsets diag mix
*preserve_elsets_start_with eset
*freeze_elsets diag
*preserve_bsets left top bottom
*freeze_bsets left
*freeze_nsets_start_with x y diag
*freeze_nsets diag
**output carre_remeshed.geof
****return