46#ifndef MMG_COMPARABLE_OUTPUT
47 fprintf(stdout,
"\n %s\n MODULE MMG%s: %s (%s)\n %s\n",
50 fprintf(stdout,
"\n %s\n MODULE MMG%s\n %s\n",
54#if !defined _WIN32 && !defined MMG_COMPARABLE_OUTPUT
55 fprintf(stdout,
" git branch: %s\n",MMG_GIT_BRANCH);
56 fprintf(stdout,
" git commit: %s\n",MMG_GIT_COMMIT);
57 fprintf(stdout,
" git date: %s\n\n",MMG_GIT_DATE);
72 fprintf(stdout,
"\nDefault parameters values:\n");
74 fprintf(stdout,
"\n** Generic options :\n");
75 fprintf(stdout,
"verbosity (-v) : %d\n",
77 fprintf(stdout,
"maximal memory size (-m) : %zu MB\n",
81 fprintf(stdout,
"\n** Parameters\n");
82 fprintf(stdout,
"angle detection (-ar) : %lf\n",
84 fprintf(stdout,
"minimal mesh size (-hmin) : %lf\n"
85 "If not yet computed: 0.001 of "
86 "the mesh bounding box if no metric is provided, 0.1 times the "
87 "minimum of the metric sizes otherwise.\n",
mesh->
info.
hmin);
88 fprintf(stdout,
"maximal mesh size (-hmax) : %lf\n"
89 " If not yet computed: size of "
90 "the mesh bounding box without metric, 10 times the maximum of the "
92 fprintf(stdout,
"Hausdorff distance (-hausd) : %lf\n",
95 fprintf(stdout,
"gradation control (-hgrad) : %lf\n",
98 fprintf(stdout,
"gradation control for required entities (-hgradreq) : %lf\n",
100 fprintf(stdout,
"coordinate regularization parameter (-xreg) : %lf\n",
105 int split,MMG5_int rin,MMG5_int rex){
112 fprintf(stderr,
"\n ## Error: %s: You must set the number of material",__func__);
113 fprintf(stderr,
" with the MMG2D_Set_iparameters function before setting");
114 fprintf(stderr,
" values in multi material structure. \n");
118 fprintf(stderr,
"\n ## Error: %s: unable to set a new material.\n",
120 fprintf(stderr,
" max number of materials: %d\n",
mesh->
info.
nmat);
124 fprintf(stderr,
"\n ## Error: %s: negative references are not allowed.\n",
132 if ( mat->
ref == ref ) {
143 fprintf(stderr,
"\n ## Warning: %s: new materials (interior, exterior)",
145 fprintf(stderr,
" for material of ref %" MMG5_PRId
"\n",ref);
152 fprintf(stderr,
"\n ## Error: %s: unexpected value for the 'split' argument."
153 " You must use the MMG5_MMAT_Split or MMG5_MMAT_NpSplit keywords \n",
168 fprintf(stderr,
"\n ## Error: %s: unable to create lookup table for multiple materials.\n",
181 fprintf(stderr,
"\n ## Error: %s: You must set the number of"
182 " level-set based references",__func__);
183 fprintf(stderr,
" with the MMG2D_Set_iparameters function before setting");
184 fprintf(stderr,
" based references values. \n");
188 fprintf(stderr,
"\n ## Error: %s: unable to set a new level-set"
189 " based reference.\n",__func__);
190 fprintf(stderr,
" max number of level-set based references: %d\n",
mesh->
info.
nbr);
194 fprintf(stderr,
"\n ## Error: %s: negative references are not allowed.\n",
213 fprintf(stdout,
"\nUsage: %s [-v [n]] [opts..] filein [fileout]\n",prog);
215 fprintf(stdout,
"\n** Generic options\n");
216 fprintf(stdout,
"-h Print this message\n");
217 fprintf(stdout,
"-v [n] Tune level of verbosity, [-1..10]\n");
218 fprintf(stdout,
"-m [n] Set maximal memory size to n Mbytes\n");
219 fprintf(stdout,
"-d Turn on debug mode\n");
220 fprintf(stdout,
"-val Print the default parameters values\n");
221 fprintf(stdout,
"-default Save a local parameters file for default parameters"
224 fprintf(stdout,
"\n** File specifications\n");
225 fprintf(stdout,
"-in file input triangulation\n");
226 fprintf(stdout,
"-out file output triangulation\n");
227 fprintf(stdout,
"-sol file load solution or metric file\n");
228 fprintf(stdout,
"-met file load metric file\n");
229 fprintf(stdout,
"-f file load parameter file\n");
231 fprintf(stdout,
"\n** Mode specifications (mesh adaptation by default)\n");
232 fprintf(stdout,
"-ls val create mesh of isovalue val (0 if no argument provided)\n");
233 fprintf(stdout,
"-lssurf val split mesh boundaries on isovalue val (0 if no argument provided)\n");
243 fprintf(stdout,
"\n** Parameters\n");
244 fprintf(stdout,
"-A enable anisotropy (without metric file).\n");
245 fprintf(stdout,
"-ar val angle detection\n");
246 fprintf(stdout,
"-nr no angle detection\n");
247 fprintf(stdout,
"-hausd val control Hausdorff distance\n");
248 fprintf(stdout,
"-hgrad val control gradation\n");
249 fprintf(stdout,
"-hmax val maximal mesh size\n");
250 fprintf(stdout,
"-hmin val minimal mesh size\n");
251 fprintf(stdout,
"-hsiz val constant mesh size\n");
252 fprintf(stdout,
"-rmc [val] enable the removal of componants whose volume fraction is less than\n"
253 " val (1e-5 if not given) of the mesh volume (ls mode).\n");
263 fprintf(stdout,
"-noinsert no point insertion/deletion \n");
264 fprintf(stdout,
"-nomove no point relocation\n");
265 fprintf(stdout,
"-noswap no edge or face flipping\n");
266 fprintf(stdout,
"-nreg normal regul.\n");
267 fprintf(stdout,
"-xreg vertex regul.\n");
268 fprintf(stdout,
"-nsd val save the subdomain number val (0==all subdomain)\n");
269 fprintf(stdout,
"-optim mesh optimization\n");
281 fprintf(stdout,
"-lag [n] lagrangian mesh displacement according to mode [0/1/2]\n");
282 fprintf(stdout,
" 0: displacement\n");
283 fprintf(stdout,
" 1: displacement + remeshing (swap and move)\n");
284 fprintf(stdout,
" 2: displacement + remeshing (split, collapse,"
285 " swap and move)\n");
296 fprintf(stdout,
"-opnbdy preserve input triangles at the interface of"
297 " two domains of the same reference.\n");
307 fprintf(stdout,
"\n** Parameters for advanced users\n");
308 fprintf(stdout,
"-nosizreq disable setting of required edge sizes over required vertices.\n");
309 fprintf(stdout,
"-hgradreq val control gradation from required entities toward others\n");
398 while ( to_remove && (k < mesh->na) ) {
422 while ( ++k < mesh->na );
436 fprintf(stdout,
" Deleted iso edges: %" MMG5_PRId
"\n",na-
mesh->
na);
442 else if (
mesh->
na < na ) {
444 fprintf(stderr,
" Exit program.\n");
MMG5_pMesh MMG5_pSol * sol
#define MMG5_MMAT_NoSplit
int MMG5_MultiMat_init(MMG5_pMesh mesh)
#define MMG5_ADD_MEM(mesh, size, message, law)
#define MMG5_DEL_MEM(mesh, ptr)
#define MMG5_SAFE_RECALLOC(ptr, prevSize, newSize, type, message, law)
Structure to store edges of am MMG mesh.
To store user-defined references in the mesh (useful in LS mode)