mmgpy 0.1.1__cp39-cp39-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of mmgpy might be problematic. Click here for more details.

Files changed (69) hide show
  1. bin/concrt140.dll +0 -0
  2. bin/mmg.dll +0 -0
  3. bin/mmg2d.dll +0 -0
  4. bin/mmg2d.exe +0 -0
  5. bin/mmg3d.dll +0 -0
  6. bin/mmg3d.exe +0 -0
  7. bin/mmgs.dll +0 -0
  8. bin/mmgs.exe +0 -0
  9. bin/msvcp140.dll +0 -0
  10. bin/msvcp140_1.dll +0 -0
  11. bin/msvcp140_2.dll +0 -0
  12. bin/msvcp140_atomic_wait.dll +0 -0
  13. bin/msvcp140_codecvt_ids.dll +0 -0
  14. bin/vcruntime140.dll +0 -0
  15. bin/vcruntime140_1.dll +0 -0
  16. include/mmg/common/libmmgtypes.h +687 -0
  17. include/mmg/common/libmmgtypesf.h +762 -0
  18. include/mmg/common/mmg_export.h +47 -0
  19. include/mmg/common/mmgcmakedefines.h +46 -0
  20. include/mmg/common/mmgcmakedefinesf.h +29 -0
  21. include/mmg/common/mmgversion.h +54 -0
  22. include/mmg/libmmg.h +67 -0
  23. include/mmg/libmmgf.h +42 -0
  24. include/mmg/mmg2d/libmmg2d.h +2761 -0
  25. include/mmg/mmg2d/libmmg2df.h +3263 -0
  26. include/mmg/mmg2d/mmg2d_export.h +34 -0
  27. include/mmg/mmg3d/libmmg3d.h +3444 -0
  28. include/mmg/mmg3d/libmmg3df.h +4041 -0
  29. include/mmg/mmg3d/mmg3d_export.h +34 -0
  30. include/mmg/mmgs/libmmgs.h +2560 -0
  31. include/mmg/mmgs/libmmgsf.h +3028 -0
  32. include/mmg/mmgs/mmgs_export.h +34 -0
  33. lib/cmake/mmg/FindElas.cmake +57 -0
  34. lib/cmake/mmg/FindSCOTCH.cmake +373 -0
  35. lib/cmake/mmg/MmgTargets-release.cmake +49 -0
  36. lib/cmake/mmg/MmgTargets.cmake +127 -0
  37. lib/cmake/mmg/mmgConfig.cmake +43 -0
  38. lib/mmg.lib +0 -0
  39. lib/mmg2d.lib +0 -0
  40. lib/mmg3d.lib +0 -0
  41. lib/mmgs.lib +0 -0
  42. mmgpy/__init__.py +14 -0
  43. mmgpy/_mmgpy.cp39-win_amd64.pyd +0 -0
  44. mmgpy/_mmgpy.pyi +29 -0
  45. mmgpy/_version.py +3 -0
  46. mmgpy/_version.py.in +3 -0
  47. mmgpy/mmg2d.dll +0 -0
  48. mmgpy/mmg2d.lib +0 -0
  49. mmgpy/mmg3d.dll +0 -0
  50. mmgpy/mmg3d.lib +0 -0
  51. mmgpy/mmgs.dll +0 -0
  52. mmgpy/mmgs.lib +0 -0
  53. mmgpy/py.typed +0 -0
  54. mmgpy-0.1.1.data/scripts/mmg2d.dll +0 -0
  55. mmgpy-0.1.1.data/scripts/mmg2d.exe +0 -0
  56. mmgpy-0.1.1.data/scripts/mmg2d.lib +0 -0
  57. mmgpy-0.1.1.data/scripts/mmg3d.dll +0 -0
  58. mmgpy-0.1.1.data/scripts/mmg3d.exe +0 -0
  59. mmgpy-0.1.1.data/scripts/mmg3d.lib +0 -0
  60. mmgpy-0.1.1.data/scripts/mmgs.dll +0 -0
  61. mmgpy-0.1.1.data/scripts/mmgs.exe +0 -0
  62. mmgpy-0.1.1.data/scripts/mmgs.lib +0 -0
  63. mmgpy-0.1.1.dist-info/METADATA +52 -0
  64. mmgpy-0.1.1.dist-info/RECORD +69 -0
  65. mmgpy-0.1.1.dist-info/WHEEL +5 -0
  66. mmgpy-0.1.1.dist-info/licenses/LICENSE +19 -0
  67. share/man/man1/mmg2d.1.gz +0 -0
  68. share/man/man1/mmg3d.1.gz +0 -0
  69. share/man/man1/mmgs.1.gz +0 -0
@@ -0,0 +1,687 @@
1
+ /* =============================================================================
2
+ ** This file is part of the mmg software package for the tetrahedral
3
+ ** mesh modification.
4
+ ** Copyright (c) Bx INP/CNRS/Inria/UBordeaux/UPMC, 2004-
5
+ **
6
+ ** mmg is free software: you can redistribute it and/or modify it
7
+ ** under the terms of the GNU Lesser General Public License as published
8
+ ** by the Free Software Foundation, either version 3 of the License, or
9
+ ** (at your option) any later version.
10
+ **
11
+ ** mmg is distributed in the hope that it will be useful, but WITHOUT
12
+ ** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
+ ** FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14
+ ** License for more details.
15
+ **
16
+ ** You should have received a copy of the GNU Lesser General Public
17
+ ** License and of the GNU General Public License along with mmg (in
18
+ ** files COPYING.LESSER and COPYING). If not, see
19
+ ** <http://www.gnu.org/licenses/>. Please read their terms carefully and
20
+ ** use this copy of the mmg distribution only if you accept them.
21
+ ** =============================================================================
22
+ */
23
+
24
+ /**
25
+ * \file common/libmmgtypes.h
26
+ * \ingroup API
27
+ * \brief Types used throughout the Mmg libraries
28
+ * \author Algiane Froehly (Inria/UBordeaux)
29
+ * \version 5
30
+ * \date 01 2014
31
+ * \copyright GNU Lesser General Public License.
32
+ */
33
+ #include <stdint.h>
34
+ #include <stdarg.h>
35
+ #include <stddef.h>
36
+
37
+ #include "mmg/common/mmgcmakedefines.h"
38
+ #include "mmg/common/mmgversion.h"
39
+
40
+ #ifndef _LIBMMGTYPES_H
41
+ #define _LIBMMGTYPES_H
42
+
43
+ /**
44
+ * \def MMG5_SUCCESS
45
+ *
46
+ * Return value for success.
47
+ *
48
+ */
49
+ #define MMG5_SUCCESS 0
50
+ /**
51
+ * \def MMG5_LOWFAILURE
52
+ *
53
+ * Return value if the remesh process failed but we can save a conform
54
+ * mesh.
55
+ *
56
+ */
57
+ #define MMG5_LOWFAILURE 1
58
+ /**
59
+ * \def MMG5_STRONGFAILURE
60
+ *
61
+ * Return value if the remesh process failed and the mesh is
62
+ * non-conform.
63
+ *
64
+ */
65
+ #define MMG5_STRONGFAILURE 2
66
+
67
+ /**
68
+ * Implicit boundary in iso mode
69
+ *
70
+ */
71
+ #define MG_ISO 10
72
+
73
+ /**
74
+ * Default reference to assign to positive domain in iso mode
75
+ *
76
+ */
77
+ #define MG_PLUS 2
78
+ /**
79
+ * Default reference to assign to negative domain in iso mode
80
+ *
81
+ */
82
+ #define MG_MINUS 3
83
+
84
+ /**
85
+ * \def MMG5_ARG_start
86
+ *
87
+ * To begin a list of variadic arguments (mandatory first arg for all our
88
+ * variadic functions)
89
+ *
90
+ * \remark we cannot use an enum because used in
91
+ * variadic functions).
92
+ */
93
+ #define MMG5_ARG_start 1
94
+ /**
95
+ * \def MMG5_ARG_ppMesh
96
+ *
97
+ * Pointer toward a MMG5_pMesh structure (for structure allocations purposes)
98
+ *
99
+ * \remark we cannot use an enum because used in
100
+ * variadic functions).
101
+ */
102
+ #define MMG5_ARG_ppMesh 2
103
+ /**
104
+ * \def MMG5_ARG_ppLs
105
+ *
106
+ * Pointer toward a MMG5_pSol structure storing a level-set (for structure
107
+ * allocations purposes)
108
+ *
109
+ * \remark we cannot use an enum because used in
110
+ * variadic functions).
111
+ */
112
+ #define MMG5_ARG_ppLs 3
113
+ /**
114
+ * \def MMG5_ARG_ppMet
115
+ *
116
+ * Pointer toward a MMG5_pSol structure storing a metric (for structure
117
+ * allocations purposes)
118
+ *
119
+ * \remark we cannot use an enum because used in
120
+ * variadic functions).
121
+ */
122
+ #define MMG5_ARG_ppMet 4
123
+ /**
124
+ * \def MMG5_ARG_ppDisp
125
+ *
126
+ * Pointer toward a MMG5_pSol structure storing a displacement (for structure
127
+ * allocations purposes)
128
+ *
129
+ * \remark we cannot use an enum because used in
130
+ * variadic functions).
131
+ */
132
+ #define MMG5_ARG_ppDisp 5
133
+ /**
134
+ * \def MMG5_ARG_ppSols
135
+ *
136
+ * Pointer toward an array of MMG5_Sol structures storing a list of solutions
137
+ * allocations purposes)
138
+ *
139
+ * \remark we cannot use an enum because used in
140
+ * variadic functions).
141
+ */
142
+ #define MMG5_ARG_ppSols 6
143
+ /**
144
+ * \def MMG5_ARG_pMesh
145
+ *
146
+ * MMG5_pMesh structure
147
+ *
148
+ * \remark we cannot use an enum because used in
149
+ * variadic functions).
150
+ */
151
+ #define MMG5_ARG_pMesh 7
152
+ /**
153
+ * \def MMG5_ARG_pMet
154
+ *
155
+ * MMG5_pSol structure storing a metric field
156
+ *
157
+ * \remark we cannot use an enum because used in
158
+ * variadic functions).
159
+ */
160
+ #define MMG5_ARG_pMet 8
161
+ /**
162
+ * \def MMG5_ARG_pDisp
163
+ *
164
+ * MMG5_pSol structure storing a displacement field
165
+ *
166
+ * \remark we cannot use an enum because used in
167
+ * variadic functions).
168
+ */
169
+ #define MMG5_ARG_pDisp 9
170
+ /**
171
+ * \def MMG5_ARG_end
172
+ *
173
+ * To end a list of variadic argument (mandatory last argument for all our
174
+ * variadic functions)
175
+ *
176
+ * \remark we cannot use an enum because used in
177
+ * variadic functions).
178
+ */
179
+ #define MMG5_ARG_end 10
180
+
181
+ /**
182
+ * \def MMG5_NSOLS_MAX
183
+ *
184
+ * Maximal number of solutions per entity
185
+ *
186
+ */
187
+ #define MMG5_NSOLS_MAX 100
188
+
189
+ /**
190
+ * \def MMG5_FILENAME_LEN_MAX
191
+ *
192
+ * Maximal length of filenames
193
+ *
194
+ */
195
+ #define MMG5_FILENAME_LEN_MAX 255
196
+
197
+ /**
198
+ * \def MMG5_MMAT_NOSPLIT
199
+ *
200
+ * Entity that must not be splitted in multimat mode
201
+ *
202
+ */
203
+ #define MMG5_MMAT_NoSplit 0
204
+
205
+ /**
206
+ * \def MMG5_MMAT_Split
207
+ *
208
+ * Entity that must be splitted in multimat mode
209
+ *
210
+ */
211
+ #define MMG5_MMAT_Split 1
212
+
213
+ /**
214
+ * \enum MMG5_type
215
+ * \brief Type of solutions.
216
+ */
217
+ enum MMG5_type {
218
+ MMG5_Notype, /*!< Undefined type (unusable) */
219
+ MMG5_Scalar, /*!< Scalar solution */
220
+ MMG5_Vector, /*!< Vectorial solution */
221
+ MMG5_Tensor /*!< Tensorial solution */
222
+ };
223
+
224
+ /**
225
+ * \enum MMG5_entities
226
+ * \brief Identifies the types of mesh entities.
227
+ */
228
+ enum MMG5_entities {
229
+ MMG5_Noentity, /*!< Undefined type (unusable) */
230
+ MMG5_Vertex, /*!< Vertex entity */
231
+ MMG5_Edg, /*!< Edge entity */
232
+ MMG5_Triangle, /*!< Triangle entity */
233
+ MMG5_Tetrahedron, /*!< Tetra entity */
234
+ };
235
+
236
+ /**
237
+ * \enum MMG5_Format
238
+ * \brief Type of supported file format
239
+ */
240
+ enum MMG5_Format {
241
+ MMG5_FMT_MeditASCII, /*!< ASCII Medit (.mesh) */
242
+ MMG5_FMT_MeditBinary, /*!< Binary Medit (.meshb) */
243
+ MMG5_FMT_GmshASCII, /*!< ASCII Gmsh */
244
+ MMG5_FMT_GmshBinary, /*!< Binary Gmsh */
245
+ MMG5_FMT_VtkPvtp, /*!< VTK pvtp */
246
+ MMG5_FMT_VtkPvtu, /*!< VTK pvtu */
247
+ MMG5_FMT_VtkVtu, /*!< VTK vtu */
248
+ MMG5_FMT_VtkVtp, /*!< VTK vtp */
249
+ MMG5_FMT_VtkVtk, /*!< VTK vtk */
250
+ MMG5_FMT_Tetgen, /*!< Tetgen or Triangle */
251
+ MMG5_FMT_Unknown /*!< Unrecognized */
252
+ };
253
+
254
+ /**
255
+ * \struct MMG5_Par
256
+ * \brief Local parameters for a specific entity and reference
257
+ *
258
+ * This struct can store the local values (minimal and maximal edge lengths and
259
+ * Hausdorff distance) associated to the given reference of an element of type
260
+ * \a elt (point, edge... ).
261
+ *
262
+ */
263
+ typedef struct {
264
+ double hmin; /*!< minimal size for edges */
265
+ double hmax; /*!< maximal size for edges */
266
+ double hausd; /*!< Hausdorff value */
267
+ MMG5_int ref; /*!< Reference value */
268
+ int8_t elt; /*!< Element type */
269
+ } MMG5_Par; typedef MMG5_Par * MMG5_pPar;
270
+
271
+ /**
272
+ * \struct MMG5_Point
273
+ * \brief Structure to store vertices of an MMG mesh.
274
+ * \todo What to do with n[3], try to remove s.
275
+ */
276
+ typedef struct {
277
+ double c[3]; /*!< Coordinates */
278
+ double n[3]; /*!< Unitary normal (regular points) or unitary tangent (ridge
279
+ * and ref points) for mmgs and unitary tangent (if needed) for
280
+ * mmg3d */
281
+ #ifdef USE_POINTMAP
282
+ MMG5_int src; /*!< Source point in input mesh */
283
+ #endif
284
+ MMG5_int ref; /*!< Reference of point */
285
+ MMG5_int xp; /*!< Surface point number */
286
+ MMG5_int tmp; /*!< Index of point in the saved mesh (we don't count
287
+ the unused points)*/
288
+ MMG5_int flag; /*!< Flag to know if we have already treated the point */
289
+ MMG5_int s;
290
+ uint16_t tag; /*!< Contains binary flags : if \f$tag=23=16+4+2+1\f$, then
291
+ the point is \a MG_REF, \a MG_GEO, \a MG_REQ and \a MG_BDY */
292
+ int8_t tagdel; /*!< Tag for delaunay */
293
+ } MMG5_Point;
294
+ typedef MMG5_Point * MMG5_pPoint;
295
+
296
+ /**
297
+ * \struct MMG5_xPoint
298
+ * \brief Structure to store surface vertices of an MMG mesh.
299
+ */
300
+ typedef struct {
301
+ double n1[3],n2[3]; /*!< Normals at boundary vertex;
302
+ n1!=n2 if the vertex belong to a ridge */
303
+ int8_t nnor; /* By default 0; 1 if no normal available (internal NOM point) */
304
+ } MMG5_xPoint;
305
+ typedef MMG5_xPoint * MMG5_pxPoint;
306
+
307
+ /**
308
+ * \struct MMG5_Edge
309
+ * \brief Structure to store edges of am MMG mesh.
310
+ */
311
+ typedef struct {
312
+ MMG5_int a,b; /*!< Extremities of the edge */
313
+ MMG5_int ref; /*!< Reference of the edge */
314
+ MMG5_int base; /*!< 2Donly: used to store the tria+ tria edge indices
315
+ that allow to access to the edge */
316
+ uint16_t tag; /*!< Binary flags */
317
+ } MMG5_Edge;
318
+ typedef MMG5_Edge * MMG5_pEdge;
319
+
320
+ /**
321
+ * \struct MMG5_Tria
322
+ *
323
+ * \brief Structure to store triangles of a MMG mesh.
324
+ *
325
+ * \remark Numbering convention
326
+ * \verbatim
327
+ * Vertices Edges *
328
+ * 2 . *
329
+ * |`\ |`\ *
330
+ * | `\ | `\ *
331
+ * | `\ 1 `0 *
332
+ * | `\ | `\ *
333
+ * | `\ | `\ *
334
+ * 0----------1 .--- 2 ----.
335
+ * \endverbatim
336
+ *
337
+ */
338
+ typedef struct {
339
+ double qual; /*Quality of the triangle*/
340
+ MMG5_int v[3]; /*!< Vertices of the triangle */
341
+ MMG5_int ref; /*!< Reference of the triangle */
342
+ MMG5_int base;
343
+ MMG5_int cc; /*!< used to store the tetra + tetra face indices
344
+ that allow to access to the tria 4*k + i */
345
+ MMG5_int edg[3]; /*!< edg[i] contains the ref of the \f$i^{th}\f$ edge
346
+ of triangle */
347
+ MMG5_int flag;
348
+ uint16_t tag[3]; /*!< tag[i] contains the tag associated to the
349
+ \f$i^{th}\f$ edge of triangle */
350
+ } MMG5_Tria;
351
+ typedef MMG5_Tria * MMG5_pTria;
352
+
353
+
354
+ /**
355
+ * \struct MMG5_Quad
356
+ *
357
+ * \brief Structure to store quadrangles of an MMG mesh.
358
+ *
359
+ * \remark Numbering convention
360
+ * \verbatim
361
+ * Vertices Edges *
362
+ * . *
363
+ * 3----------2 +-----3----+ *
364
+ * | | | | *
365
+ * | | 1 2 *
366
+ * | | | | *
367
+ * | | | | *
368
+ * 0----------1 +----0-----+ *
369
+ * \endverbatim
370
+ *
371
+ */
372
+ typedef struct {
373
+ MMG5_int v[4]; /*!< Vertices of the quadrangle */
374
+ MMG5_int ref; /*!< Reference of the quadrangle */
375
+ MMG5_int base;
376
+ MMG5_int edg[4]; /*!< edg[i] contains the ref of the \f$i^{th}\f$ edge
377
+ of quadrangle */
378
+ uint16_t tag[4]; /*!< tag[i] contains the tag associated to the
379
+ \f$i^{th}\f$ edge of quadrangle */
380
+ } MMG5_Quad;
381
+ typedef MMG5_Quad * MMG5_pQuad;
382
+
383
+
384
+ /**
385
+ * \struct MMG5_Tetra
386
+ *
387
+ * \brief Structure to store tetrahedra of an MMG mesh.
388
+ *
389
+ * \remark The numbering conventions are illustrated below. Face i lies opposite to vertex i.
390
+ * \verbatim
391
+ * Vertices Edges Faces *
392
+ * 3 . . *
393
+ * ,/|`\ ,/|`\ ,/|`\ *
394
+ * ,/ | `\ ,/ | `\ ,/ | `\ *
395
+ * ,/ '. `\ ,2 '. `5 ,/ '. `\ *
396
+ * ,/ | `\ ,/ 4 `\ ,/ 1 `\ *
397
+ * ,/ | `\ ,/ | `\ ,/ | 0 `\ *
398
+ * 0-----------'.--------2 .--------1--'.--------. .------2---'.--------. *
399
+ * `\. | ,/ `\. | ,/ `\. | ,/ *
400
+ * `\. | ,/ `\. | ,3 `\. 3| ,/ *
401
+ * `\. '. ,/ `0. '. ,/ `\. '. ,/ *
402
+ * `\. |/ `\. |/ `\. |/ *
403
+ * `1 `. `. *
404
+ * \endverbatim
405
+ *
406
+ */
407
+ typedef struct {
408
+ double qual; /*!< Quality of the element */
409
+ MMG5_int v[4]; /*!< Vertices of the tetrahedron */
410
+ MMG5_int ref; /*!< Reference of the tetrahedron */
411
+ MMG5_int base;
412
+ MMG5_int mark; /*!< Used for delaunay */
413
+ MMG5_int xt; /*!< Index of the surface \ref MMG5_xTetra associated to the
414
+ tetrahedron (only for tetrahedra that are adjacent to
415
+ surfaces) */
416
+ MMG5_int flag;
417
+ uint16_t tag;
418
+ } MMG5_Tetra;
419
+ typedef MMG5_Tetra * MMG5_pTetra;
420
+
421
+ /**
422
+ * \struct MMG5_xTetra
423
+ * \brief Structure to store additional information for the surface tetrahedra of an MMG mesh.
424
+ */
425
+ typedef struct {
426
+ MMG5_int ref[4]; /*!< ref[i] is the reference of the opposite triangle to the
427
+ \f$i^{th}\f$ vertex of the tetrahedron;*/
428
+ MMG5_int edg[6]; /*!< edg[i] contains the reference of the
429
+ \f$i^{th}\f$ edge of the tetrahedron */
430
+ uint16_t ftag[4]; /*!< ftag[i] contains the tag associated to the
431
+ \f$i^{th}\f$ face of the tetrahedron */
432
+ uint16_t tag[6]; /*!< tag[i] contains the tag associated to the
433
+ \f$i^{th}\f$ edge of the tetrahedron */
434
+ int8_t ori; /*!< Orientation of the triangles of the tetrahedron:
435
+ the $\f$i^{th}\f$ bit of ori is set to 0 when the
436
+ \f$i^{th}\f$ face is bad orientated */
437
+ } MMG5_xTetra;
438
+ typedef MMG5_xTetra * MMG5_pxTetra;
439
+
440
+ /**
441
+ * \struct MMG5_Prism
442
+ *
443
+ * \brief Structure to store prsim of a MMG mesh.
444
+ *
445
+ * \warning prisms are not modified
446
+ *
447
+ * \remark Numbering convention
448
+ * \verbatim
449
+ * Vertices Edges Faces *
450
+ * 3 . . *
451
+ * ,/|`\ ,/|`\ ,/|`\ *
452
+ * ,/ | `\ 6 | 7 ,/ | `\ *
453
+ * ,/ | `\ ,/ | `\ ,/ 1 `\ *
454
+ * 4------+------5 .------8------. .------+------. *
455
+ * | | | | | | | | | *
456
+ * | | | | 2 | | | | *
457
+ * | | | | | | | | | *
458
+ * | | | | | | | 4 | 3 | *
459
+ * | | | 4 | 5 | 2 | *
460
+ * | 0 | | . | | . | *
461
+ * | ,/ `\ | | ,/ `\ | | ,/ `\ | *
462
+ * | ,/ `\ | | ,0 `1 | | ,/ `\ | *
463
+ * |,/ `\| |,/ `\| |,/ 0 `\| *
464
+ * 1-------------2 .------3------. .-------------. *
465
+ *
466
+ * \endverbatim
467
+ *
468
+ */
469
+ typedef struct {
470
+ MMG5_int v[6]; /*!< Vertices of the prism */
471
+ MMG5_int ref; /*!< Reference of the prism */
472
+ MMG5_int base;
473
+ MMG5_int flag;
474
+ MMG5_int xpr; /*!< Index of the surface \ref MMG5_xPrism associated to
475
+ the prism*/
476
+ uint8_t tag;
477
+ } MMG5_Prism;
478
+ typedef MMG5_Prism * MMG5_pPrism;
479
+
480
+ /**
481
+ * \struct MMG5_xPrism
482
+ * \brief Structure to store the surface prism of a MMG mesh.
483
+ */
484
+ typedef struct {
485
+ MMG5_int ref[5]; /*!< face references: ref[0]={0,1,2}, ref[1]={3,4,5},
486
+ * ref[2]={0,3,4,1}, ref[3]={0,2,5,1} */
487
+ MMG5_int edg[9]; /*!< edges references:
488
+ * edg[0]={0,1},edg[1]={0,2},edg[2]={0,3},edg[3]={1,2},
489
+ * edg[4]={1,4},edg[5]={2,5},edg[6]={3,4},edg[7]={3,5},
490
+ * edg[8]={4,5}*/
491
+ uint16_t ftag[5]; /*!< ftag[i] contains the tag associated to the
492
+ \f$i^{th}\f$ face of the prism */
493
+ uint16_t tag[9]; /*!< tag[i] contains the tag associated to the
494
+ \f$i^{th}\f$ edge of the prism */
495
+ } MMG5_xPrism;
496
+ typedef MMG5_xPrism * MMG5_pxPrism;
497
+
498
+ /**
499
+ * \struct MMG5_Mat
500
+ * \brief To store user-defined references in the mesh (useful in LS mode)
501
+ */
502
+ typedef struct {
503
+ int8_t dospl;
504
+ MMG5_int ref,rin,rex;
505
+ } MMG5_Mat;
506
+ typedef MMG5_Mat * MMG5_pMat;
507
+
508
+ /**
509
+ * \struct MMG5_InvMat
510
+ * \brief To store lookup table for references in the mesh (useful in LS mode)
511
+ */
512
+ typedef struct {
513
+ MMG5_int offset;
514
+ MMG5_int size;
515
+ int *lookup;
516
+ } MMG5_InvMat;
517
+ typedef MMG5_InvMat * MMG5_pInvMat;
518
+
519
+ /**
520
+ * \struct MMG5_Info
521
+ * \brief Structure to store input parameters of the job.
522
+ */
523
+ typedef struct {
524
+ MMG5_pPar par;
525
+ double dhd,hmin,hmax,hsiz,hgrad,hgradreq,hausd;
526
+ double min[3],max[3],delta,ls,lxreg,rmc;
527
+ MMG5_int *br; /*!< list of based references to which an implicit surface can be attached */
528
+ MMG5_int isoref; /*!< isovalue reference in ls mode */
529
+ MMG5_int nsd; /*!< index of subdomain to save (0 by default == all subdomains are saved) */
530
+ int mem,npar,npari;
531
+ int nbr,nbri; /*!< number of based references for level-set (BC to which a material can be attached) */
532
+ int opnbdy; /*!< floating surfaces */
533
+ int renum; /*!< scotch renumbering */
534
+ int PROctree; /*!< octree to speedup delaunay insertion */
535
+ int nmati,nmat; /*!< number of materials in ls multimat mode */
536
+ int imprim; /*!< verbosity level */
537
+ int8_t nreg; /*!< normal regularization */
538
+ int8_t xreg; /*!< vertices regularization */
539
+ int8_t ddebug; /*!< debug mode if 1 */
540
+ int8_t badkal; /*!< 1 if the mesh contains a very bad element */
541
+ int8_t iso; /*!< level-set discretization mode */
542
+ int8_t isosurf; /*!< level-set discretization mode on the surface */
543
+ int8_t setfem; /*!< Enforce finite element mesh (try to avoid edges
544
+ * connecting 2 bdy points and tet with more than 1 bdy
545
+ * face) */
546
+ int8_t fem; /*!< internal value for fem / no fem mesh output */
547
+ int8_t lag; /*!< lagrangian mode */
548
+ int8_t parTyp; /*!< Contains binary flags to say which kind of local
549
+ param are setted: if \f$tag = 1+2+4\f$ then the point
550
+ is \a MG_Vert, MG_Tria and MG_Tetra */
551
+ int8_t sethmin; /*!< 1 if user set hmin, 0 otherwise (needed for multiple library calls) */
552
+ int8_t sethmax; /*!< 1 if user set hmin, 0 otherwise (needed for multiple library calls) */
553
+ uint8_t ani, optim, optimLES, noinsert, noswap, nomove, nosurf, nosizreq;
554
+ uint8_t metRidTyp;
555
+ char *fparam; /*!< name of the parameter file */
556
+ /*!< metRidTyp
557
+ * - in 3D: 0 for a classical storage of the aniso
558
+ * metric at ridge, 1 for the Mmg storage (modified
559
+ * by defsiz)
560
+ * - in 2D: used to detect if we call assignEdge function for the first time inside the library */
561
+
562
+ MMG5_pMat mat;
563
+ MMG5_InvMat invmat;
564
+ } MMG5_Info;
565
+
566
+ /**
567
+ * \struct MMG5_hgeom
568
+ * \brief Cell of the hash table of geometric edges.
569
+ */
570
+ typedef struct {
571
+ MMG5_int a; /*!< First extremity of edge */
572
+ MMG5_int b; /*!< Second extremity of edge */
573
+ MMG5_int ref; /*!< Reference or idx (2D) of edge */
574
+ MMG5_int nxt; /*!< Next element of hash table */
575
+ uint16_t tag; /*!< tag of edge */
576
+ } MMG5_hgeom;
577
+
578
+ /**
579
+ * \struct MMG5_HGeom
580
+ * \brief Hash table to store geometric edges.
581
+ */
582
+ typedef struct {
583
+ MMG5_hgeom *geom;
584
+ MMG5_int siz,max,nxt;
585
+ } MMG5_HGeom;
586
+
587
+
588
+ /**
589
+ * \struct MMG5_hedge
590
+ * \brief Used to hash edges (memory economy compared to \ref MMG5_hgeom).
591
+ */
592
+ typedef struct {
593
+ MMG5_int a,b,nxt;
594
+ MMG5_int k; /*!< k = point along edge a b or triangle index */
595
+ MMG5_int s;
596
+ } MMG5_hedge;
597
+
598
+ /**
599
+ * \struct MMG5_Hash
600
+ * \brief Identic as \ref MMG5_HGeom but use \ref MMG5_hedge to store edges
601
+ * instead of \ref MMG5_hgeom (memory economy).
602
+ */
603
+ typedef struct {
604
+ MMG5_int siz,max,nxt;
605
+ MMG5_hedge *item;
606
+ } MMG5_Hash;
607
+
608
+ /**
609
+ * \struct MMG5_Mesh
610
+ * \brief MMG mesh structure.
611
+ * \todo try to remove nc1;
612
+ */
613
+ typedef struct {
614
+ size_t memMax; /*!< Maximum memory available */
615
+ size_t memCur; /*!< Current memory used */
616
+ double gap; /*!< Gap for table reallocation */
617
+ int ver; /*!< Version of the mesh file */
618
+ int dim; /*!< Dimension of the mesh */
619
+ int type; /*!< Type of the mesh */
620
+ MMG5_int npi,nti,nai,nei,np,na,nt,ne,npmax,namax,ntmax,nemax,xpmax,xtmax;
621
+ MMG5_int nquad,nprism; /*!< number of quadrangles and prisms */
622
+ int nsols; /*!< number of solutions (metric excluded) in the solution file (lower than \a NSOLS_MAX)*/
623
+ MMG5_int nc1;
624
+ MMG5_int base; /*!< Used with \a flag to know if an entity has been
625
+ treated */
626
+ MMG5_int mark; /*!< Flag for delaunay (to know if an entity has
627
+ been treated) */
628
+ MMG5_int xp,xt,xpr; /*!< Number of surfaces points, triangles/tetrahedra and prisms */
629
+ MMG5_int npnil; /*!< Index of first unused point */
630
+ MMG5_int nenil; /*!< Index of first unused element */
631
+ MMG5_int nanil; /*!< Index of first unused edge (2d only)*/
632
+ MMG5_int *adja; /*!< Table of tetrahedron adjacency: if
633
+ \f$adja[4*(i-1)+1+j]=4*k+l\f$ then the \f$i^{th}\f$ and
634
+ \f$k^th\f$ tetrahedra are adjacent and share their
635
+ faces \a j and \a l (resp.) */
636
+ MMG5_int *adjt; /*!< Table of triangles adjacency: if
637
+ \f$adjt[3*(i-1)+1+j]=3*k+l\f$ then the \f$i^{th}\f$ and
638
+ \f$k^th\f$ triangles are adjacent and share their
639
+ edges \a j and \a l (resp.) */
640
+ MMG5_int *adjapr; /*!< Table of prisms adjacency: if
641
+ \f$adjapr[5*(i-1)+1+j]=5*k+l\f$ then the \f$i^{th}\f$ and
642
+ \f$k^th\f$ prism are adjacent and share their
643
+ faces \a j and \a l (resp.) */
644
+ MMG5_int *adjq; /*!< Table of quadrangles adjacency: if
645
+ \f$adjq[4*(i-1)+1+j]=4*k+l\f$ then the \f$i^{th}\f$ and
646
+ \f$k^th\f$ quadrilaterals are adjacent and share their
647
+ edges \a j and \a l (resp.) */
648
+ int *ipar; /*!< Store indices of the local parameters */
649
+ MMG5_pPoint point; /*!< Pointer toward the \ref MMG5_Point structure */
650
+ MMG5_pxPoint xpoint; /*!< Pointer toward the \ref MMG5_xPoint structure */
651
+ MMG5_pTetra tetra; /*!< Pointer toward the \ref MMG5_Tetra structure */
652
+ MMG5_pxTetra xtetra; /*!< Pointer toward the \ref MMG5_xTetra structure */
653
+ MMG5_pPrism prism; /*!< Pointer toward the \ref MMG5_Prism structure */
654
+ MMG5_pxPrism xprism; /*!< Pointer toward the \ref MMG5_pxPrism structure */
655
+ MMG5_pTria tria; /*!< Pointer toward the \ref MMG5_Tria structure */
656
+ MMG5_pQuad quadra; /*!< Pointer toward the \ref MMG5_Quad structure */
657
+ MMG5_pEdge edge; /*!< Pointer toward the \ref MMG5_Edge structure */
658
+ MMG5_HGeom htab; /*!< \ref MMG5_HGeom structure */
659
+ MMG5_Info info; /*!< \ref MMG5_Info structure */
660
+ char *namein; /*!< Input mesh name */
661
+ char *nameout; /*!< Output mesh name */
662
+
663
+ } MMG5_Mesh;
664
+ typedef MMG5_Mesh * MMG5_pMesh;
665
+
666
+ /**
667
+ * \struct MMG5_sol
668
+ * \brief MMG Solution structure (for solution or metric).
669
+ *
670
+ */
671
+ typedef struct {
672
+ int ver; /* Version of the solution file */
673
+ int dim; /* Dimension of the solution file*/
674
+ MMG5_int np; /* Number of points of the solution */
675
+ MMG5_int npmax; /* Maximum number of points */
676
+ MMG5_int npi; /* Temporary number of points (internal use only) */
677
+ int size; /* Number of solutions per entity */
678
+ int type; /* Type of the solution (scalar, vectorial or tensorial) */
679
+ int entities; /* Type of the solution (scalar, vectorial of tensorial) */
680
+ double *m; /*!< Solution values */
681
+ double umin,umax; /*!<Min/max values for the solution */
682
+ char *namein; /*!< Input solution file name */
683
+ char *nameout; /*!< Output solution file name */
684
+ } MMG5_Sol;
685
+ typedef MMG5_Sol * MMG5_pSol;
686
+
687
+ #endif