mmgpy 0.1.0__cp312-cp312-macosx_14_0_arm64.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 (71) hide show
  1. bin/mmg2d_O3 +0 -0
  2. bin/mmg3d_O3 +0 -0
  3. bin/mmgs_O3 +0 -0
  4. include/mmg/common/git_log_mmg.h +6 -0
  5. include/mmg/common/libmmgtypes.h +687 -0
  6. include/mmg/common/libmmgtypesf.h +762 -0
  7. include/mmg/common/mmg_export.h +47 -0
  8. include/mmg/common/mmgcmakedefines.h +46 -0
  9. include/mmg/common/mmgcmakedefinesf.h +29 -0
  10. include/mmg/common/mmgversion.h +54 -0
  11. include/mmg/libmmg.h +67 -0
  12. include/mmg/libmmgf.h +42 -0
  13. include/mmg/mmg2d/libmmg2d.h +2761 -0
  14. include/mmg/mmg2d/libmmg2df.h +3263 -0
  15. include/mmg/mmg2d/mmg2d_export.h +34 -0
  16. include/mmg/mmg3d/libmmg3d.h +3444 -0
  17. include/mmg/mmg3d/libmmg3df.h +4041 -0
  18. include/mmg/mmg3d/mmg3d_export.h +34 -0
  19. include/mmg/mmgs/libmmgs.h +2560 -0
  20. include/mmg/mmgs/libmmgsf.h +3028 -0
  21. include/mmg/mmgs/mmgs_export.h +34 -0
  22. lib/cmake/mmg/FindElas.cmake +57 -0
  23. lib/cmake/mmg/FindSCOTCH.cmake +373 -0
  24. lib/cmake/mmg/MmgTargets-release.cmake +49 -0
  25. lib/cmake/mmg/MmgTargets.cmake +127 -0
  26. lib/cmake/mmg/mmgConfig.cmake +43 -0
  27. lib/libmmg.5.8.0.dylib +0 -0
  28. lib/libmmg.5.dylib +0 -0
  29. lib/libmmg.dylib +0 -0
  30. lib/libmmg2d.5.8.0.dylib +0 -0
  31. lib/libmmg2d.5.dylib +0 -0
  32. lib/libmmg2d.dylib +0 -0
  33. lib/libmmg3d.5.8.0.dylib +0 -0
  34. lib/libmmg3d.5.dylib +0 -0
  35. lib/libmmg3d.dylib +0 -0
  36. lib/libmmgs.5.8.0.dylib +0 -0
  37. lib/libmmgs.5.dylib +0 -0
  38. lib/libmmgs.dylib +0 -0
  39. mmgpy/__init__.py +3 -0
  40. mmgpy/_mmgpy.cpython-312-darwin.so +0 -0
  41. mmgpy/_mmgpy.pyi +31 -0
  42. mmgpy/_version.py.in +4 -0
  43. mmgpy/libmmg2d.5.8.0.dylib +0 -0
  44. mmgpy/libmmg2d.5.dylib +0 -0
  45. mmgpy/libmmg2d.dylib +0 -0
  46. mmgpy/libmmg3d.5.8.0.dylib +0 -0
  47. mmgpy/libmmg3d.5.dylib +0 -0
  48. mmgpy/libmmg3d.dylib +0 -0
  49. mmgpy/libmmgs.5.8.0.dylib +0 -0
  50. mmgpy/libmmgs.5.dylib +0 -0
  51. mmgpy/libmmgs.dylib +0 -0
  52. mmgpy/py.typed +0 -0
  53. mmgpy-0.1.0.data/scripts/libmmg2d.5.8.0.dylib +0 -0
  54. mmgpy-0.1.0.data/scripts/libmmg2d.5.dylib +0 -0
  55. mmgpy-0.1.0.data/scripts/libmmg2d.dylib +0 -0
  56. mmgpy-0.1.0.data/scripts/libmmg3d.5.8.0.dylib +0 -0
  57. mmgpy-0.1.0.data/scripts/libmmg3d.5.dylib +0 -0
  58. mmgpy-0.1.0.data/scripts/libmmg3d.dylib +0 -0
  59. mmgpy-0.1.0.data/scripts/libmmgs.5.8.0.dylib +0 -0
  60. mmgpy-0.1.0.data/scripts/libmmgs.5.dylib +0 -0
  61. mmgpy-0.1.0.data/scripts/libmmgs.dylib +0 -0
  62. mmgpy-0.1.0.data/scripts/mmg2d +0 -0
  63. mmgpy-0.1.0.data/scripts/mmg3d +0 -0
  64. mmgpy-0.1.0.data/scripts/mmgs +0 -0
  65. mmgpy-0.1.0.dist-info/METADATA +52 -0
  66. mmgpy-0.1.0.dist-info/RECORD +71 -0
  67. mmgpy-0.1.0.dist-info/WHEEL +5 -0
  68. mmgpy-0.1.0.dist-info/licenses/LICENSE +19 -0
  69. share/man/man1/mmg2d.1.gz +0 -0
  70. share/man/man1/mmg3d.1.gz +0 -0
  71. share/man/man1/mmgs.1.gz +0 -0
@@ -0,0 +1,3444 @@
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
+ * This file defines the C and Fortran headers of the mmg3d API, and
26
+ * their Doxygen documentation.
27
+ *
28
+ * NOTES FOR DEVELOPERS:
29
+ *
30
+ * - The Fortran headers are generated from comment lines that start with '* >'.
31
+ * They must match the C declarations.
32
+ *
33
+ * - We cannot handle enum types in the Fortran version so enums are replaced
34
+ * by ints in both versions.
35
+ *
36
+ * - To keep the genheader program working, don't break line between an enum
37
+ * name and the opening brace (it creates errors under windows)
38
+ *
39
+ * - Since Mmg version 5,
40
+ * -- data structures and parameters that are common between mmg3d, mmg2d
41
+ * and mmgs use the MMG5_ prefix;
42
+ * -- API functions should have an MMG3D_, MMG2D_, or MMGS_ prefix,
43
+ * depending on the library; and
44
+ * -- some MMG5_ API functions exists but they are common to the
45
+ * three libraries.
46
+ *
47
+ */
48
+
49
+ /**
50
+ *
51
+ * \file mmg3d/libmmg3d.h
52
+ * \ingroup API
53
+ * \brief API headers and documentation for the mmg3d library, for volumetric meshes in 3D
54
+ * \author Algiane Froehly (Inria/UBordeaux)
55
+ * \version 5
56
+ * \date 01 2014
57
+ * \copyright GNU Lesser General Public License.
58
+ *
59
+ * These are the API functions for the mmg3d library. These functions allow to
60
+ * load and save meshes and data defined on meshes; add, extract, or modify mesh
61
+ * data; and to call the library functions that perform remeshing, level-set
62
+ * discretization, and Lagrangian motion.
63
+ *
64
+ * Meshes are here defined in terms of vertices and three-dimensional objects:
65
+ * tetrahedra and prisms. Optionally lower-dimensional entities can be present:
66
+ * triangles, quadrilaterals and edges. All of these \a entities can have a
67
+ * \a reference: an integer value that can serve as a group identifier. In
68
+ * addition mesh entities can have \a attributes such as "ridge" or "required".
69
+ *
70
+ * Data defined on meshes can be for example functions that are meant for
71
+ * level-set discretization, metric tensors that will govern edge lengths, and
72
+ * vector fields governing lagrangian motion. These data can be scalar, vector,
73
+ * or (symmetric) tensor-valued; and there can be more than one data item
74
+ * associated with a mesh entity. These data are often referred to as \a
75
+ * solutions.
76
+ *
77
+ * Three of the functions here are referred to as "programs", because they
78
+ * perform the tasks for which Mmg is meant: remeshing, level-set discretization
79
+ * and Lagrangian motion. The other functions merely serve to load and save data
80
+ * and to perform pre- and post-processing. These programs actually behave much
81
+ * like independent programs: they send diagnostic output to stdout and in rare
82
+ * cases they may call the exit() function.
83
+ *
84
+ *
85
+ * \htmlonly
86
+ * <h2 class="groupheader">Examples</h2>
87
+ * \endhtmlonly
88
+ *
89
+ * A very simple example code for mesh adaptation with automatic parsing of .mesh files
90
+ * \dontinclude libexamples/mmg3d/adaptation_example0/example0_a/main.c
91
+ * \skipline BEGIN_EXAMPLE
92
+ * \until END_EXAMPLE
93
+ *
94
+ * Mesh adaptation example in which get/set functions are used to provide input to
95
+ * the library and to extract the output mesh.
96
+ * \include libexamples/mmg3d/adaptation_example0/example0_b/main.c
97
+ *
98
+ * Fortran example.
99
+ * \include libexamples/mmg3d/adaptation_example0_fortran/example0_a/main.F90
100
+ *
101
+ * Another Fortran example.
102
+ * \include libexamples/mmg3d/adaptation_example0_fortran/example0_b/main.F90
103
+ *
104
+ * Mesh adaptation example.
105
+ * \include libexamples/mmg3d/adaptation_example1/main.c
106
+ *
107
+ * Another mesh adaptation example.
108
+ * \include libexamples/mmg3d/adaptation_example2/main.c
109
+ *
110
+ * Isosurface discretization example (with metric)
111
+ * \include libexamples/mmg3d/IsosurfDiscretization_lsAndMetric/main.c
112
+ *
113
+ * Lagrangian motion example.
114
+ * \include libexamples/mmg3d/LagrangianMotion_example0/main.c
115
+ */
116
+
117
+ #ifndef MMG3DLIB_H
118
+ #define MMG3DLIB_H
119
+
120
+ #ifdef __cplusplus
121
+ extern "C" {
122
+ #endif
123
+
124
+ #include "mmg/common/libmmgtypes.h"
125
+ #include "mmg/mmg3d/mmg3d_export.h"
126
+
127
+ /**
128
+ * Maximum array size when storing adjacent vertices (or ball) of a vertex.
129
+ */
130
+ #define MMG3D_LMAX 10240
131
+
132
+ /**
133
+ * \enum MMG3D_Param
134
+ * \brief Input parameters for the mmg library.
135
+ *
136
+ * These are the input parameters for the mmg3d library functions. Options prefixed by
137
+ * \a MMG3D_IPARAM require integer values and options prefixed by
138
+ * \a MMG3D_DPARAM require real values. They can be set with the
139
+ * \ref MMG3D_Set_iparameter and \ref MMG3D_Set_dparameter functions,
140
+ * respectively.
141
+ *
142
+ */
143
+ enum MMG3D_Param {
144
+ MMG3D_IPARAM_verbose, /*!< [-1..10], Level of verbosity */
145
+ MMG3D_IPARAM_mem, /*!< [n/-1], Max memory size in MB or keep the default value */
146
+ MMG3D_IPARAM_debug, /*!< [1/0], Turn on/off debug mode */
147
+ MMG3D_IPARAM_angle, /*!< [1/0], Turn on/off angle detection */
148
+ MMG3D_IPARAM_iso, /*!< [1/0], Enable level-set discretization (volume and surfaces) */
149
+ MMG3D_IPARAM_isosurf, /*!< [1/0], Enable level-set discretization on the surfaces only */
150
+ MMG3D_IPARAM_nofem, /*!< [1/0], Do not attempt to make the mesh suitable for finite-element computations */
151
+ MMG3D_IPARAM_opnbdy, /*!< [1/0], Preserve triangles at interface of 2 domains with the same reference */
152
+ MMG3D_IPARAM_lag, /*!< [-1/0/1/2], Enable Lagrangian motion */
153
+ MMG3D_IPARAM_optim, /*!< [1/0], Optimize mesh keeping its initial edge sizes */
154
+ MMG3D_IPARAM_optimLES, /*!< [1/0], Strong mesh optimization for LES computations */
155
+ MMG3D_IPARAM_noinsert, /*!< [1/0], Avoid/allow vertex insertion */
156
+ MMG3D_IPARAM_noswap, /*!< [1/0], Avoid/allow edge or face flipping */
157
+ MMG3D_IPARAM_nomove, /*!< [1/0], Avoid/allow vertex relocation */
158
+ MMG3D_IPARAM_nosurf, /*!< [1/0], Avoid/allow surface modifications */
159
+ MMG3D_IPARAM_nreg, /*!< [0/1], Enable regularization of normals */
160
+ MMG3D_IPARAM_xreg, /*!< [0/1], Enable boundary regularization by moving vertices */
161
+ MMG3D_IPARAM_numberOfLocalParam, /*!< [n], Number of local parameters (which will be set with \ref MMG3D_Set_localParameter) */
162
+ MMG3D_IPARAM_numberOfLSBaseReferences, /*!< [n], Number of base references for bubble removal (requires \ref MMG3D_DPARAM_rmc) */
163
+ MMG3D_IPARAM_numberOfMat, /*!< [n], Number of materials in level-set mode */
164
+ MMG3D_IPARAM_numsubdomain, /*!< [0/n], Save only the subdomain (reference) n (0==all subdomains) */
165
+ MMG3D_IPARAM_renum, /*!< [1/0], Turn on/off renumbering with Scotch */
166
+ MMG3D_IPARAM_anisosize, /*!< [1/0], Turn on/off anisotropic metric creation when no metric is provided */
167
+ MMG3D_IPARAM_octree, /*!< [n], Max number of vertices per PROctree cell (DELAUNAY) */
168
+ MMG3D_IPARAM_nosizreq, /*!< [0/1], Allow/avoid overwriting of sizes at required vertices (advanced usage) */
169
+ MMG3D_IPARAM_isoref, /*!< [0/n], Isosurface boundary material reference */
170
+ MMG3D_DPARAM_angleDetection, /*!< [val], Value for angle detection (degrees) */
171
+ MMG3D_DPARAM_hmin, /*!< [val], Minimal edge length */
172
+ MMG3D_DPARAM_hmax, /*!< [val], Maximal edge length */
173
+ MMG3D_DPARAM_hsiz, /*!< [val], Constant edge length */
174
+ MMG3D_DPARAM_hausd, /*!< [val], Global Hausdorff distance (on all boundaries in the mesh) */
175
+ MMG3D_DPARAM_hgrad, /*!< [val], Gradation */
176
+ MMG3D_DPARAM_hgradreq, /*!< [val], Gradation on required entites (advanced usage) */
177
+ MMG3D_DPARAM_ls, /*!< [val], Function value where the level set is to be discretized */
178
+ MMG3D_DPARAM_xreg, /*!< [val], Relaxation parameter for boundary regularization (0<val<1) */
179
+ MMG3D_DPARAM_rmc, /*!< [-1/val], Remove small disconnected components in level-set mode */
180
+ MMG3D_PARAM_size, /*!< [n], Number of parameters */
181
+ };
182
+
183
+ /*--------------------------- function headers ---------------------------*/
184
+ /* Initialization functions */
185
+ /* init structures */
186
+ /**
187
+ * \brief Initialize a mesh structure and optionally the associated solution and metric structures.
188
+ *
189
+ * \param starter dummy argument used to initialize the variadic argument
190
+ * list
191
+ * \param ... variadic arguments that depend on the library function that you
192
+ * want to call.
193
+ *
194
+ * For the MMG3D_mmg3dlib function, you need
195
+ * to call the \ref MMG3D_Init_mesh function with the following arguments :
196
+ * MMG3D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppMet
197
+ * MMG5_ARG_ppMet, &your_metric,MMG5_ARG_end).
198
+ *
199
+ * For the MMG3D_mmg3dls function, you need
200
+ * to call the \ref MMG3D_Init_mesh function with the following arguments :
201
+ * MMG3D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppLs,
202
+ * &your_level_set,MMG5_ARG_end).
203
+ *
204
+ * For the MMG3D_mmg3dmov function, you must call
205
+ * : MMG3D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh,
206
+ * MMG5_ARG_ppMet,&empty_metric,MMG5_ARG_ppDisp, &your_displacement,
207
+ * MMG5_ARG_end).
208
+ *
209
+ * Here, \a your_mesh is a \ref MMG5_pMesh, \a your_metric \a your_level_set and
210
+ * \a your_displacement are \ref MMG5_pSol.
211
+ *
212
+ * \return 1 on success, 0 on failure
213
+ *
214
+ * This function allocates and initializes MMG structures. All structures of
215
+ * types MMG5_pMesh and MMG5_pSol that will be given as arguments to Mmg
216
+ * functions must be initialized with this function.
217
+ *
218
+ * \remark No fortran interface to allow variadic arguments.
219
+ *
220
+ * \warning detected bugs:
221
+ * - some vertices along open boundaries end up with a normal (while they should not)
222
+ *
223
+ */
224
+ LIBMMG3D_EXPORT int MMG3D_Init_mesh(const int starter,...);
225
+
226
+ /**
227
+ * \param mesh pointer to the mesh structure.
228
+ * \param sol pointer to the sol structure.
229
+ *
230
+ * \brief Initialize file names to their default values.
231
+ *
232
+ * This function initializes all file names to their default values.
233
+ *
234
+ * \remark Fortran interface:
235
+ * > SUBROUTINE MMG3D_INIT_FILENAMES(mesh,sol)\n
236
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol\n
237
+ * > END SUBROUTINE\n
238
+ *
239
+ */
240
+ LIBMMG3D_EXPORT void MMG3D_Init_fileNames(MMG5_pMesh mesh, MMG5_pSol sol);
241
+
242
+ /**
243
+ * \brief Initialize parameters to their default values
244
+ *
245
+ * \param mesh pointer to the mesh structure.
246
+ *
247
+ * Initialization of the input parameters (stored in the Info structure).
248
+ *
249
+ * \remark Fortran interface:
250
+ * > SUBROUTINE MMG3D_INIT_PARAMETERS(mesh)\n
251
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
252
+ * > END SUBROUTINE\n
253
+ *
254
+ */
255
+ LIBMMG3D_EXPORT void MMG3D_Init_parameters(MMG5_pMesh mesh);
256
+
257
+ /* init file names */
258
+ /**
259
+ * \param mesh pointer to the mesh structure.
260
+ * \param meshin input mesh name.
261
+ * \return 1.
262
+ *
263
+ * \brief Set the name of input mesh.
264
+ *
265
+ * \remark Fortran interface:
266
+ * > SUBROUTINE MMG3D_SET_INPUTMESHNAME(mesh,meshin,strlen0,retval)\n
267
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh\n
268
+ * > CHARACTER(LEN=*), INTENT(IN) :: meshin\n
269
+ * > INTEGER, INTENT(IN) :: strlen0\n
270
+ * > INTEGER, INTENT(OUT) :: retval\n
271
+ * > END SUBROUTINE\n
272
+ *
273
+ */
274
+ LIBMMG3D_EXPORT int MMG3D_Set_inputMeshName(MMG5_pMesh mesh,const char* meshin);
275
+
276
+ /**
277
+ * \param mesh pointer to the mesh structure.
278
+ * \param meshout name of the output mesh file.
279
+ * \return 1.
280
+ *
281
+ * \brief Set the name of output mesh file.
282
+ *
283
+ * \remark Fortran interface:
284
+ * > SUBROUTINE MMG3D_SET_OUTPUTMESHNAME(mesh,meshout,strlen0,retval)\n
285
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh\n
286
+ * > CHARACTER(LEN=*), INTENT(IN) :: meshout\n
287
+ * > INTEGER, INTENT(IN) :: strlen0\n
288
+ * > INTEGER, INTENT(OUT) :: retval\n
289
+ * > END SUBROUTINE\n
290
+ *
291
+ */
292
+ LIBMMG3D_EXPORT int MMG3D_Set_outputMeshName(MMG5_pMesh mesh, const char* meshout);
293
+
294
+ /**
295
+ * \param mesh pointer to the mesh structure.
296
+ * \param sol pointer to the sol structure.
297
+ * \param solin name of the input solution file.
298
+ * \return 1.
299
+ *
300
+ * \brief Set the name of input solution file.
301
+ *
302
+ * \remark Fortran interface:
303
+ * > SUBROUTINE MMG3D_SET_INPUTSOLNAME(mesh,sol,solin,strlen0,retval)\n
304
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol\n
305
+ * > CHARACTER(LEN=*), INTENT(IN) :: solin\n
306
+ * > INTEGER, INTENT(IN) :: strlen0\n
307
+ * > INTEGER, INTENT(OUT) :: retval\n
308
+ * > END SUBROUTINE\n
309
+ *
310
+ */
311
+ LIBMMG3D_EXPORT int MMG3D_Set_inputSolName(MMG5_pMesh mesh,MMG5_pSol sol,
312
+ const char* solin);
313
+
314
+ /**
315
+ * \param mesh pointer to the mesh structure.
316
+ * \param sol pointer to the sol structure.
317
+ * \param solout name of the output solution file.
318
+ * \return 0 if failed, 1 otherwise.
319
+ *
320
+ * \brief Set the name of the output solution file.
321
+ *
322
+ * \remark Fortran interface:
323
+ * > SUBROUTINE MMG3D_SET_OUTPUTSOLNAME(mesh,sol,solout,strlen0,retval)\n
324
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol\n
325
+ * > CHARACTER(LEN=*), INTENT(IN) :: solout\n
326
+ * > INTEGER, INTENT(IN) :: strlen0\n
327
+ * > INTEGER, INTENT(OUT) :: retval\n
328
+ * > END SUBROUTINE\n
329
+ *
330
+ */
331
+ LIBMMG3D_EXPORT int MMG3D_Set_outputSolName(MMG5_pMesh mesh,MMG5_pSol sol,
332
+ const char* solout);
333
+
334
+ /**
335
+ * \param mesh pointer to the mesh structure.
336
+ * \param fparamin name of the input parameter file.
337
+ * \return 1.
338
+ *
339
+ * \brief Set the name of the input parameter file.
340
+ *
341
+ * \remark Fortran interface:
342
+ * > SUBROUTINE MMG3D_SET_INPUTPARAMNAME(mesh,fparamin,strlen0,retval)\n
343
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh\n
344
+ * > CHARACTER(LEN=*), INTENT(IN) :: fparamin\n
345
+ * > INTEGER, INTENT(IN) :: strlen0\n
346
+ * > INTEGER, INTENT(OUT) :: retval\n
347
+ * > END SUBROUTINE\n
348
+ *
349
+ */
350
+ LIBMMG3D_EXPORT int MMG3D_Set_inputParamName(MMG5_pMesh mesh, const char* fparamin);
351
+
352
+
353
+ /* init structure sizes */
354
+ /**
355
+ * \brief Initialize a solution field.
356
+ * \param mesh pointer to the mesh structure.
357
+ * \param sol pointer to the sol structure.
358
+ * \param typEntity type of entities on which the solution is defined (vertices, triangles, ...).
359
+ * See \ref MMG5_entities for the defined entity types. Currently only \ref MMG5_Vertex
360
+ * is supported.
361
+ * \param np number of solutions.
362
+ * \param typSol type of solution (scalar, vectorial, ...,
363
+ * see \ref MMG5_type for possible values).
364
+ * \return 0 if failed, 1 otherwise.
365
+ *
366
+ * Initialize a solution field: set dimension, types and number of data.
367
+ * To use to initialize a metric, a level-set or a displacement field.
368
+ *
369
+ * \remark Fortran interface:
370
+ * > SUBROUTINE MMG3D_SET_SOLSIZE(mesh,sol,typEntity,np,typSol,retval)\n
371
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol\n
372
+ * > INTEGER(MMG5F_INT), INTENT(IN):: np\n
373
+ * > INTEGER, INTENT(IN) :: typEntity,typSol\n
374
+ * > INTEGER, INTENT(OUT) :: retval\n
375
+ * > END SUBROUTINE\n
376
+ *
377
+ */
378
+ LIBMMG3D_EXPORT int MMG3D_Set_solSize(MMG5_pMesh mesh, MMG5_pSol sol, int typEntity,
379
+ MMG5_int np, int typSol);
380
+
381
+ /**
382
+ * \brief Initialize an array of solution values defined at vertices
383
+ * \param mesh pointer to the mesh structure.
384
+ * \param sol pointer to an allocatable sol structure.
385
+ * \param nsols number of solutions per entity
386
+ * \param nentities number of vertices
387
+ * \param typSol Array of size nsols listing the type of the solutions
388
+ * (scalar, vectorial, ..., see \ref MMG5_type for possible values).
389
+ * \return 0 if failed, 1 otherwise.
390
+ *
391
+ * Initialize a solution field defined at vertices: set dimension,
392
+ * types and number of data values. (not used by Mmg itself).
393
+ *
394
+ * \remark Fortran interface:
395
+ * > SUBROUTINE MMG3D_SET_SOLSATVERTICESSIZE(mesh,sol,nsols,nentities,typSol,retval)\n
396
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol\n
397
+ * > INTEGER, INTENT(IN) :: nsols\n
398
+ * > INTEGER(MMG5F_INT), INTENT(IN):: nentities\n
399
+ * > INTEGER, INTENT(IN) :: typSol(*)\n
400
+ * > INTEGER, INTENT(OUT) :: retval\n
401
+ * > END SUBROUTINE\n
402
+ *
403
+ */
404
+ LIBMMG3D_EXPORT int MMG3D_Set_solsAtVerticesSize(MMG5_pMesh mesh, MMG5_pSol *sol,int nsols,
405
+ MMG5_int nentities, int *typSol);
406
+
407
+ /**
408
+ * \brief Set the number of vertices, tetrahedra, prisms, triangles, quadrilaterals,
409
+ * and edges of a mesh.
410
+ * \param mesh pointer to the mesh structure.
411
+ * \param np number of vertices.
412
+ * \param ne number of tetrahedra.
413
+ * \param nprism number of prisms.
414
+ * \param nt number of triangles.
415
+ * \param nquad number of quads.
416
+ * \param na number of edges.
417
+ * \return 0 if failed, 1 otherwise.
418
+ *
419
+ * This function sets the number of vertices, tetrahedra, prisms, triangles,
420
+ * quadrilaterals and edges of the mesh and allocates the associated arrays. If
421
+ * called again, it will reset the whole mesh to reallocate it at the new size
422
+ *
423
+ * \remark Fortran interface:
424
+ * > SUBROUTINE MMG3D_SET_MESHSIZE(mesh,np,ne,nprism,nt,nquad,na,retval)\n
425
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
426
+ * > INTEGER(MMG5F_INT) :: np,ne,nprism,nt,nquad,na\n
427
+ * > INTEGER, INTENT(OUT) :: retval\n
428
+ * > END SUBROUTINE\n
429
+ *
430
+ */
431
+ LIBMMG3D_EXPORT int MMG3D_Set_meshSize(MMG5_pMesh mesh,MMG5_int np,MMG5_int ne,MMG5_int nprism,
432
+ MMG5_int nt,MMG5_int nquad,MMG5_int na);
433
+
434
+ /* init structure data */
435
+ /**
436
+ * \brief Set the coordinates of a single vertex.
437
+ * \param mesh pointer to the mesh structure.
438
+ * \param c0 coordinate of the vertex along the first dimension.
439
+ * \param c1 coordinate of the vertex along the second dimension.
440
+ * \param c2 coordinate of the vertex along the third dimension.
441
+ * \param ref vertex reference.
442
+ * \param pos position of the vertex in the mesh.
443
+ * \return 1.
444
+ *
445
+ * This function sets the coordinates of a vertex \a c0, \a c1,\a c2 and reference \a ref
446
+ * at position \a pos in mesh structure (from 1 to nb_vertices included).
447
+ *
448
+ * \remark Fortran interface:
449
+ * > SUBROUTINE MMG3D_SET_VERTEX(mesh,c0,c1,c2,ref,pos,retval)\n
450
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
451
+ * > REAL(KIND=8), INTENT(IN) :: c0,c1,c2\n
452
+ * > INTEGER(MMG5F_INT), INTENT(IN):: ref,pos\n
453
+ * > INTEGER, INTENT(OUT) :: retval\n
454
+ * > END SUBROUTINE\n
455
+ *
456
+ */
457
+ LIBMMG3D_EXPORT int MMG3D_Set_vertex(MMG5_pMesh mesh, double c0, double c1,
458
+ double c2, MMG5_int ref,MMG5_int pos);
459
+
460
+ /**
461
+ * \brief Set all vertex coordinates and references in a mesh structure
462
+ *
463
+ * \param mesh pointer to the mesh structure.
464
+ * \param vertices array of vertex coordinates in the order \f$[x_1, y_1, z_1, x_2, \ldots, z_N]\f$
465
+ * where \f$N\f$ is the number of vertices in the mesh.
466
+ * \param refs array of vertex references.
467
+ * The reference of vertex \f$i\f$ is stored in refs[\f$i-1\f$].
468
+ * \return 1.
469
+ *
470
+ * This function sets the coordinates and references of all vertices in a mesh
471
+ * structure. The number of vertices in the mesh must have been set before.
472
+ *
473
+ * \remark Fortran interface: (commentated in order to allow to pass
474
+ * \%val(0) instead of the refs array)
475
+ *
476
+ * > ! SUBROUTINE MMG3D_SET_VERTICES(mesh,vertices,refs,retval)\n
477
+ * > ! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
478
+ * > ! REAL(KIND=8), INTENT(IN) :: vertices(*)\n
479
+ * > ! INTEGER(MMG5F_INT),INTENT(IN) :: refs(*)\n
480
+ * > ! INTEGER, INTENT(OUT) :: retval\n
481
+ * > ! END SUBROUTINE\n
482
+ *
483
+ */
484
+ LIBMMG3D_EXPORT int MMG3D_Set_vertices(MMG5_pMesh mesh, double *vertices,MMG5_int *refs);
485
+
486
+ /**
487
+ * \brief set a single tetrahedron's vertices
488
+ *
489
+ * \param mesh pointer to the mesh structure.
490
+ * \param v0 first vertex of tetrahedron.
491
+ * \param v1 second vertex of tetrahedron.
492
+ * \param v2 third vertex of tetrahedron.
493
+ * \param v3 fourth vertex of tetrahedron.
494
+ * \param ref tetrahedron reference.
495
+ * \param pos tetrahedron position in the mesh.
496
+ * \return 0 if failed, 1 otherwise.
497
+ *
498
+ * Assign the vertices \a v0, \a v1,\a v2,\a v3 and reference
499
+ * \a ref to the tetrahedron at position \a pos in the mesh structure.
500
+ * \a pos ranges from 1 to nb_tetra included.
501
+ *
502
+ * \remark Fortran interface:
503
+ * > SUBROUTINE MMG3D_SET_TETRAHEDRON(mesh,v0,v1,v2,v3,ref,pos,retval)\n
504
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
505
+ * > INTEGER(MMG5F_INT), INTENT(IN):: v0,v1,v2,v3,pos\n
506
+ * > INTEGER(MMG5F_INT), INTENT(IN):: ref\n
507
+ * > INTEGER, INTENT(OUT) :: retval\n
508
+ * > END SUBROUTINE\n
509
+ *
510
+ */
511
+ LIBMMG3D_EXPORT int MMG3D_Set_tetrahedron(MMG5_pMesh mesh, MMG5_int v0, MMG5_int v1,
512
+ MMG5_int v2, MMG5_int v3, MMG5_int ref, MMG5_int pos);
513
+
514
+ /**
515
+ * \brief Set the vertices and references of all tetrahedra in a mesh structure
516
+ *
517
+ * \param mesh pointer to the mesh structure.
518
+ * \param tetra vertices of the tetras of the mesh given.
519
+ * The vertices of the \f$i^{th}\f$ tetrahedron are given by
520
+ * tetra[(i-1)*4] to tetra[(i-1)*4+3] included.
521
+ * \param refs array of the tetrahedra references.
522
+ * The references of the \f$i^{th}\f$ tetrahedron is given by refs[i-1].
523
+ * \return 0 if failed, 1 otherwise.
524
+ *
525
+ * This function sets the vertices and references of all tetrahedra in a mesh.
526
+ *
527
+ * \remark Fortran interface: (commentated in
528
+ * order to allow to pass \%val(0) instead of the refs array)
529
+ *
530
+ * > ! SUBROUTINE MMG3D_SET_TETRAHEDRA(mesh,tetra,refs,retval)\n
531
+ * > ! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
532
+ * > ! INTEGER(MMG5F_INT), DIMENSION(*), INTENT(IN) :: tetra\n
533
+ * > ! INTEGER(MMG5F_INT), DIMENSION(*), INTENT(IN) :: refs\n
534
+ * > ! INTEGER, INTENT(OUT) :: retval\n
535
+ * > ! END SUBROUTINE\n
536
+ *
537
+ */
538
+ LIBMMG3D_EXPORT int MMG3D_Set_tetrahedra(MMG5_pMesh mesh, MMG5_int *tetra,
539
+ MMG5_int *refs);
540
+
541
+ /**
542
+ * \brief Set the vertices and reference of a single prism in a mesh.
543
+ *
544
+ * \param mesh pointer to the mesh structure.
545
+ * \param v0 first vertex of prism.
546
+ * \param v1 second vertex of prism.
547
+ * \param v2 third vertex of prism.
548
+ * \param v3 fourth vertex of prism.
549
+ * \param v4 fifth vertex of prism.
550
+ * \param v5 sixth vertex of prism.
551
+ * \param ref prism reference.
552
+ * \param pos prism position in the mesh.
553
+ * \return 0 if failed, 1 otherwise.
554
+ *
555
+ * This function sets the six vertices \a v0, \a v1,\a v2,\a v3,\a v4,\a v5 and reference
556
+ * \a ref for the prism at position \a pos in the mesh structure (from 1 to nb_prisms included).
557
+ *
558
+ * \remark Fortran interface:
559
+ * > SUBROUTINE MMG3D_SET_PRISM(mesh,v0,v1,v2,v3,v4,v5,ref,pos,retval)\n
560
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
561
+ * > INTEGER(MMG5F_INT), INTENT(IN):: v0,v1,v2,v3,v4,v5,ref,pos\n
562
+ * > INTEGER, INTENT(OUT) :: retval\n
563
+ * > END SUBROUTINE\n
564
+ *
565
+ */
566
+ LIBMMG3D_EXPORT int MMG3D_Set_prism(MMG5_pMesh mesh, MMG5_int v0, MMG5_int v1,
567
+ MMG5_int v2, MMG5_int v3, MMG5_int v4, MMG5_int v5, MMG5_int ref, MMG5_int pos);
568
+
569
+ /**
570
+ * \brief Set the vertices and references of all prisms in a mesh.
571
+ *
572
+ * \param mesh pointer to the mesh structure.
573
+ * \param prisms vertices of the prisms of the mesh
574
+ * Vertices of the \f$i^{th}\f$ prism are stored in prism[(i-1)*6]
575
+ * to prism[(i-1)*6+5] included.
576
+ * \param refs array of the prisms references.
577
+ * The references of the \f$i^{th}\f$ prism is stored in refs[i-1].
578
+ * \return 0 if failed, 1 otherwise.
579
+ *
580
+ * This function sets the vertices and references of all prisms in a mesh.
581
+ *
582
+ * \remark Fortran interface: (commentated in
583
+ * order to allow to pass \%val(0) instead of the refs array)
584
+ *
585
+ * > ! SUBROUTINE MMG3D_SET_PRISMS(mesh,prisms,refs,retval)\n
586
+ * > ! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
587
+ * > ! INTEGER(MMG5F_INT), DIMENSION(*), INTENT(IN) :: prisms\n
588
+ * > ! INTEGER(MMG5F_INT), DIMENSION(*), INTENT(IN) :: refs\n
589
+ * > ! INTEGER, INTENT(OUT) :: retval\n
590
+ * > ! END SUBROUTINE\n
591
+ *
592
+ */
593
+ LIBMMG3D_EXPORT int MMG3D_Set_prisms(MMG5_pMesh mesh, MMG5_int *prisms,
594
+ MMG5_int *refs);
595
+
596
+ /**
597
+ * \brief Set the vertices and reference of a single triangle in a mesh.
598
+ *
599
+ * \param mesh pointer to the mesh structure.
600
+ * \param v0 first vertex of triangle.
601
+ * \param v1 second vertex of triangle.
602
+ * \param v2 third vertex of triangle.
603
+ * \param ref triangle reference.
604
+ * \param pos triangle position in the mesh.
605
+ * \return 0 if failed, 1 otherwise.
606
+ *
607
+ * This function defines a triangle of vertices \a v0, \a v1, \a v2 and reference \a ref
608
+ * at position \a pos in mesh structure (from 1 to nb_triangle included).
609
+ *
610
+ * \remark Fortran interface:
611
+ * > SUBROUTINE MMG3D_SET_TRIANGLE(mesh,v0,v1,v2,ref,pos,retval)\n
612
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
613
+ * > INTEGER(MMG5F_INT), INTENT(IN) :: v0,v1,v2,ref,pos\n
614
+ * > INTEGER, INTENT(OUT) :: retval\n
615
+ * > END SUBROUTINE\n
616
+ *
617
+ */
618
+ LIBMMG3D_EXPORT int MMG3D_Set_triangle(MMG5_pMesh mesh, MMG5_int v0, MMG5_int v1,
619
+ MMG5_int v2, MMG5_int ref,MMG5_int pos);
620
+
621
+ /**
622
+ * \brief Set the vertices and references of all triangles in a mesh.
623
+ *
624
+ * \param mesh pointer to the mesh structure.
625
+ * \param tria pointer to the array of the tria vertices
626
+ * Vertices of the \f$i^{th}\f$ tria are stored in tria[(i-1)*3]\@3.
627
+ * \param refs pointer to the array of the triangle references.
628
+ * refs[i-1] is the ref of the \f$i^{th}\f$ tria.
629
+ * \return 0 if failed, 1 otherwise.
630
+ *
631
+ * This function sets the vertices and references of all triangles in a mesh.
632
+ *
633
+ * \remark Fortran interface: (commentated in
634
+ * order to allow to pass \%val(0) instead of the refs array)
635
+ *
636
+ * > ! SUBROUTINE MMG3D_SET_TRIANGLES(mesh,tria,refs,retval)\n
637
+ * > ! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
638
+ * > ! INTEGER(MMG5F_INT),DIMENSION(*), INTENT(IN) :: tria\n
639
+ * > ! INTEGER(MMG5F_INT),DIMENSION(*), INTENT(IN) :: refs\n
640
+ * > ! INTEGER, INTENT(OUT) :: retval\n
641
+ * > ! END SUBROUTINE\n
642
+ *
643
+ */
644
+ LIBMMG3D_EXPORT int MMG3D_Set_triangles(MMG5_pMesh mesh, MMG5_int *tria, MMG5_int *refs);
645
+
646
+ /**
647
+ * \brief Set the vertices and reference of a single quadrilateral in a mesh.
648
+ *
649
+ * \param mesh pointer to the mesh structure.
650
+ * \param v0 first vertex of quadrilateral.
651
+ * \param v1 second vertex of quadrilateral.
652
+ * \param v2 third vertex of quadrilateral.
653
+ * \param v3 fourth vertex of quadrilateral.
654
+ * \param ref quadrilateral reference.
655
+ * \param pos quadrilateral position in the mesh.
656
+ * \return 0 if failed, 1 otherwise.
657
+ *
658
+ * Set a quadrilateral of vertices \a v0, \a v1, \a v2, \a v3 and reference \a ref
659
+ * at position \a pos in mesh structure (from 1 to nb_quadrangles included).
660
+ *
661
+ * \remark Fortran interface:
662
+ * > SUBROUTINE MMG3D_SET_QUADRILATERAL(mesh,v0,v1,v2,v3,ref,pos,retval)\n
663
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
664
+ * > INTEGER(MMG5F_INT), INTENT(IN):: v0,v1,v2,v3,ref,pos\n
665
+ * > INTEGER, INTENT(OUT) :: retval\n
666
+ * > END SUBROUTINE\n
667
+ *
668
+ */
669
+ LIBMMG3D_EXPORT int MMG3D_Set_quadrilateral(MMG5_pMesh mesh, MMG5_int v0, MMG5_int v1,
670
+ MMG5_int v2, MMG5_int v3, MMG5_int ref,MMG5_int pos);
671
+
672
+ /**
673
+ * \brief Set the vertices and references of all quadrilaterals in a mesh.
674
+ *
675
+ * \param mesh pointer to the mesh structure.
676
+ * \param quads pointer to the array of the quads vertices
677
+ * Vertices of the \f$i^{th}\f$ quadra are stored in quads[(i-1)*3]\@3.
678
+ * \param refs pointer to the array of the quadrilateral references.
679
+ * refs[i-1] is the ref of the \f$i^{th}\f$ quadra.
680
+ * \return 0 if failed, 1 otherwise.
681
+ *
682
+ * \remark Fortran interface: (commentated in
683
+ * order to allow to pass \%val(0) instead of the refs array)
684
+ *
685
+ * > ! SUBROUTINE MMG3D_SET_QUADRILATERALS(mesh,quads,refs,retval)\n
686
+ * > ! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
687
+ * > ! INTEGER(MMG5F_INT),DIMENSION(*), INTENT(IN) :: quads\n
688
+ * > ! INTEGER(MMG5F_INT),DIMENSION(*), INTENT(IN) :: refs\n
689
+ * > ! INTEGER, INTENT(OUT) :: retval\n
690
+ * > ! END SUBROUTINE\n
691
+ *
692
+ */
693
+ LIBMMG3D_EXPORT int MMG3D_Set_quadrilaterals(MMG5_pMesh mesh, MMG5_int *quads, MMG5_int *refs);
694
+
695
+ /**
696
+ * \brief Set the vertices and reference of a single edge in a mesh.
697
+ *
698
+ * \param mesh pointer to the mesh structure.
699
+ * \param v0 first extremity of the edge.
700
+ * \param v1 second extremity of the edge.
701
+ * \param ref edge reference.
702
+ * \param pos edge position in the mesh.
703
+ * \return 0 if failed, 1 otherwise.
704
+ *
705
+ * Set edges of extremities \a v0, \a v1 and reference \a ref at
706
+ * position \a pos in mesh structure (from 1 to nb_edges included)
707
+ *
708
+ * \remark Fortran interface:
709
+ * > SUBROUTINE MMG3D_SET_EDGE(mesh,v0,v1,ref,pos,retval)\n
710
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
711
+ * > INTEGER(MMG5F_INT), INTENT(IN):: v0,v1,ref,pos\n
712
+ * > INTEGER, INTENT(OUT) :: retval\n
713
+ * > END SUBROUTINE\n
714
+ *
715
+ */
716
+ LIBMMG3D_EXPORT int MMG3D_Set_edge(MMG5_pMesh mesh, MMG5_int v0, MMG5_int v1, MMG5_int ref,MMG5_int pos);
717
+
718
+ /**
719
+ * \brief Assign the "corner" attribute to a vertex.
720
+ *
721
+ * \param mesh pointer to the mesh structure.
722
+ * \param k vertex index.
723
+ * \return 1.
724
+ *
725
+ * Set the "corner" attribute at vertex \a k. This affects how the vertex is
726
+ * treated during remeshing.
727
+ *
728
+ * \remark Fortran interface:
729
+ * > SUBROUTINE MMG3D_SET_CORNER(mesh,k,retval)\n
730
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
731
+ * > INTEGER(MMG5F_INT), INTENT(IN):: k\n
732
+ * > INTEGER, INTENT(OUT) :: retval\n
733
+ * > END SUBROUTINE\n
734
+ *
735
+ */
736
+ LIBMMG3D_EXPORT int MMG3D_Set_corner(MMG5_pMesh mesh, MMG5_int k);
737
+
738
+ /**
739
+ * \brief Remove the "corner" attribute from a vertex.
740
+ *
741
+ * \param mesh pointer to the mesh structure.
742
+ * \param k vertex index.
743
+ * \return 1.
744
+ *
745
+ * Remove corner attribute from vertex \a k (from 1 to the number of vertices included).
746
+ *
747
+ * \remark Fortran interface
748
+ *
749
+ * > SUBROUTINE MMG3D_UNSET_CORNER(mesh,k,retval)\n
750
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
751
+ * > INTEGER(MMG5F_INT), INTENT(IN):: k\n
752
+ * > INTEGER, INTENT(OUT) :: retval\n
753
+ * > END SUBROUTINE\n
754
+ *
755
+ */
756
+ LIBMMG3D_EXPORT int MMG3D_Unset_corner(MMG5_pMesh mesh, MMG5_int k);
757
+
758
+ /**
759
+ * \brief Assign the "required" attribute to a vertex.
760
+ *
761
+ * \param mesh pointer to the mesh structure.
762
+ * \param k vertex index.
763
+ * \return 1.
764
+ *
765
+ * Set vertex \a k as required (\a k from 1 to nb_vertices included). This
766
+ * prevents the remesher from moving the vertex.
767
+ *
768
+ * \remark Fortran interface:
769
+ * > SUBROUTINE MMG3D_SET_REQUIREDVERTEX(mesh,k,retval)\n
770
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
771
+ * > INTEGER(MMG5F_INT), INTENT(IN):: k\n
772
+ * > INTEGER, INTENT(OUT) :: retval\n
773
+ * > END SUBROUTINE\n
774
+ *
775
+ */
776
+ LIBMMG3D_EXPORT int MMG3D_Set_requiredVertex(MMG5_pMesh mesh, MMG5_int k);
777
+
778
+ /**
779
+ * \brief Remove required attribute from a vertex.
780
+ *
781
+ * \param mesh pointer to the mesh structure.
782
+ * \param k vertex index.
783
+ * \return 1.
784
+ *
785
+ * This function removes the required attribute from vertex \a k.
786
+ *
787
+ * \remark Fortran interface:
788
+ * > SUBROUTINE MMG3D_UNSET_REQUIREDVERTEX(mesh,k,retval)\n
789
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
790
+ * > INTEGER(MMG5F_INT), INTENT(IN):: k\n
791
+ * > INTEGER, INTENT(OUT) :: retval\n
792
+ * > END SUBROUTINE\n
793
+ *
794
+ */
795
+ LIBMMG3D_EXPORT int MMG3D_Unset_requiredVertex(MMG5_pMesh mesh, MMG5_int k);
796
+
797
+ /**
798
+ * \brief Assign the "required" attribute to a tetrahedron.
799
+ *
800
+ * \param mesh pointer to the mesh structure.
801
+ * \param k element index.
802
+ * \return 1.
803
+ *
804
+ * Set element \a k as required (\a k from 1 to nb_tetra included).
805
+ *
806
+ * \remark Fortran interface:
807
+ * > SUBROUTINE MMG3D_SET_REQUIREDTETRAHEDRON(mesh,k,retval)\n
808
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
809
+ * > INTEGER(MMG5F_INT), INTENT(IN):: k\n
810
+ * > INTEGER, INTENT(OUT) :: retval\n
811
+ * > END SUBROUTINE\n
812
+ *
813
+ */
814
+ LIBMMG3D_EXPORT int MMG3D_Set_requiredTetrahedron(MMG5_pMesh mesh, MMG5_int k);
815
+
816
+ /**
817
+ * \brief Remove the "required" attribute from a tetrahedron.
818
+ *
819
+ * \param mesh pointer to the mesh structure.
820
+ * \param k element index.
821
+ * \return 1.
822
+ *
823
+ * Remove required attribute from element \a k (\a k from 1 to
824
+ * nb_tetra included).
825
+ *
826
+ * \remark Fortran interface:
827
+ * > SUBROUTINE MMG3D_UNSET_REQUIREDTETRAHEDRON(mesh,k,retval)\n
828
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
829
+ * > INTEGER(MMG5F_INT), INTENT(IN):: k\n
830
+ * > INTEGER, INTENT(OUT) :: retval\n
831
+ * > END SUBROUTINE\n
832
+ *
833
+ */
834
+ LIBMMG3D_EXPORT int MMG3D_Unset_requiredTetrahedron(MMG5_pMesh mesh, MMG5_int k);
835
+
836
+ /**
837
+ * \brief Assign the "required" attribute to multiple tetrahedra.
838
+ *
839
+ * \param mesh pointer to the mesh structure.
840
+ * \param reqIdx array of the indices of the required elements.
841
+ * \param nreq number of required elements
842
+ * \return 1.
843
+ *
844
+ * Determine which tetrahedra have the "required" attribute.
845
+ *
846
+ * \remark Fortran interface:
847
+ * > SUBROUTINE MMG3D_SET_REQUIREDTETRAHEDRA(mesh,reqIdx,nreq,retval)\n
848
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
849
+ * > INTEGER(MMG5F_INT), DIMENSION(*),INTENT(IN) :: reqIdx\n
850
+ * > INTEGER(MMG5F_INT), INTENT(IN) :: nreq\n
851
+ * > INTEGER, INTENT(OUT) :: retval\n
852
+ * > END SUBROUTINE\n
853
+ *
854
+ */
855
+ LIBMMG3D_EXPORT int MMG3D_Set_requiredTetrahedra(MMG5_pMesh mesh, MMG5_int *reqIdx, MMG5_int nreq);
856
+
857
+ /**
858
+ * \brief Remove the "required" attribute from multiple tetrahedra.
859
+ *
860
+ * \param mesh pointer to the mesh structure.
861
+ * \param reqIdx array of the indices of the required elements.
862
+ * \param nreq number of required elements
863
+ * \return 1.
864
+ *
865
+ * Remove required attribute from a list of Tetra whose indices are contained in
866
+ * array \a reqIdx.
867
+ *
868
+ * \remark Fortran interface:
869
+ * > SUBROUTINE MMG3D_UNSET_REQUIREDTETRAHEDRA(mesh,reqIdx,nreq,retval)\n
870
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
871
+ * > INTEGER(MMG5F_INT), DIMENSION(*),INTENT(IN) :: reqIdx\n
872
+ * > INTEGER(MMG5F_INT), INTENT(IN) :: nreq\n
873
+ * > INTEGER, INTENT(OUT) :: retval\n
874
+ * > END SUBROUTINE\n
875
+ *
876
+ */
877
+ LIBMMG3D_EXPORT int MMG3D_Unset_requiredTetrahedra(MMG5_pMesh mesh, MMG5_int *reqIdx, MMG5_int nreq);
878
+
879
+ /**
880
+ * \brief Assign the "required" attribute to a single triangle.
881
+ *
882
+ * \param mesh pointer to the mesh structure.
883
+ * \param k triangle index.
884
+ * \return 1.
885
+ *
886
+ * Set triangle \a k as required (\a k from 1 to nb_tria included).
887
+ *
888
+ * \remark Fortran interface:
889
+ * > SUBROUTINE MMG3D_SET_REQUIREDTRIANGLE(mesh,k,retval)\n
890
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
891
+ * > INTEGER(MMG5F_INT), INTENT(IN):: k\n
892
+ * > INTEGER, INTENT(OUT) :: retval\n
893
+ * > END SUBROUTINE\n
894
+ *
895
+ */
896
+ LIBMMG3D_EXPORT int MMG3D_Set_requiredTriangle(MMG5_pMesh mesh, MMG5_int k);
897
+
898
+ /**
899
+ * \brief Remove the "required" attribute from a single triangle.
900
+ *
901
+ * \param mesh pointer to the mesh structure.
902
+ * \param k triangle index.
903
+ * \return 1.
904
+ *
905
+ * Remove required attribute from triangle \a k.
906
+ *
907
+ * \remark Fortran interface:
908
+ * > SUBROUTINE MMG3D_UNSET_REQUIREDTRIANGLE(mesh,k,retval)\n
909
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
910
+ * > INTEGER(MMG5F_INT), INTENT(IN):: k\n
911
+ * > INTEGER, INTENT(OUT) :: retval\n
912
+ * > END SUBROUTINE\n
913
+ *
914
+ */
915
+ LIBMMG3D_EXPORT int MMG3D_Unset_requiredTriangle(MMG5_pMesh mesh, MMG5_int k);
916
+
917
+ /**
918
+ * \brief Assign the "required" attribute to multiple triangles.
919
+ *
920
+ * \param mesh pointer to the mesh structure.
921
+ * \param reqIdx array of the indices of the required triangles.
922
+ * \param nreq number of required triangles
923
+ * \return 1.
924
+ *
925
+ * \remark Fortran interface:
926
+ * > SUBROUTINE MMG3D_SET_REQUIREDTRIANGLES(mesh,reqIdx,nreq,retval)\n
927
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
928
+ * > INTEGER(MMG5F_INT), DIMENSION(*),INTENT(IN) :: reqIdx\n
929
+ * > INTEGER(MMG5F_INT), INTENT(IN) :: nreq\n
930
+ * > INTEGER, INTENT(OUT) :: retval\n
931
+ * > END SUBROUTINE\n
932
+ *
933
+ */
934
+ LIBMMG3D_EXPORT int MMG3D_Set_requiredTriangles(MMG5_pMesh mesh, MMG5_int *reqIdx, MMG5_int nreq);
935
+
936
+ /**
937
+ * \brief Remove the "required" attribute from multiple triangles.
938
+ *
939
+ * \param mesh pointer to the mesh structure.
940
+ * \param reqIdx array of the indices of the required trias.
941
+ * \param nreq number of required trias
942
+ * \return 1.
943
+ *
944
+ * \remark Fortran interface:
945
+ * > SUBROUTINE MMG3D_UNSET_REQUIREDTRIANGLES(mesh,reqIdx,nreq,retval)\n
946
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
947
+ * > INTEGER(MMG5F_INT), DIMENSION(*),INTENT(IN) :: reqIdx\n
948
+ * > INTEGER(MMG5F_INT), INTENT(IN) :: nreq\n
949
+ * > INTEGER, INTENT(OUT) :: retval\n
950
+ * > END SUBROUTINE\n
951
+ *
952
+ */
953
+ LIBMMG3D_EXPORT int MMG3D_Unset_requiredTriangles(MMG5_pMesh mesh, MMG5_int *reqIdx, MMG5_int nreq);
954
+
955
+ /**
956
+ * \brief Assign the "parallel" attribute to a single triangle.
957
+ *
958
+ * \param mesh pointer to the mesh structure.
959
+ * \param k triangle index.
960
+ * \return 1.
961
+ *
962
+ * Set triangle \a k as parallel (triangle at the interface between two
963
+ * processors, ie, this triangle is required). (\a k from 1 to nb_tria included).
964
+ *
965
+ * \remark Fortran interface:
966
+ * > SUBROUTINE MMG3D_SET_PARALLELTRIANGLE(mesh,k,retval)\n
967
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
968
+ * > INTEGER(MMG5F_INT), INTENT(IN):: k\n
969
+ * > INTEGER, INTENT(OUT) :: retval\n
970
+ * > END SUBROUTINE\n
971
+ *
972
+ */
973
+ LIBMMG3D_EXPORT int MMG3D_Set_parallelTriangle(MMG5_pMesh mesh, MMG5_int k);
974
+
975
+ /**
976
+ * \brief Remove the "parallel" attribute from a single triangle.
977
+ *
978
+ * \param mesh pointer to the mesh structure.
979
+ * \param k triangle index.
980
+ * \return 1.
981
+ *
982
+ * Remove parallel attribute from triangle \a k (i.e. triangles aren't preserved
983
+ * anymore). (\a k from 1 to nb_tria included).
984
+ *
985
+ * \remark Fortran interface:
986
+ * > SUBROUTINE MMG3D_UNSET_PARALLELTRIANGLE(mesh,k,retval)\n
987
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
988
+ * > INTEGER(MMG5F_INT), INTENT(IN):: k\n
989
+ * > INTEGER, INTENT(OUT) :: retval\n
990
+ * > END SUBROUTINE\n
991
+ *
992
+ */
993
+ LIBMMG3D_EXPORT int MMG3D_Unset_parallelTriangle(MMG5_pMesh mesh, MMG5_int k);
994
+
995
+ /**
996
+ * \brief Assign the "parallel" attribute to multiple triangles.
997
+ *
998
+ * \param mesh pointer to the mesh structure
999
+ * \param parIdx array of indices of triangles
1000
+ * \param npar number of triangles
1001
+ * \return 1.
1002
+ *
1003
+ * Set the parallel triangles (triangles at the interface between processors, i.e.
1004
+ * these triangles are required).
1005
+ *
1006
+ * \remark Fortran interface:
1007
+ * > SUBROUTINE MMG3D_SET_PARALLELTRIANGLES(mesh,parIdx,npar,retval)\n
1008
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
1009
+ * > INTEGER(MMG5F_INT), DIMENSION(*),INTENT(IN) :: parIdx\n
1010
+ * > INTEGER(MMG5F_INT), INTENT(IN) :: npar\n
1011
+ * > INTEGER, INTENT(OUT) :: retval\n
1012
+ * > END SUBROUTINE\n
1013
+ *
1014
+ */
1015
+ LIBMMG3D_EXPORT int MMG3D_Set_parallelTriangles(MMG5_pMesh mesh, MMG5_int *parIdx, MMG5_int npar);
1016
+
1017
+ /**
1018
+ * \brief Remove the "parallel" attribute from multiple triangles.
1019
+ *
1020
+ * \param mesh pointer to the mesh structure.
1021
+ * \param parIdx array of the indices of triangles
1022
+ * \param npar number of triangles
1023
+ * \return 1.
1024
+ *
1025
+ * Remove parallel attributes from triangles (i.e.
1026
+ * triangles aren't preserved anymore).
1027
+ *
1028
+ * \remark Fortran interface:
1029
+ * > SUBROUTINE MMG3D_UNSET_PARALLELTRIANGLES(mesh,parIdx,npar,retval)\n
1030
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
1031
+ * > INTEGER(MMG5F_INT), DIMENSION(*),INTENT(IN) :: parIdx\n
1032
+ * > INTEGER(MMG5F_INT), INTENT(IN) :: npar\n
1033
+ * > INTEGER, INTENT(OUT) :: retval\n
1034
+ * > END SUBROUTINE\n
1035
+ *
1036
+ */
1037
+ LIBMMG3D_EXPORT int MMG3D_Unset_parallelTriangles(MMG5_pMesh mesh, MMG5_int *parIdx, MMG5_int npar);
1038
+
1039
+ /**
1040
+ * \brief Assign the "ridge" attribute to a single edge.
1041
+ *
1042
+ * \param mesh pointer to the mesh structure.
1043
+ * \param k edge index.
1044
+ * \return 1.
1045
+ *
1046
+ * Set the "ridge" attribute at edge \a k. This affects how the remesher treats
1047
+ * the edge and the adjacent triangles or tetrahedra.
1048
+ *
1049
+ * \remark Fortran interface:
1050
+ * > SUBROUTINE MMG3D_SET_RIDGE(mesh,k,retval)\n
1051
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
1052
+ * > INTEGER(MMG5F_INT), INTENT(IN):: k\n
1053
+ * > INTEGER, INTENT(OUT) :: retval\n
1054
+ * > END SUBROUTINE\n
1055
+ *
1056
+ */
1057
+ LIBMMG3D_EXPORT int MMG3D_Set_ridge(MMG5_pMesh mesh, MMG5_int k);
1058
+
1059
+ /**
1060
+ * \brief Remove the "ridge" attribute from a single edge.
1061
+ *
1062
+ * \param mesh pointer to the mesh structure.
1063
+ * \param k edge index.
1064
+ * \return 1.
1065
+ *
1066
+ * Remove ridge attribute at edge \a k.
1067
+ *
1068
+ * \remark Fortran interface:
1069
+ * > SUBROUTINE MMG3D_UNSET_RIDGE(mesh,k,retval)\n
1070
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
1071
+ * > INTEGER(MMG5F_INT), INTENT(IN):: k\n
1072
+ * > INTEGER, INTENT(OUT) :: retval\n
1073
+ * > END SUBROUTINE\n
1074
+ *
1075
+ */
1076
+ LIBMMG3D_EXPORT int MMG3D_Unset_ridge(MMG5_pMesh mesh, MMG5_int k);
1077
+
1078
+ /**
1079
+ * \brief Assign the "required" attribute to a single edge.
1080
+ *
1081
+ * \param mesh pointer to the mesh structure.
1082
+ * \param k edge index.
1083
+ * \return 1.
1084
+ *
1085
+ * Set edge \a k as required.
1086
+ *
1087
+ * \remark Fortran interface:
1088
+ * > SUBROUTINE MMG3D_SET_REQUIREDEDGE(mesh,k,retval)\n
1089
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
1090
+ * > INTEGER(MMG5F_INT), INTENT(IN):: k\n
1091
+ * > INTEGER, INTENT(OUT) :: retval\n
1092
+ * > END SUBROUTINE\n
1093
+ *
1094
+ */
1095
+ LIBMMG3D_EXPORT int MMG3D_Set_requiredEdge(MMG5_pMesh mesh, MMG5_int k);
1096
+
1097
+ /**
1098
+ * \brief Remove the "required" attribute from a single edge.
1099
+ *
1100
+ * \param mesh pointer to the mesh structure.
1101
+ * \param k edge index.
1102
+ * \return 1.
1103
+ *
1104
+ * Remove required attribute from edge \a k.
1105
+ *
1106
+ * \remark Fortran interface:
1107
+ * > SUBROUTINE MMG3D_UNSET_REQUIREDEDGE(mesh,k,retval)\n
1108
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
1109
+ * > INTEGER(MMG5F_INT), INTENT(IN):: k\n
1110
+ * > INTEGER, INTENT(OUT) :: retval\n
1111
+ * > END SUBROUTINE\n
1112
+ *
1113
+ */
1114
+ LIBMMG3D_EXPORT int MMG3D_Unset_requiredEdge(MMG5_pMesh mesh, MMG5_int k);
1115
+
1116
+ /**
1117
+ * \brief Set the normal orientation at a single vertex.
1118
+ *
1119
+ * \param mesh pointer to the mesh structure.
1120
+ * \param k vertex index
1121
+ * \param n0 x componant of the normal at vertex \a k.
1122
+ * \param n1 y componant of the normal at vertex \a k.
1123
+ * \param n2 z componant of the normal at vertex \a k.
1124
+ *
1125
+ * \return 1 if success.
1126
+ *
1127
+ * Set normal (n0,n1,n2) at vertex \a k.
1128
+ *
1129
+ * \remark Fortran interface:
1130
+ * > SUBROUTINE MMG3D_SET_NORMALATVERTEX(mesh,k,n0,n1,n2,retval)\n
1131
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
1132
+ * > INTEGER(MMG5F_INT), INTENT(IN):: k\n
1133
+ * > REAL(KIND=8), INTENT(IN) :: n0,n1,n2\n
1134
+ * > INTEGER, INTENT(OUT) :: retval\n
1135
+ * > END SUBROUTINE\n
1136
+ *
1137
+ */
1138
+ LIBMMG3D_EXPORT int MMG3D_Set_normalAtVertex(MMG5_pMesh mesh, MMG5_int k, double n0, double n1,
1139
+ double n2) ;
1140
+
1141
+ /**
1142
+ * \brief Set a single element of a scalar solution structure.
1143
+ *
1144
+ * \param met pointer to the sol structure.
1145
+ * \param s solution scalar value.
1146
+ * \param pos position of the solution in the mesh.
1147
+ * \return 0 if failed, 1 otherwise.
1148
+ *
1149
+ * Set scalar value \a s at position \a pos in solution structure
1150
+ * (pos from 1 to nb_vertices included).
1151
+ *
1152
+ * \remark Fortran interface:
1153
+ * > SUBROUTINE MMG3D_SET_SCALARSOL(met,s,pos,retval)\n
1154
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: met\n
1155
+ * > REAL(KIND=8), INTENT(IN) :: s\n
1156
+ * > INTEGER(MMG5F_INT), INTENT(IN):: pos\n
1157
+ * > INTEGER, INTENT(OUT) :: retval\n
1158
+ * > END SUBROUTINE\n
1159
+ *
1160
+ */
1161
+ LIBMMG3D_EXPORT int MMG3D_Set_scalarSol(MMG5_pSol met, double s,MMG5_int pos);
1162
+
1163
+ /**
1164
+ * \brief Set the values of all elements of a scalar solution structure.
1165
+ *
1166
+ * \param met pointer to the sol structure.
1167
+ * \param s array of the scalar solutions values.
1168
+ * s[i-1] is the solution at vertex i.
1169
+ * \return 0 if failed, 1 otherwise.
1170
+ *
1171
+ * Set scalar solutions at mesh vertices.
1172
+ *
1173
+ * \remark Fortran interface:
1174
+ * > SUBROUTINE MMG3D_SET_SCALARSOLS(met,s,retval)\n
1175
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: met\n
1176
+ * > REAL(KIND=8),DIMENSION(*), INTENT(IN) :: s\n
1177
+ * > INTEGER, INTENT(OUT) :: retval\n
1178
+ * > END SUBROUTINE\n
1179
+ *
1180
+ */
1181
+ LIBMMG3D_EXPORT int MMG3D_Set_scalarSols(MMG5_pSol met, double *s);
1182
+
1183
+ /**
1184
+ * \brief Set a single element of a vector solution structure.
1185
+ *
1186
+ * \param met pointer to the sol structure.
1187
+ * \param vx x value of the vectorial solution.
1188
+ * \param vy y value of the vectorial solution.
1189
+ * \param vz z value of the vectorial solution.
1190
+ * \param pos position of the solution in the mesh (begin to 1).
1191
+ * \return 0 if failed, 1 otherwise.
1192
+ *
1193
+ * Set vectorial value \f$(v_x,v_y,v_z)\f$ at position \a pos in solution
1194
+ * structure. (pos from 1 to nb_vertices included).
1195
+ *
1196
+ * \remark Fortran interface:
1197
+ * > SUBROUTINE MMG3D_SET_VECTORSOL(met,vx,vy,vz,pos,retval)\n
1198
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: met\n
1199
+ * > REAL(KIND=8), INTENT(IN) :: vx,vy,vz\n
1200
+ * > INTEGER(MMG5F_INT), INTENT(IN):: pos\n
1201
+ * > INTEGER, INTENT(OUT) :: retval\n
1202
+ * > END SUBROUTINE\n
1203
+ *
1204
+ */
1205
+ LIBMMG3D_EXPORT int MMG3D_Set_vectorSol(MMG5_pSol met, double vx,double vy, double vz,
1206
+ MMG5_int pos);
1207
+
1208
+ /**
1209
+ * \brief Set all elements of a vector solution structure.
1210
+ *
1211
+ * \param met pointer to the sol structure.
1212
+ * \param sols array of the vectorial solutions
1213
+ * sols[3*(i-1)]\@3 is the solution at vertex i
1214
+ * \return 0 if failed, 1 otherwise.
1215
+ *
1216
+ * Set vectorial solutions at mesh vertices
1217
+ *
1218
+ * \remark Fortran interface:
1219
+ * > SUBROUTINE MMG3D_SET_VECTORSOLS(met,sols,retval)\n
1220
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: met\n
1221
+ * > REAL(KIND=8),DIMENSION(*), INTENT(IN) :: sols\n
1222
+ * > INTEGER, INTENT(OUT) :: retval\n
1223
+ * > END SUBROUTINE\n
1224
+ *
1225
+ */
1226
+ LIBMMG3D_EXPORT int MMG3D_Set_vectorSols(MMG5_pSol met, double *sols);
1227
+
1228
+ /**
1229
+ * \brief Set a single element of a tensor solution structure.
1230
+ *
1231
+ * \param met pointer to the sol structure.
1232
+ * \param m11 value of the tensorial solution at position (1,1) in the tensor
1233
+ * \param m12 value of the tensorial solution at position (1,2) in the tensor
1234
+ * \param m13 value of the tensorial solution at position (1,3) in the tensor
1235
+ * \param m22 value of the tensorial solution at position (2,2) in the tensor
1236
+ * \param m23 value of the tensorial solution at position (2,3) in the tensor
1237
+ * \param m33 value of the tensorial solution at position (3,3) in the tensor
1238
+ * \param pos position of the solution in the mesh (begin to 1).
1239
+ * \return 0 if failed, 1 otherwise.
1240
+ *
1241
+ * Set tensorial values at position \a pos in solution
1242
+ * structure. (pos from 1 to nb_vertices included).
1243
+ *
1244
+ * \remark Fortran interface:
1245
+ * > SUBROUTINE MMG3D_SET_TENSORSOL(met,m11,m12,m13,m22,m23,m33,pos,retval)\n
1246
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: met\n
1247
+ * > REAL(KIND=8), INTENT(IN) :: m11,m12,m13,m22,m23,m33\n
1248
+ * > INTEGER(MMG5F_INT), INTENT(IN):: pos\n
1249
+ * > INTEGER, INTENT(OUT) :: retval\n
1250
+ * > END SUBROUTINE\n
1251
+ *
1252
+ */
1253
+ LIBMMG3D_EXPORT int MMG3D_Set_tensorSol(MMG5_pSol met, double m11,double m12, double m13,
1254
+ double m22,double m23, double m33, MMG5_int pos);
1255
+
1256
+ /**
1257
+ * \brief Set all elements of a tensor solution structure.
1258
+ *
1259
+ * \param met pointer to the sol structure.
1260
+ * \param sols array of the tensorial solutions.
1261
+ * sols[6*(i-1)]\@6 is the solution at vertex i
1262
+ * \return 0 if failed, 1 otherwise.
1263
+ *
1264
+ * Set tensorial values by array.
1265
+ *
1266
+ * \remark Fortran interface:
1267
+ * > SUBROUTINE MMG3D_SET_TENSORSOLS(met,sols,retval)\n
1268
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: met\n
1269
+ * > REAL(KIND=8),DIMENSION(*), INTENT(IN) :: sols\n
1270
+ * > INTEGER, INTENT(OUT) :: retval\n
1271
+ * > END SUBROUTINE\n
1272
+ *
1273
+ */
1274
+ LIBMMG3D_EXPORT int MMG3D_Set_tensorSols(MMG5_pSol met, double *sols);
1275
+
1276
+ /**
1277
+ * \brief Set a single element of one out of multiple solution fields that are defined on vertices.
1278
+ *
1279
+ * \param sol pointer to the array of solutions
1280
+ * \param i position of the solution field that we want to set.
1281
+ * \param s solution(s) at mesh vertex \a pos.
1282
+ * \param pos index of the vertex on which we set the solution.
1283
+ *
1284
+ * \return 0 if failed, 1 otherwise.
1285
+ *
1286
+ * Set values of the solution at the ith field of the solution array and at
1287
+ * position \a pos (\a pos from 1 to \a nb_vertices included and \a i from 1 to \a
1288
+ * nb_sols).
1289
+ *
1290
+ * \remark Fortran interface:
1291
+ * > SUBROUTINE MMG3D_SET_ITHSOL_INSOLSATVERTICES(sol,i,s,pos,retval)\n
1292
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: sol\n
1293
+ * > INTEGER, INTENT(IN) :: i\n
1294
+ * > INTEGER(MMG5F_INT), INTENT(IN) :: pos\n
1295
+ * > REAL(KIND=8), DIMENSION(*),INTENT(OUT) :: s\n
1296
+ * > INTEGER, INTENT(OUT) :: retval\n
1297
+ * > END SUBROUTINE\n
1298
+ *
1299
+ */
1300
+ LIBMMG3D_EXPORT int MMG3D_Set_ithSol_inSolsAtVertices(MMG5_pSol sol,int i, double* s,MMG5_int pos);
1301
+
1302
+ /**
1303
+ * \brief Set all elements of one out of multiple solution fields that are defined on vertices.
1304
+ *
1305
+ * \param sol pointer to the array of solutions
1306
+ * \param i position of the solution field that we want to set.
1307
+ * \param s array of the solutions at mesh vertices. The solution at vertex \a k
1308
+ * is given by s[k-1] for a scalar sol, s[3*(k-1)]\@3 for a vectorial solution
1309
+ * and s[6*(k-1)]\@6 for a tensor solution.
1310
+ *
1311
+ * \return 0 if failed, 1 otherwise.
1312
+ *
1313
+ * Set values of the ith field of the solution array by array (\a i from 1 to \a
1314
+ * nb_sols).
1315
+ *
1316
+ * \remark Fortran interface:
1317
+ * > SUBROUTINE MMG3D_SET_ITHSOLS_INSOLSATVERTICES(sol,i,s,retval)\n
1318
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: sol\n
1319
+ * > INTEGER, INTENT(IN) :: i\n
1320
+ * > REAL(KIND=8), DIMENSION(*),INTENT(OUT) :: s\n
1321
+ * > INTEGER, INTENT(OUT) :: retval\n
1322
+ * > END SUBROUTINE\n
1323
+ *
1324
+ */
1325
+ LIBMMG3D_EXPORT int MMG3D_Set_ithSols_inSolsAtVertices(MMG5_pSol sol,int i, double* s);
1326
+
1327
+ /**
1328
+ * \brief Finish providing mesh data without using the API functions.
1329
+ *
1330
+ * \param mesh pointer to the mesh structure.
1331
+ *
1332
+ * To mark as ended a mesh given without using the API functions (for example,
1333
+ * mesh given by mesh->point[i] = 0 ...). This function performs verifications,
1334
+ * e.g. to make sure that all tetrahedra are consistently oriented.
1335
+ *
1336
+ * \remark Fortran interface:
1337
+ * > SUBROUTINE MMG3D_SET_HANDGIVENMESH(mesh)\n
1338
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
1339
+ * > END SUBROUTINE\n
1340
+ *
1341
+ */
1342
+ LIBMMG3D_EXPORT void MMG3D_Set_handGivenMesh(MMG5_pMesh mesh);
1343
+
1344
+ /* check init */
1345
+ /**
1346
+ * \brief Check if the number of given entities match with mesh and sol size
1347
+ *
1348
+ * \param mesh pointer to the mesh structure.
1349
+ * \param met pointer to the sol structure.
1350
+ * \return 0 if failed, 1 otherwise.
1351
+ *
1352
+ * Check if the number of given entities match with mesh and sol size
1353
+ * (not mandatory) and check mesh datas.
1354
+ *
1355
+ * \remark Fortran interface:
1356
+ * > SUBROUTINE MMG3D_CHK_MESHDATA(mesh,met,retval)\n
1357
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,met\n
1358
+ * > INTEGER, INTENT(OUT) :: retval\n
1359
+ * > END SUBROUTINE\n
1360
+ *
1361
+ */
1362
+ LIBMMG3D_EXPORT int MMG3D_Chk_meshData(MMG5_pMesh mesh, MMG5_pSol met);
1363
+
1364
+ /* functions to set parameters
1365
+ *
1366
+ * NOTE iparam and dparam are int rather than enum MMG3D_Param because
1367
+ * genheader cannot handle enums in function arguments; i.e. the Fortran
1368
+ * API will break.
1369
+ */
1370
+
1371
+ /**
1372
+ * \brief set an integer parameter of the remesher
1373
+ *
1374
+ * \param mesh pointer to the mesh structure.
1375
+ * \param sol pointer to the sol structure (unused).
1376
+ * \param iparam integer parameter to set (see \ref MMG3D_Param for a
1377
+ * list of parameters that can be set).
1378
+ * \param val value for the parameter.
1379
+ * \return 0 if failed, 1 otherwise.
1380
+ *
1381
+ * This function sets the integer parameter \a iparam to value \a val.
1382
+ *
1383
+ * \remark Fortran interface:
1384
+ * > SUBROUTINE MMG3D_SET_IPARAMETER(mesh,sol,iparam,val,retval)\n
1385
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
1386
+ * > MMG5_DATA_PTR_T :: sol\n
1387
+ * > INTEGER, INTENT(IN) :: iparam\n
1388
+ * > INTEGER(MMG5F_INT), INTENT(IN) :: val\n
1389
+ * > INTEGER, INTENT(OUT) :: retval\n
1390
+ * > END SUBROUTINE\n
1391
+ *
1392
+ */
1393
+ LIBMMG3D_EXPORT int MMG3D_Set_iparameter(MMG5_pMesh mesh,MMG5_pSol sol, int iparam,
1394
+ MMG5_int val);
1395
+
1396
+ /**
1397
+ * \brief set a real-valued parameter of the remesher
1398
+ *
1399
+ * \param mesh pointer to the mesh structure.
1400
+ * \param sol pointer to the sol structure (unused).
1401
+ * \param dparam double parameter to set (see \ref MMG3D_Param for a
1402
+ * list of parameters that can be set).
1403
+ * \param val value of the parameter.
1404
+ * \return 0 if failed, 1 otherwise.
1405
+ *
1406
+ * This function sets the double parameter \a dparam to value \a val.
1407
+ *
1408
+ * \remark Fortran interface:
1409
+ * > SUBROUTINE MMG3D_SET_DPARAMETER(mesh,sol,dparam,val,retval)\n
1410
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
1411
+ * > MMG5_DATA_PTR_T :: sol\n
1412
+ * > INTEGER, INTENT(IN) :: dparam\n
1413
+ * > REAL(KIND=8), INTENT(IN) :: val\n
1414
+ * > INTEGER, INTENT(OUT) :: retval\n
1415
+ * > END SUBROUTINE\n
1416
+ *
1417
+ */
1418
+ LIBMMG3D_EXPORT int MMG3D_Set_dparameter(MMG5_pMesh mesh,MMG5_pSol sol, int dparam,
1419
+ double val);
1420
+ /**
1421
+ * \brief set a local parameter
1422
+ *
1423
+ * \param mesh pointer to the mesh structure
1424
+ * \param sol pointer to the sol structure
1425
+ * \param typ type of entity (triangle, edge,...)
1426
+ * \param ref reference of the entity
1427
+ * \param hmin minimal edge size
1428
+ * \param hmax maximal edge size
1429
+ * \param hausd Hausdorff distance
1430
+ * \return 0 if failed, 1 otherwise.
1431
+ *
1432
+ * Set local parameters: set the Hausdorff distance, minimum edge length, and
1433
+ * maximum edge length for all entities of type \a typ and reference \a ref.
1434
+ *
1435
+ * \remark Fortran interface:
1436
+ * > SUBROUTINE MMG3D_SET_LOCALPARAMETER(mesh,sol,typ,ref,& \n
1437
+ * > hmin,hmax,hausd,retval)\n
1438
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol\n
1439
+ * > INTEGER, INTENT(IN) :: typ\n
1440
+ * > INTEGER(MMG5F_INT), INTENT(IN):: ref\n
1441
+ * > REAL(KIND=8), INTENT(IN) :: hmin,hmax,hausd\n
1442
+ * > INTEGER, INTENT(OUT) :: retval\n
1443
+ * > END SUBROUTINE\n
1444
+ *
1445
+ */
1446
+ LIBMMG3D_EXPORT int MMG3D_Set_localParameter(MMG5_pMesh mesh, MMG5_pSol sol, int typ,
1447
+ MMG5_int ref,double hmin,double hmax,double hausd);
1448
+
1449
+ /**
1450
+ * \brief Set the reference mapping for the elements of reference
1451
+ * \a ref in level-set discretization mode.
1452
+ *
1453
+ * \param mesh pointer to the mesh structure
1454
+ * \param sol pointer to the sol structure
1455
+ * \param ref input tetrahedron reference
1456
+ * \param split MMG5_MMAT_NoSplit if the entity must not be splitted, MMG5_MMAT_Split otherwise
1457
+ * \param rmin reference for the negative side after LS discretization
1458
+ * \param rplus reference for the positive side after LS discretization
1459
+ * \return 0 if failed, 1 otherwise.
1460
+ *
1461
+ * \remark Fortran interface:
1462
+ * > SUBROUTINE MMG3D_SET_MULTIMAT(mesh,sol,ref,split,rmin,rplus,retval)\n
1463
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol\n
1464
+ * > INTEGER, INTENT(IN) :: split\n
1465
+ * > INTEGER(MMG5F_INT), INTENT(IN):: ref,rmin,rplus\n
1466
+ * > INTEGER, INTENT(OUT) :: retval\n
1467
+ * > END SUBROUTINE\n
1468
+ *
1469
+ * With this function you can determine which references will be given to the
1470
+ * tetrahedra on both sides of the level set, after discretization. Negative and
1471
+ * positive here refer to volumes where the function is smaller or larger,
1472
+ * respectively, than the isovalue of the level set.
1473
+ */
1474
+ LIBMMG3D_EXPORT int MMG3D_Set_multiMat(MMG5_pMesh mesh, MMG5_pSol sol,MMG5_int ref,int split,
1475
+ MMG5_int rmin, MMG5_int rplus);
1476
+
1477
+ /**
1478
+ * \brief Set a new level-set base reference.
1479
+ *
1480
+ * \param mesh pointer to the mesh structure.
1481
+ * \param sol pointer to the sol structure.
1482
+ * \param br new level-set base reference.
1483
+ * \return 0 if failed, 1 otherwise.
1484
+ *
1485
+ * Set a new level-set base reference of ref \a br in LS discretization
1486
+ * mode. Base references are boundary conditions to which implicit domains can
1487
+ * be attached. All implicit volumes that are not attached to listed base
1488
+ * references are deleted as spurious volumes by the \a rmc option.
1489
+ *
1490
+ * \remark Fortran interface:
1491
+ * > SUBROUTINE MMG3D_SET_LSBASEREFERENCE(mesh,sol,br,retval)\n
1492
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol\n
1493
+ * > INTEGER(MMG5F_INT) :: br\n
1494
+ * > INTEGER, INTENT(OUT) :: retval\n
1495
+ * > END SUBROUTINE\n
1496
+ *
1497
+ */
1498
+ LIBMMG3D_EXPORT int MMG3D_Set_lsBaseReference(MMG5_pMesh mesh, MMG5_pSol sol,MMG5_int br);
1499
+
1500
+
1501
+ /** recover data */
1502
+ /**
1503
+ * \brief Get the number of vertices, tetrahedra, prisms, triangles,
1504
+ * quadrilaterals and edges of the mesh.
1505
+ *
1506
+ * \param mesh pointer to the mesh structure.
1507
+ * \param np pointer to the number of vertices.
1508
+ * \param ne pointer to the number of tetrahedra.
1509
+ * \param nprism pointer to the number of prisms.
1510
+ * \param nt pointer to the number of triangles.
1511
+ * \param nquad pointer to the number of quads.
1512
+ * \param na pointer to the number of edges.
1513
+ * \return 1.
1514
+ *
1515
+ * \remark Fortran interface:
1516
+ * > SUBROUTINE MMG3D_GET_MESHSIZE(mesh,np,ne,nprism,nt,nquad,na,retval)\n
1517
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
1518
+ * > INTEGER(MMG5F_INT) :: np,ne,nprism,nt,nquad,na\n
1519
+ * > INTEGER, INTENT(OUT) :: retval\n
1520
+ * > END SUBROUTINE\n
1521
+ *
1522
+ */
1523
+ LIBMMG3D_EXPORT int MMG3D_Get_meshSize(MMG5_pMesh mesh, MMG5_int* np, MMG5_int* ne,MMG5_int *nprism, MMG5_int* nt,
1524
+ MMG5_int* nquad, MMG5_int* na);
1525
+
1526
+ /**
1527
+ * \brief Get the number of elements, dimension, and type of a solution structure.
1528
+ *
1529
+ * \param mesh pointer to the mesh structure.
1530
+ * \param sol pointer to the sol structure.
1531
+ * \param typEntity pointer to the type of entities to which solutions
1532
+ * are applied (see \ref MMG5_entities for possible values)
1533
+ * \param np pointer to the number of solutions.
1534
+ * \param typSol pointer to the type of the solutions
1535
+ * (scalar, vectorial, ..., see \ref MMG5_type for possible values)
1536
+ * \return 1.
1537
+ *
1538
+ * \remark Fortran interface:
1539
+ * > SUBROUTINE MMG3D_GET_SOLSIZE(mesh,sol,typEntity,np,typSol,retval)\n
1540
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol\n
1541
+ * > INTEGER :: typEntity,typSol\n
1542
+ * > INTEGER(MMG5F_INT) :: np\n
1543
+ * > INTEGER, INTENT(OUT) :: retval\n
1544
+ * > END SUBROUTINE\n
1545
+ *
1546
+ */
1547
+ LIBMMG3D_EXPORT int MMG3D_Get_solSize(MMG5_pMesh mesh, MMG5_pSol sol, int* typEntity,
1548
+ MMG5_int* np,int* typSol);
1549
+
1550
+ /**
1551
+ * \brief Get the number of elements, type, and dimensions of several solutions defined on vertices.
1552
+ *
1553
+ * \param mesh pointer to the mesh structure.
1554
+ * \param sol pointer to an array of sol structure.
1555
+ * \param nsols pointer to the number of solutions per entity.
1556
+ * \param nentities pointer to the number of solutions.
1557
+ * \param typSol array of size MMG5_NSOLS_MAX to store type of each solution
1558
+ * (scalar, vectorial, ..., see \ref MMG5_type for possible values).
1559
+ *
1560
+ * \return 1.
1561
+ *
1562
+ * \remark Fortran interface:
1563
+ * > SUBROUTINE MMG3D_GET_SOLSATVERTICESSIZE(mesh,sol,nsols,nentities,typSol,retval)\n
1564
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol\n
1565
+ * > INTEGER :: nsols\n
1566
+ * > INTEGER(MMG5F_INT) :: nentities\n
1567
+ * > INTEGER :: typSol(*)\n
1568
+ * > INTEGER, INTENT(OUT) :: retval\n
1569
+ * > END SUBROUTINE\n
1570
+ *
1571
+ */
1572
+ LIBMMG3D_EXPORT int MMG3D_Get_solsAtVerticesSize(MMG5_pMesh mesh, MMG5_pSol* sol,int *nsols,
1573
+ MMG5_int* nentities,int* typSol);
1574
+
1575
+ /**
1576
+ * \brief Get the coordinates \a c0, \a c1,\a c2 and reference \a ref of the
1577
+ * next vertex of \a mesh.
1578
+ *
1579
+ * \param mesh pointer to the mesh structure.
1580
+ * \param c0 pointer to the coordinate of the vertex along the first
1581
+ * dimension.
1582
+ * \param c1 pointer to the coordinate of the vertex along the second
1583
+ * dimension.
1584
+ * \param c2 pointer to the coordinate of the vertex along the third
1585
+ * dimension.
1586
+ * \param ref pointer to the vertex reference.
1587
+ * \param isCorner pointer to the flag saying if vertex is corner.
1588
+ * \param isRequired pointer to the flag saying if vertex is required.
1589
+ * \return 1.
1590
+ *
1591
+ * This function retrieves the coordinates \a c0, \a c1,\a c2 and reference \a
1592
+ * ref of the next vertex of a mesh. It is meant to be used in a loop over all
1593
+ * vertices. When this function has been called as many times as there are
1594
+ * vertices, the internal loop counter will be reset. To obtain data for a
1595
+ * specific vertex, the \ref MMG3D_GetByIdx_vertex function can be used instead.
1596
+ *
1597
+ * \remark Fortran interface:
1598
+ * > SUBROUTINE MMG3D_GET_VERTEX(mesh,c0,c1,c2,ref,isCorner,isRequired, &\n
1599
+ * > retval)\n
1600
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
1601
+ * > REAL(KIND=8), INTENT(OUT) :: c0,c1,c2\n
1602
+ * > INTEGER(MMG5F_INT) :: ref\n
1603
+ * > INTEGER :: isCorner,isRequired\n
1604
+ * > INTEGER, INTENT(OUT) :: retval\n
1605
+ * > END SUBROUTINE\n
1606
+ *
1607
+ */
1608
+ LIBMMG3D_EXPORT int MMG3D_Get_vertex(MMG5_pMesh mesh, double* c0, double* c1, double* c2,
1609
+ MMG5_int* ref,int* isCorner, int* isRequired);
1610
+
1611
+ /**
1612
+ * \brief Get the coordinates and reference of a specific vertex in the mesh.
1613
+ *
1614
+ * \param mesh pointer to the mesh structure.
1615
+ * \param c0 pointer to the coordinate of the vertex along the first dimension.
1616
+ * \param c1 pointer to the coordinate of the vertex along the second dimension.
1617
+ * \param c2 pointer to the coordinate of the vertex along the third dimension.
1618
+ * \param ref pointer to the vertex reference.
1619
+ * \param isCorner pointer to the flag saying if vertex is corner.
1620
+ * \param isRequired pointer to the flag saying if vertex is required.
1621
+ * \param idx index of vertex to get.
1622
+ * \return 1.
1623
+ *
1624
+ * Get coordinates \a c0, \a c1, \a c2 and reference \a ref of
1625
+ * vertex \a idx of mesh.
1626
+ *
1627
+ * \remark Fortran interface:
1628
+ * > SUBROUTINE MMG3D_GETBYIDX_VERTEX(mesh,c0,c1,c2,ref,isCorner,isRequired,idx,retval)\n
1629
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
1630
+ * > REAL(KIND=8), INTENT(OUT) :: c0,c1,c2\n
1631
+ * > INTEGER(MMG5F_INT) :: ref,idx\n
1632
+ * > INTEGER :: isCorner,isRequired\n
1633
+ * > INTEGER, INTENT(OUT) :: retval\n
1634
+ * > END SUBROUTINE\n
1635
+ *
1636
+ */
1637
+ LIBMMG3D_EXPORT int MMG3D_GetByIdx_vertex(MMG5_pMesh mesh, double* c0, double* c1, double* c2, MMG5_int* ref,
1638
+ int* isCorner, int* isRequired,MMG5_int idx);
1639
+
1640
+ /**
1641
+ * \brief Get the coordinates and references of all vertices in the mesh.
1642
+ *
1643
+ * \param mesh pointer to the mesh structure.
1644
+ * \param vertices pointer to the array of coordinates.
1645
+ * The coordinates of the \f$i^{th}\f$ vertex are stored in
1646
+ * vertices[(i-1)*3]\@3.
1647
+ * \param refs pointer to the array of the vertex references.
1648
+ * The ref of the \f$i^th\f$ vertex is stored in refs[i-1].
1649
+ * \param areCorners pointer to the array of the flags saying if
1650
+ * vertices are corners.
1651
+ * areCorners[i-1]=1 if the \f$i^{th}\f$ vertex is corner.
1652
+ * \param areRequired pointer to the array of flags saying if vertices
1653
+ * are required. areRequired[i-1]=1 if the \f$i^{th}\f$ vertex is required.
1654
+ * \return 1.
1655
+ *
1656
+ * \remark Fortran interface: (commentated in order to allow to pass \%val(0)
1657
+ * instead of the refs, areCorners or areRequired arrays)
1658
+ *
1659
+ * > ! SUBROUTINE MMG3D_GET_VERTICES(mesh,vertices,refs,areCorners,&\n
1660
+ * > ! areRequired,retval)\n
1661
+ * > ! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
1662
+ * > ! REAL(KIND=8),DIMENSION(*), INTENT(OUT) :: vertices\n
1663
+ * > ! INTEGER(MMG5F_INT), DIMENSION(*) :: refs\n
1664
+ * > ! INTEGER, DIMENSION(*) :: areCorners,areRequired\n
1665
+ * > ! INTEGER, INTENT(OUT) :: retval\n
1666
+ * > ! END SUBROUTINE\n
1667
+ *
1668
+ */
1669
+ LIBMMG3D_EXPORT int MMG3D_Get_vertices(MMG5_pMesh mesh, double* vertices, MMG5_int* refs,
1670
+ int* areCorners, int* areRequired);
1671
+
1672
+ /**
1673
+ * \brief Get the vertices and reference of the next tetrahedron in the mesh.
1674
+ *
1675
+ * \param mesh pointer to the mesh structure.
1676
+ * \param v0 pointer to the first vertex of tetrahedron.
1677
+ * \param v1 pointer to the second vertex of tetrahedron.
1678
+ * \param v2 pointer to the third vertex of tetrahedron.
1679
+ * \param v3 pointer to the fourth vertex of tetrahedron.
1680
+ * \param ref pointer to the tetrahedron reference.
1681
+ * \param isRequired pointer to the flag saying if tetrahedron is
1682
+ * required.
1683
+ * \return 0 if failed, 1 otherwise.
1684
+ *
1685
+ * This function retrieves the vertices \a v0, \a v1, \a v2, \a v3 and reference
1686
+ * \a ref of the next tetrahedron of \a mesh. It is meant to be called in a loop
1687
+ * over all tetrahedra. When it has been called as many times as there are
1688
+ * tetrahedra, the internal loop counter will be reset.
1689
+ *
1690
+ * \remark Fortran interface:
1691
+ * > SUBROUTINE MMG3D_GET_TETRAHEDRON(mesh,v0,v1,v2,v3,ref,isRequired,&\n
1692
+ * > retval)\n
1693
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
1694
+ * > INTEGER(MMG5F_INT), INTENT(OUT):: v0,v1,v2,v3\n
1695
+ * > INTEGER(MMG5F_INT) :: ref\n
1696
+ * > INTEGER :: isRequired\n
1697
+ * > INTEGER, INTENT(OUT) :: retval\n
1698
+ * > END SUBROUTINE\n
1699
+ *
1700
+ */
1701
+ LIBMMG3D_EXPORT int MMG3D_Get_tetrahedron(MMG5_pMesh mesh, MMG5_int* v0, MMG5_int* v1, MMG5_int* v2,
1702
+ MMG5_int* v3,MMG5_int* ref, int* isRequired);
1703
+
1704
+ /**
1705
+ * \brief Get the vertices and reference of all tetrahedra in the mesh.
1706
+ *
1707
+ * \param mesh pointer to the mesh structure.
1708
+ * \param tetra pointer to the array where the vertices are to be stored.
1709
+ * Vertices of the \f$i^{th}\f$ tetra are stored in tetra[(i-1)*4] to tetra[(i-1)*4+3]
1710
+ * \param refs pointer to the array of the tetrahedron references.
1711
+ * References of the \f$i^{th}\f$ tetra is stored in refs[i-1].
1712
+ * \param areRequired pointer to the array of the flags saying if the
1713
+ * tetrahedra are required. areRequired[i-1]=1 if the \f$i^{th}\f$ tetrahedron
1714
+ * is required.
1715
+ * \return 0 if failed, 1 otherwise.
1716
+ *
1717
+ * \remark Fortran interface: (commentated in order to allow to pass \%val(0)
1718
+ * instead of the refs, areCorners or areRequired arrays)
1719
+ *
1720
+ * > ! SUBROUTINE MMG3D_GET_TETRAHEDRA(mesh,tetra,refs,areRequired,&\n
1721
+ * > ! retval)\n
1722
+ * > ! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
1723
+ * > ! INTEGER(MMG5F_INT), DIMENSION(*),INTENT(OUT) :: tetra\n
1724
+ * > ! INTEGER(MMG5F_INT), DIMENSION(*) :: refs\n
1725
+ * > ! INTEGER, DIMENSION(*) :: areRequired\n
1726
+ * > ! INTEGER, INTENT(OUT) :: retval\n
1727
+ * > ! END SUBROUTINE\n
1728
+ *
1729
+ */
1730
+ LIBMMG3D_EXPORT int MMG3D_Get_tetrahedra(MMG5_pMesh mesh, MMG5_int* tetra,MMG5_int* refs,
1731
+ int* areRequired);
1732
+
1733
+ /**
1734
+ * \brief Get the vertices and reference of the next prism in the mesh.
1735
+ *
1736
+ * \param mesh pointer to the mesh structure.
1737
+ * \param v0 pointer to the first vertex of prism.
1738
+ * \param v1 pointer to the second vertex of prism.
1739
+ * \param v2 pointer to the third vertex of prism.
1740
+ * \param v3 pointer to the fourth vertex of prism.
1741
+ * \param v4 pointer to the fifth vertex of prism.
1742
+ * \param v5 pointer to the sixth vertex of prism.
1743
+ * \param ref pointer to the prism reference.
1744
+ * \param isRequired pointer to the flag saying if prism is
1745
+ * required.
1746
+ * \return 0 if failed, 1 otherwise.
1747
+ *
1748
+ * This function retrieves the vertices \a v0, \a v1, \a v2, \a v3, \a v4, \a v5
1749
+ * and reference \a ref of the next prism of \a mesh. It is meant to be called
1750
+ * in a loop over all prisms. When it has been called as many times as there are
1751
+ * prisms, the internal loop counter will be reset.
1752
+ *
1753
+ * \remark Fortran interface:
1754
+ * > SUBROUTINE MMG3D_GET_PRISM(mesh,v0,v1,v2,v3,v4,v5,ref,isRequired,&\n
1755
+ * > retval)\n
1756
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
1757
+ * > INTEGER(MMG5F_INT), INTENT(OUT) :: v0,v1,v2,v3,v4,v5\n
1758
+ * > INTEGER(MMG5F_INT) :: ref\n
1759
+ * > INTEGER :: isRequired\n
1760
+ * > INTEGER, INTENT(OUT) :: retval\n
1761
+ * > END SUBROUTINE\n
1762
+ *
1763
+ */
1764
+ LIBMMG3D_EXPORT int MMG3D_Get_prism(MMG5_pMesh mesh, MMG5_int* v0, MMG5_int* v1, MMG5_int* v2,
1765
+ MMG5_int* v3,MMG5_int* v4,MMG5_int* v5,MMG5_int* ref, int* isRequired);
1766
+
1767
+ /**
1768
+ * \brief Get the vertices and references of all prisms in the mesh.
1769
+ *
1770
+ * \param mesh pointer to the mesh structure.
1771
+ * \param prisms pointer to the array where the vertices are to be stored
1772
+ * Vertices of the \f$i^{th}\f$ prism are stored in prisms[(i-1)*6] to prisms[(i-1)*6+5].
1773
+ * \param refs pointer to the array of the prism references.
1774
+ * The reference of the \f$i^{th}\f$ prism is stored in refs[i-1].
1775
+ * \param areRequired pointer to the array of the flags saying if the
1776
+ * prisms are required. areRequired[i-1]=1 if the \f$i^{th}\f$ prism
1777
+ * is required.
1778
+ * \return 0 if failed, 1 otherwise.
1779
+ *
1780
+ * \remark Fortran interface: (commentated in order to allow to pass \%val(0)
1781
+ * instead of the refs, areCorners or areRequired arrays)
1782
+ *
1783
+ * > ! SUBROUTINE MMG3D_GET_PRISMS(mesh,prisms,refs,areRequired,&\n
1784
+ * > ! retval)\n
1785
+ * > ! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
1786
+ * > ! INTEGER(MMG5F_INT), DIMENSION(*),INTENT(OUT) :: prisms\n
1787
+ * > ! INTEGER(MMG5F_INT), DIMENSION(*) :: refs\n
1788
+ * > ! INTEGER, DIMENSION(*) :: areRequired\n
1789
+ * > ! INTEGER, INTENT(OUT) :: retval\n
1790
+ * > ! END SUBROUTINE\n
1791
+ *
1792
+ */
1793
+ LIBMMG3D_EXPORT int MMG3D_Get_prisms(MMG5_pMesh mesh, MMG5_int* prisms,MMG5_int* refs,
1794
+ int* areRequired);
1795
+
1796
+ /**
1797
+ * \brief Get the vertices and reference of the next triangle in the mesh.
1798
+ *
1799
+ * \param mesh pointer to the mesh structure.
1800
+ * \param v0 pointer to the first vertex of triangle.
1801
+ * \param v1 pointer to the second vertex of triangle.
1802
+ * \param v2 pointer to the third vertex of triangle.
1803
+ * \param ref pointer to the triangle reference.
1804
+ * \param isRequired pointer to the flag saying if triangle is required.
1805
+ * \return 0 if failed, 1 otherwise.
1806
+ *
1807
+ * This function retrieves the vertices \a v0, \a v1, \a v2, and reference \a
1808
+ * ref of the next triangle of \a mesh. It is meant to be called in a loop over
1809
+ * all triangles. When it has been called as many times as there are triangles,
1810
+ * the internal loop counter will be reset.
1811
+ *
1812
+ * \remark Fortran interface:
1813
+ * > SUBROUTINE MMG3D_GET_TRIANGLE(mesh,v0,v1,v2,ref,isRequired,retval)\n
1814
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
1815
+ * > INTEGER(MMG5F_INT), INTENT(OUT) :: v0,v1,v2\n
1816
+ * > INTEGER(MMG5F_INT) :: ref\n
1817
+ * > INTEGER :: isRequired\n
1818
+ * > INTEGER, INTENT(OUT) :: retval\n
1819
+ * > END SUBROUTINE\n
1820
+ *
1821
+ */
1822
+ LIBMMG3D_EXPORT int MMG3D_Get_triangle(MMG5_pMesh mesh, MMG5_int* v0, MMG5_int* v1, MMG5_int* v2, MMG5_int* ref,
1823
+ int* isRequired);
1824
+
1825
+ /**
1826
+ * \brief Get the vertices and references of all triangles in the mesh.
1827
+ *
1828
+ * \param mesh pointer to the mesh structure.
1829
+ * \param tria pointer to the array where the vertices are to be stored
1830
+ * Vertices of the \f$i^{th}\f$ triangle are stored in tria[(i-1)*3] to tria[(i-1)*3+2].
1831
+ * \param refs pointer to the array where the references are to be stored.
1832
+ * refs[i-1] is the reference of the \f$i^{th}\f$ triangle.
1833
+ * \param areRequired pointer to array of the flags saying if triangles
1834
+ * are required. areRequired[i-1]=1 if the \f$i^{th}\f$ tria
1835
+ * is required.
1836
+ * \return 0 if failed, 1 otherwise.
1837
+ *
1838
+ * \remark Fortran interface: (Commentated in order to allow to pass \%val(0)
1839
+ * instead of the refs or areRequired arrays)
1840
+ *
1841
+ * > ! SUBROUTINE MMG3D_GET_TRIANGLES(mesh,tria,refs,areRequired,retval)\n
1842
+ * > ! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
1843
+ * > ! INTEGER(MMG5F_INT), DIMENSION(*),INTENT(OUT) :: tria\n
1844
+ * > ! INTEGER(MMG5F_INT), DIMENSION(*) :: refs\n
1845
+ * > ! INTEGER, DIMENSION(*) :: areRequired\n
1846
+ * > ! INTEGER, INTENT(OUT) :: retval\n
1847
+ * > ! END SUBROUTINE\n
1848
+ *
1849
+ */
1850
+ LIBMMG3D_EXPORT int MMG3D_Get_triangles(MMG5_pMesh mesh, MMG5_int* tria, MMG5_int* refs,
1851
+ int* areRequired);
1852
+
1853
+ /**
1854
+ * \brief Get the vertices and reference of the next quadrilateral of the mesh.
1855
+ *
1856
+ * \param mesh pointer to the mesh structure.
1857
+ * \param v0 pointer to the first vertex of quadrilateral.
1858
+ * \param v1 pointer to the second vertex of quadrilateral.
1859
+ * \param v2 pointer to the third vertex of quadrilateral.
1860
+ * \param v3 pointer to the fourth vertex of quadrilateral.
1861
+ * \param ref pointer to the quadrilateral reference.
1862
+ * \param isRequired pointer to the flag saying if quadrilateral is required.
1863
+ * \return 0 if failed, 1 otherwise.
1864
+ *
1865
+ * Get the vertices \a v0,\a v1,\a v2,\a v3 and reference \a ref of the next
1866
+ * quadrilateral of mesh. This function is meant to be called in a loop over all
1867
+ * quadrilaterals. When it has been called as many times as there are
1868
+ * quadrilaterals, the internal loop counter will be reset.
1869
+ *
1870
+ * \remark Fortran interface:
1871
+ * > SUBROUTINE MMG3D_GET_QUADRILATERAL(mesh,v0,v1,v2,v3,ref,isRequired,retval)\n
1872
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
1873
+ * > INTEGER(MMG5F_INT), INTENT(OUT) :: v0,v1,v2,v3,ref\n
1874
+ * > INTEGER :: isRequired\n
1875
+ * > INTEGER, INTENT(OUT) :: retval\n
1876
+ * > END SUBROUTINE\n
1877
+ *
1878
+ */
1879
+ LIBMMG3D_EXPORT int MMG3D_Get_quadrilateral(MMG5_pMesh mesh, MMG5_int* v0, MMG5_int* v1, MMG5_int* v2,MMG5_int* v3,
1880
+ MMG5_int* ref, int* isRequired);
1881
+
1882
+ /**
1883
+ * \brief Get the vertices and references of all quadrilaterals of the mesh.
1884
+ *
1885
+ * \param mesh pointer to the mesh structure.
1886
+ * \param quads pointer to the array where the vertices will be stored.
1887
+ * Vertices of the \f$i^{th}\f$ quadrilateral are stored in quads[(i-1)*4] to quads[(i-1)*4+3].
1888
+ * \param refs pointer to the array of the quadrilaterals references.
1889
+ * refs[i-1] is the ref of the \f$i^{th}\f$ quadrilateral.
1890
+ * \param areRequired pointer to array of the flags saying if quadrilaterals
1891
+ * are required. areRequired[i-1]=1 if the \f$i^{th}\f$ quadrilateral
1892
+ * is required.
1893
+ * \return 0 if failed, 1 otherwise.
1894
+ *
1895
+ * \remark Fortran interface: (Commentated in order to allow to pass \%val(0)
1896
+ * instead of the refs or areRequired arrays)
1897
+ *
1898
+ * > ! SUBROUTINE MMG3D_GET_QUADRILATERALS(mesh,quads,refs,areRequired,retval)\n
1899
+ * > ! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
1900
+ * > ! INTEGER(MMG5F_INT), DIMENSION(*),INTENT(OUT) :: quads\n
1901
+ * > ! INTEGER(MMG5F_INT), DIMENSION(*) :: refs\n
1902
+ * > ! INTEGER, DIMENSION(*) :: areRequired\n
1903
+ * > ! INTEGER, INTENT(OUT) :: retval\n
1904
+ * > ! END SUBROUTINE\n
1905
+ *
1906
+ */
1907
+ LIBMMG3D_EXPORT int MMG3D_Get_quadrilaterals(MMG5_pMesh mesh, MMG5_int* quads, MMG5_int* refs,
1908
+ int* areRequired);
1909
+
1910
+ /**
1911
+ * \brief Get the vertices and reference of the next edge in the mesh.
1912
+ *
1913
+ * \param mesh pointer to the mesh structure.
1914
+ * \param e0 pointer to the first extremity of the edge.
1915
+ * \param e1 pointer to the second extremity of the edge.
1916
+ * \param ref pointer to the edge reference.
1917
+ * \param isRidge pointer to the flag saying if the edge is ridge.
1918
+ * \param isRequired pointer to the flag saying if the edge is required.
1919
+ * \return 0 if failed, 1 otherwise.
1920
+ *
1921
+ * This function retrieves the extremities \a e0, \a e1 and reference \a ref of
1922
+ * next edge of \a mesh. It is meant to be called in a loop over all edges. When
1923
+ * it has been called as many times as there are edges in the mesh, the internal
1924
+ * edge counter will be reset.
1925
+ *
1926
+ * \remark Fortran interface:
1927
+ * > SUBROUTINE MMG3D_GET_EDGE(mesh,e0,e1,ref,isRidge,isRequired,retval)\n
1928
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
1929
+ * > INTEGER(MMG5F_INT), INTENT(OUT) :: e0,e1\n
1930
+ * > INTEGER(MMG5F_INT) :: ref\n
1931
+ * > INTEGER :: isRidge,isRequired\n
1932
+ * > INTEGER, INTENT(OUT) :: retval\n
1933
+ * > END SUBROUTINE\n
1934
+ *
1935
+ */
1936
+ LIBMMG3D_EXPORT int MMG3D_Get_edge(MMG5_pMesh mesh, MMG5_int* e0, MMG5_int* e1, MMG5_int* ref,
1937
+ int* isRidge, int* isRequired);
1938
+
1939
+ /**
1940
+ * \brief Set the vertices and references of all edges in a mesh.
1941
+ *
1942
+ * \param mesh pointer to the mesh structure.
1943
+ * \param edges pointer to the array of edges.
1944
+ * The vertices of the \f$i^{th}\f$ edge should be given in edges[(i-1)*2] and edges[(i-1)*2+1].
1945
+ * \param refs edges references. refs[i-1] is the ref of the \f$i^{th}\f$ edge.
1946
+ * \return 0 if failed, 1 otherwise.
1947
+ *
1948
+ * \remark Fortran interface:
1949
+ * > SUBROUTINE MMG3D_SET_EDGES(mesh,edges,refs,retval)\n
1950
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
1951
+ * > INTEGER(MMG5F_INT), INTENT(IN) :: edges(*)\n
1952
+ * > INTEGER(MMG5F_INT), INTENT(IN) :: refs(*)\n
1953
+ * > INTEGER, INTENT(OUT) :: retval\n
1954
+ * > END SUBROUTINE\n
1955
+ *
1956
+ */
1957
+ LIBMMG3D_EXPORT int MMG3D_Set_edges(MMG5_pMesh mesh, MMG5_int *edges, MMG5_int* refs);
1958
+
1959
+ /**
1960
+ * \brief Get the vertices and references of all edges in a mesh.
1961
+ *
1962
+ * \param mesh pointer to the mesh structure.
1963
+ * \param edges pointer to the array of edges.
1964
+ * The vertices of the \f$i^{th}\f$ edge are stored in edges[(i-1)*2] and edges[(i-1)*2+1].
1965
+ * \param refs edges references. refs[i-1] is the ref of the \f$i^{th}\f$ edge.
1966
+ * \param areRidges 1 if the edge is a ridge, 0 otherwise.
1967
+ * \param areRequired 1 if the edge is required, 0 otherwise.
1968
+ * \return 0 if failed, 1 otherwise.
1969
+ *
1970
+ * \remark Fortran interface:
1971
+ * > SUBROUTINE MMG3D_GET_EDGES(mesh,edges,refs,areRidges,areRequired,retval)\n
1972
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
1973
+ * > INTEGER(MMG5F_INT), INTENT(IN) :: edges(*)\n
1974
+ * > INTEGER(MMG5F_INT), INTENT(OUT):: refs(*)\n
1975
+ * > INTEGER, INTENT(OUT) :: areRequired(*),areRidges(*)\n
1976
+ * > INTEGER, INTENT(OUT) :: retval\n
1977
+ * > END SUBROUTINE\n
1978
+ *
1979
+ */
1980
+ LIBMMG3D_EXPORT int MMG3D_Get_edges(MMG5_pMesh mesh,MMG5_int *edges,MMG5_int* refs,
1981
+ int *areRidges,int *areRequired);
1982
+
1983
+ /**
1984
+ * \brief Get the normal orientation at a single mesh vertex.
1985
+ *
1986
+ * \param mesh pointer to the mesh structure.
1987
+ * \param k vertex index
1988
+ * \param n0 x componant of the normal at vertex \a k.
1989
+ * \param n1 y componant of the normal at vertex \a k.
1990
+ * \param n2 z componant of the normal at vertex \a k.
1991
+ *
1992
+ * \return 1 if success.
1993
+ *
1994
+ * This function retrieves the normal (n0,n1,n2) at vertex \a k.
1995
+ *
1996
+ * \remark Fortran interface:
1997
+ * > SUBROUTINE MMG3D_GET_NORMALATVERTEX(mesh,k,n0,n1,n2,retval)\n
1998
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
1999
+ * > INTEGER(MMG5F_INT), INTENT(IN):: k\n
2000
+ * > REAL(KIND=8) :: n0,n1,n2\n
2001
+ * > INTEGER, INTENT(OUT) :: retval\n
2002
+ * > END SUBROUTINE\n
2003
+ *
2004
+ */
2005
+ LIBMMG3D_EXPORT int MMG3D_Get_normalAtVertex(MMG5_pMesh mesh, MMG5_int k, double *n0, double *n1,
2006
+ double *n2) ;
2007
+
2008
+ /**
2009
+ * \brief Get the quality measure of a single tetrahedron in the mesh.
2010
+ *
2011
+ * \param mesh pointer to the mesh structure.
2012
+ * \param met pointer to the metric structure (may be NULL for an isotropic metric).
2013
+ * \param k index of the tetrahedron for which we want to get the quality (from 1 to
2014
+ * the number of tetrahedra included)
2015
+ * \return the computed quality or 0 in case of failure.
2016
+ *
2017
+ * This function returns the quality measure of tetrahedron \a k. Quality values
2018
+ * range from 0 (degenerate) to 1 (best attainable). The function returns 0
2019
+ * if the tetrahedron is flat or has a negative volume, and also if \a k is out
2020
+ * of range. In the latter case it will also print a diagnostic message to
2021
+ * standard output.
2022
+ *
2023
+ * \remark Fortran interface:
2024
+ * > SUBROUTINE MMG3D_GET_TETRAHEDRONQUALITY(mesh,met,k,retval)\n
2025
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,met\n
2026
+ * > INTEGER(MMG5F_INT), INTENT(IN):: k\n
2027
+ * > REAL(KIND=8), INTENT(OUT) :: retval\n
2028
+ * > END SUBROUTINE\n
2029
+ *
2030
+ */
2031
+ LIBMMG3D_EXPORT double MMG3D_Get_tetrahedronQuality(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k);
2032
+
2033
+ /**
2034
+ * \brief Get the next element of a scalar solution structure defined at vertices.
2035
+ *
2036
+ * \param met pointer to the sol structure.
2037
+ * \param s pointer to the scalar solution value.
2038
+ * \return 0 if failed, 1 otherwise.
2039
+ *
2040
+ * This function retrieves the solution \a s of the next vertex of \a mesh. It
2041
+ * is meant to be called in a loop over all vertices. When it has been called as
2042
+ * many times as there are vertices in the mesh, the internal loop counter will
2043
+ * be reset.
2044
+ *
2045
+ * \remark Fortran interface:
2046
+ * > SUBROUTINE MMG3D_GET_SCALARSOL(met,s,retval)\n
2047
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: met\n
2048
+ * > REAL(KIND=8), INTENT(OUT) :: s\n
2049
+ * > INTEGER, INTENT(OUT) :: retval\n
2050
+ * > END SUBROUTINE\n
2051
+ *
2052
+ */
2053
+ LIBMMG3D_EXPORT int MMG3D_Get_scalarSol(MMG5_pSol met, double* s);
2054
+
2055
+ /**
2056
+ * \brief Get all elements of a scalar solution structure defined at vertices.
2057
+ *
2058
+ * \param met pointer to the sol structure.
2059
+ * \param s array of the scalar solutions at mesh vertices.
2060
+ * The solution at vertex i will be stored in s[i-1].
2061
+ * \return 0 if failed, 1 otherwise.
2062
+ *
2063
+ * \remark Fortran interface:
2064
+ * > SUBROUTINE MMG3D_GET_SCALARSOLS(met,s,retval)\n
2065
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: met\n
2066
+ * > REAL(KIND=8), DIMENSION(*),INTENT(OUT) :: s\n
2067
+ * > INTEGER, INTENT(OUT) :: retval\n
2068
+ * > END SUBROUTINE\n
2069
+ *
2070
+ */
2071
+ LIBMMG3D_EXPORT int MMG3D_Get_scalarSols(MMG5_pSol met, double* s);
2072
+
2073
+ /**
2074
+ * \brief Get the next element of a vector solution structure.
2075
+ *
2076
+ * \param met pointer to the sol structure.
2077
+ * \param vx x value of the vectorial solution.
2078
+ * \param vy y value of the vectorial solution.
2079
+ * \param vz z value of the vectorial solution.
2080
+ * \return 0 if failed, 1 otherwise.
2081
+ *
2082
+ * This function retrieves the next vector-valued element \f$(v_x,v_y,vz)\f$ of
2083
+ * the solution. It is meant to be called in a loop over all elements. When it
2084
+ * has been called as many times as there are elements in the solution, the
2085
+ * internal loop counter will be reset.
2086
+ *
2087
+ * \remark Fortran interface:
2088
+ * > SUBROUTINE MMG3D_GET_VECTORSOL(met,vx,vy,vz,retval)\n
2089
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: met\n
2090
+ * > REAL(KIND=8), INTENT(OUT) :: vx,vy,vz\n
2091
+ * > INTEGER, INTENT(OUT) :: retval\n
2092
+ * > END SUBROUTINE\n
2093
+ *
2094
+ */
2095
+ LIBMMG3D_EXPORT int MMG3D_Get_vectorSol(MMG5_pSol met, double* vx, double* vy, double* vz);
2096
+
2097
+ /**
2098
+ * \brief Get all elements of a vector solution structure.
2099
+ *
2100
+ * \param met pointer to the sol structure.
2101
+ * \param sols array of the solutions at mesh vertices. sols[3*(i-1)]\@3 is
2102
+ * the solution at vertex i.
2103
+ * \return 0 if failed, 1 otherwise.
2104
+ *
2105
+ * Get vectorial solutions at mesh vertices
2106
+ *
2107
+ * \remark Fortran interface:
2108
+ * > SUBROUTINE MMG3D_GET_VECTORSOLS(met,sols,retval)\n
2109
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: met\n
2110
+ * > REAL(KIND=8), DIMENSION(*),INTENT(OUT) :: sols\n
2111
+ * > INTEGER, INTENT(OUT) :: retval\n
2112
+ * > END SUBROUTINE\n
2113
+ *
2114
+ */
2115
+ LIBMMG3D_EXPORT int MMG3D_Get_vectorSols(MMG5_pSol met, double* sols);
2116
+
2117
+ /**
2118
+ * \brief Get the next element of a tensor solution structure.
2119
+ *
2120
+ * \param met pointer to the sol structure.
2121
+ * \param m11 pointer to the position (1,1) in the solution tensor.
2122
+ * \param m12 pointer to the position (1,2) in the solution tensor.
2123
+ * \param m13 pointer to the position (1,3) in the solution tensor.
2124
+ * \param m22 pointer to the position (2,2) in the solution tensor.
2125
+ * \param m23 pointer to the position (2,3) in the solution tensor.
2126
+ * \param m33 pointer to the position (3,3) in the solution tensor.
2127
+ * \return 0 if failed, 1 otherwise.
2128
+ *
2129
+ * This function retrieves the next element
2130
+ * \f$(m_{11},m_{12},m_{13},m_{22},m_{23},m_{33})\f$ of a tensor-valued solution
2131
+ * field. It is meant to be called in a loop over all vertices. When it has
2132
+ * been called as many times as there are elements in the solution, the internal
2133
+ * loop counter will be reset.
2134
+ *
2135
+ * \remark Fortran interface:
2136
+ * > SUBROUTINE MMG3D_GET_TENSORSOL(met,m11,m12,m13,m22,m23,m33,retval)\n
2137
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: met\n
2138
+ * > REAL(KIND=8), INTENT(OUT) :: m11,m12,m13,m22,m23,m33\n
2139
+ * > INTEGER, INTENT(OUT) :: retval\n
2140
+ * > END SUBROUTINE\n
2141
+ *
2142
+ */
2143
+ LIBMMG3D_EXPORT int MMG3D_Get_tensorSol(MMG5_pSol met, double *m11,double *m12, double *m13,
2144
+ double *m22,double *m23, double *m33);
2145
+
2146
+ /**
2147
+ * \brief Get all elements of a tensor solution field.
2148
+ *
2149
+ * \param met pointer to the sol structure.
2150
+ * \param sols array of the solutions at mesh vertices.
2151
+ * The solution at vertex \a i will be stored in sols[6*(i-1)] to sols[6*(i-1)+5].
2152
+ * \return 0 if failed, 1 otherwise.
2153
+ *
2154
+ * \remark Fortran interface:
2155
+ * > SUBROUTINE MMG3D_GET_TENSORSOLS(met,sols,retval)\n
2156
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: met\n
2157
+ * > REAL(KIND=8), DIMENSION(*), INTENT(OUT) :: sols\n
2158
+ * > INTEGER, INTENT(OUT) :: retval\n
2159
+ * > END SUBROUTINE\n
2160
+ *
2161
+ */
2162
+ LIBMMG3D_EXPORT int MMG3D_Get_tensorSols(MMG5_pSol met, double *sols);
2163
+
2164
+ /**
2165
+ * \brief Get one out of several solutions at a specific vertex.
2166
+ *
2167
+ * \param sol pointer to the array of solutions
2168
+ * \param i position of the solution field that we want to get.
2169
+ * \param s solution(s) at mesh vertex \a pos. The required size
2170
+ * of this array depends on the type of solution.
2171
+ * \param pos index of the vertex on which we get the solution.
2172
+ *
2173
+ * \return 0 if failed, 1 otherwise.
2174
+ *
2175
+ * Get values of the ith field of the solution array at vertex \a pos.
2176
+ * (pos from 1 to nb_vertices included and \a i from 1 to \a nb_sols).
2177
+ * The type of solution is inferred from \a sol.
2178
+ *
2179
+ * \remark Fortran interface:
2180
+ * > SUBROUTINE MMG3D_GET_ITHSOL_INSOLSATVERTICES(sol,i,s,pos,retval)\n
2181
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: sol\n
2182
+ * > INTEGER, INTENT(IN) :: i\n
2183
+ * > INTEGER(MMG5F_INT), INTENT(IN) :: pos\n
2184
+ * > REAL(KIND=8), DIMENSION(*),INTENT(OUT) :: s\n
2185
+ * > INTEGER, INTENT(OUT) :: retval\n
2186
+ * > END SUBROUTINE\n
2187
+ *
2188
+ */
2189
+ LIBMMG3D_EXPORT int MMG3D_Get_ithSol_inSolsAtVertices(MMG5_pSol sol,int i, double* s,MMG5_int pos);
2190
+
2191
+ /**
2192
+ * \brief Get one out of several solutions at all vertices in the mesh.
2193
+ *
2194
+ * \param sol pointer to the array of solutions
2195
+ * \param i position of the solution field that we want to get.
2196
+ * \param s array of the solutions at mesh vertices. The solution at vertex \a k
2197
+ * is given by s[k-1] for a scalar sol, s[3*(k-1)]\@3 for a vectorial solution
2198
+ * and s[6*(k-1)]\@6 for a tensor solution.
2199
+ *
2200
+ * \return 0 if failed, 1 otherwise.
2201
+ *
2202
+ * This function retrieves the values of the solution at the ith field of the
2203
+ * solution array (\a i from 1 to \a nb_sols).
2204
+ *
2205
+ * \remark Fortran interface:
2206
+ * > SUBROUTINE MMG3D_GET_ITHSOLS_INSOLSATVERTICES(sol,i,s,retval)\n
2207
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: sol\n
2208
+ * > INTEGER, INTENT(IN) :: i\n
2209
+ * > REAL(KIND=8), DIMENSION(*),INTENT(OUT) :: s\n
2210
+ * > INTEGER, INTENT(OUT) :: retval\n
2211
+ * > END SUBROUTINE\n
2212
+ *
2213
+ */
2214
+ LIBMMG3D_EXPORT int MMG3D_Get_ithSols_inSolsAtVertices(MMG5_pSol sol,int i, double* s);
2215
+
2216
+ /**
2217
+ * \brief Get the value of an integer parameter of the remesher.
2218
+ *
2219
+ * \param mesh pointer to the mesh structure.
2220
+ * \param iparam integer parameter to get (see \ref MMG3D_Param for a
2221
+ * list of parameters that can be set).
2222
+ * \return The value of integer parameter.
2223
+ *
2224
+ * Get the value of integer parameter \a iparam.
2225
+ *
2226
+ * \remark Fortran interface:
2227
+ * > SUBROUTINE MMG3D_GET_IPARAMETER(mesh,iparam,retval)\n
2228
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
2229
+ * > INTEGER(MMG5F_INT), INTENT(IN):: iparam\n
2230
+ * > INTEGER, INTENT(OUT) :: retval\n
2231
+ * > END SUBROUTINE\n
2232
+ *
2233
+ */
2234
+ LIBMMG3D_EXPORT int MMG3D_Get_iparameter(MMG5_pMesh mesh, MMG5_int iparam);
2235
+
2236
+ /**
2237
+ * \brief Add a tetrahedron to the mesh.
2238
+ *
2239
+ * \param mesh pointer to the mesh structure.
2240
+ * \param v0 first vertex of tetrahedron.
2241
+ * \param v1 second vertex of tetrahedron.
2242
+ * \param v2 third vertex of tetrahedron.
2243
+ * \param v3 fourth vertex of tetrahedron.
2244
+ * \param ref tetrahedron reference.
2245
+ *
2246
+ * This function adds a tetrahedron with vertices \a v0, \a v1, \a v2, \a v3 and reference
2247
+ * \a ref at the first available position of the mesh.
2248
+ *
2249
+ * \return 0 if unable to create the tetrahedron, the unit-offset index of the new tet if it
2250
+ * has strictly positive volume, a negative index if it has a zero or negative volume.
2251
+ *
2252
+ * \remark Fortran interface:
2253
+ * > SUBROUTINE MMG3D_ADD_TETRAHEDRON(mesh,v0,v1,v2,v3,ref,retval)\n
2254
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
2255
+ * > INTEGER(MMG5F_INT), INTENT(IN):: v0,v1,v2,v3,ref\n
2256
+ * > INTEGER, INTENT(OUT) :: retval\n
2257
+ * > END SUBROUTINE\n
2258
+ *
2259
+ */
2260
+ LIBMMG3D_EXPORT int MMG3D_Add_tetrahedron(MMG5_pMesh mesh, MMG5_int v0, MMG5_int v1,
2261
+ MMG5_int v2, MMG5_int v3, MMG5_int ref);
2262
+
2263
+ /**
2264
+ * \brief Add a vertex to the mesh.
2265
+ *
2266
+ * \param mesh pointer to the mesh structure.
2267
+ * \param c0 x coor of the new vertex
2268
+ * \param c1 y coor of the new vertex
2269
+ * \param c2 z coor of the new vertex
2270
+ * \param ref vertex reference.
2271
+ *
2272
+ * \return 0 if unable to create the vertex, the index of the new vertex
2273
+ * otherwise.
2274
+ *
2275
+ * This function adds a vertex with coordinates \a c0 \a c1 \a c2 and reference
2276
+ * \a ref at the first available position of the mesh.
2277
+ *
2278
+ * \remark Fortran interface:
2279
+ * > SUBROUTINE MMG3D_ADD_VERTEX(mesh,c0,c1,c2,ref,retval)\n
2280
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
2281
+ * > REAL(KIND=8), INTENT(IN) :: c0,c1,c2\n
2282
+ * > INTEGER(MMG5F_INT), INTENT(IN) :: ref\n
2283
+ * > INTEGER(MMG5F_INT), INTENT(OUT) :: retval\n
2284
+ * > END SUBROUTINE\n
2285
+ *
2286
+ */
2287
+ LIBMMG3D_EXPORT MMG5_int MMG3D_Add_vertex(MMG5_pMesh mesh, double c0, double c1,
2288
+ double c2, MMG5_int ref);
2289
+
2290
+ /* input/output functions */
2291
+ /**
2292
+ * \brief Load a mesh (in .mesh/.mesb format) from file.
2293
+ *
2294
+ * \param mesh pointer to the mesh structure.
2295
+ * \param filename name of the file.
2296
+ *
2297
+ * \return 0 if file is not found, -1 if fail for another reason (insufficient memory, file
2298
+ * format...), 1 if success.
2299
+ *
2300
+ * Read mesh data.
2301
+ *
2302
+ * \remark Fortran interface:
2303
+ * > SUBROUTINE MMG3D_LOADMESH(mesh,filename,strlen0,retval)\n
2304
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh\n
2305
+ * > CHARACTER(LEN=*), INTENT(IN) :: filename\n
2306
+ * > INTEGER, INTENT(IN) :: strlen0\n
2307
+ * > INTEGER, INTENT(OUT) :: retval\n
2308
+ * > END SUBROUTINE\n
2309
+ *
2310
+ */
2311
+ LIBMMG3D_EXPORT int MMG3D_loadMesh(MMG5_pMesh mesh,const char *filename);
2312
+
2313
+ /**
2314
+ * \brief Load a mesh and possibly a solution in .msh format from file.
2315
+ *
2316
+ * \param mesh pointer to the mesh structure.
2317
+ * \param sol pointer to the solution structure.
2318
+ * \param filename name of file.
2319
+ *
2320
+ * \return 0 if file is not found, -1 if fail for another reason (insufficient memory, file
2321
+ * format...), 1 if success.
2322
+ *
2323
+ * This function reads a mesh and 0 or 1 data fields in MSH file format (.msh
2324
+ * extension). We read only low-order vertices, edges, triangles, quadrangles,
2325
+ * tetrahedra and prisms.
2326
+ *
2327
+ * \remark Fortran interface:
2328
+ * > SUBROUTINE MMG3D_LOADMSHMESH(mesh,sol,filename,strlen0,retval)\n
2329
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol\n
2330
+ * > CHARACTER(LEN=*), INTENT(IN) :: filename\n
2331
+ * > INTEGER, INTENT(IN) :: strlen0\n
2332
+ * > INTEGER, INTENT(OUT) :: retval\n
2333
+ * > END SUBROUTINE\n
2334
+ *
2335
+ */
2336
+ LIBMMG3D_EXPORT int MMG3D_loadMshMesh(MMG5_pMesh mesh,MMG5_pSol sol,const char *filename);
2337
+
2338
+ /**
2339
+ * \brief Load a mesh and possibly a solution in VTU (VTK) format from file.
2340
+ *
2341
+ * \param mesh pointer to the mesh structure.
2342
+ * \param met pointer to the metric structure or the NULL pointer.
2343
+ * \param sol pointer to the level-set structure or the NULL pointer.
2344
+ * \param filename name of file.
2345
+ *
2346
+ * \return 0 if file is not found, -1 if fail for another reason (insufficient memory, file
2347
+ * format...), 1 if success.
2348
+ *
2349
+ * This function reads a mesh and 0 or 1 data field in VTU (VTK) file format (.vtu
2350
+ * extension). We read only low-order vertices, edges, tria, quadra, tetra and
2351
+ * prisms. Point and cell references must be stored in PointData or CellData
2352
+ * whose names contain the "medit:ref" keyword.
2353
+ *
2354
+ * \remark Fortran interface:
2355
+ * > SUBROUTINE MMG3D_LOADVTUMESH(mesh,met,sol,filename,strlen0,retval)\n
2356
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met,sol\n
2357
+ * > CHARACTER(LEN=*), INTENT(IN) :: filename\n
2358
+ * > INTEGER, INTENT(IN) :: strlen0\n
2359
+ * > INTEGER, INTENT(OUT) :: retval\n
2360
+ * > END SUBROUTINE\n
2361
+ *
2362
+ */
2363
+ LIBMMG3D_EXPORT int MMG3D_loadVtuMesh(MMG5_pMesh mesh,MMG5_pSol met,MMG5_pSol sol,const char *filename);
2364
+
2365
+ /**
2366
+ * \brief Load a mesh and multiple solutions in VTU (VTK) format from file.
2367
+ *
2368
+ * \param mesh pointer to the mesh structure.
2369
+ * \param sol pointer to the solution structure.
2370
+ * \param filename name of file.
2371
+ *
2372
+ * \return 0 if file is not found, -1 if fail for another reason (insufficient memory, file
2373
+ * format...), 1 if success.
2374
+ *
2375
+ * This functionreads a mesh and a list of data in VTU file format (.vtu extension). We read
2376
+ * only low-order vertices, edges, tria, quadra, tetra and prisms. Point and cell
2377
+ * references must be stored in PointData or CellData whose names contains the
2378
+ * "medit:ref" keyword.
2379
+ *
2380
+ * \remark Fortran interface:
2381
+ * > SUBROUTINE MMG3D_LOADVTUMESH_AND_ALLDATA(mesh,sol,filename,strlen0,retval)\n
2382
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol\n
2383
+ * > CHARACTER(LEN=*), INTENT(IN) :: filename\n
2384
+ * > INTEGER, INTENT(IN) :: strlen0\n
2385
+ * > INTEGER, INTENT(OUT) :: retval\n
2386
+ * > END SUBROUTINE\n
2387
+ *
2388
+ */
2389
+ LIBMMG3D_EXPORT int MMG3D_loadVtuMesh_and_allData(MMG5_pMesh mesh,MMG5_pSol *sol,const char *filename);
2390
+
2391
+ /**
2392
+ * \brief Load a mesh and possibly a solution from a file in VTK format.
2393
+ *
2394
+ * \param mesh pointer to the mesh structure.
2395
+ * \param met pointer to the metric structure or the NULL pointer.
2396
+ * \param sol pointer to the level-set structure or the NULL pointer.
2397
+ * \param filename name of file.
2398
+ *
2399
+ * \return 0 if file is not found, -1 if fail for another reason (insufficient memory, file
2400
+ * format...), 1 if success.
2401
+ *
2402
+ * This function reads a mesh and 0 or 1 data fields in VTK file format (.vtu extension). We read
2403
+ * only low-order vertices, edges, tria, quadra, tetra and prisms. Point and cell
2404
+ * references must be stored in PointData or CellData whose names contain the
2405
+ * "medit:ref" keyword.
2406
+ *
2407
+ * \remark Fortran interface:
2408
+ * > SUBROUTINE MMG3D_LOADVTKMESH(mesh,met,sol,filename,strlen0,retval)\n
2409
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met,sol\n
2410
+ * > CHARACTER(LEN=*), INTENT(IN) :: filename\n
2411
+ * > INTEGER, INTENT(IN) :: strlen0\n
2412
+ * > INTEGER, INTENT(OUT) :: retval\n
2413
+ * > END SUBROUTINE\n
2414
+ *
2415
+ */
2416
+ LIBMMG3D_EXPORT int MMG3D_loadVtkMesh(MMG5_pMesh mesh,MMG5_pSol met,MMG5_pSol sol,const char *filename);
2417
+
2418
+ /**
2419
+ * \brief Load a mesh and multiple solutions from a file in VTK format.
2420
+ *
2421
+ * \param mesh pointer to the mesh structure.
2422
+ * \param sol pointer to the solution structure.
2423
+ * \param filename name of file.
2424
+ *
2425
+ * \return 0 if file is not found, -1 if fail for another reason (insufficient memory, file
2426
+ * format...), 1 if success.
2427
+ *
2428
+ * Read mesh and a list of data in VTK file format (.vtu extension). We read
2429
+ * only low-order vertices, edges, tria, quadra, tetra and prisms. Point and cell
2430
+ * references must be stored in PointData or CellData whose names contains the
2431
+ * "medit:ref" keyword.
2432
+ *
2433
+ * \remark Fortran interface:
2434
+ * > SUBROUTINE MMG3D_LOADVTKMESH_AND_ALLDATA(mesh,sol,filename,strlen0,retval)\n
2435
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol\n
2436
+ * > CHARACTER(LEN=*), INTENT(IN) :: filename\n
2437
+ * > INTEGER, INTENT(IN) :: strlen0\n
2438
+ * > INTEGER, INTENT(OUT) :: retval\n
2439
+ * > END SUBROUTINE\n
2440
+ *
2441
+ */
2442
+ LIBMMG3D_EXPORT int MMG3D_loadVtkMesh_and_allData(MMG5_pMesh mesh,MMG5_pSol *sol,const char *filename);
2443
+
2444
+ /**
2445
+ * \brief Load a mesh and all data from a file in MSH format.
2446
+ *
2447
+ * \param mesh pointer to the mesh structure.
2448
+ * \param sol pointer to a list of solution structures.
2449
+ * \param filename name of file.
2450
+ *
2451
+ * \return 0 if file is not found, -1 if fail for another reason (insufficient memory, file
2452
+ * format...), 1 if success.
2453
+ *
2454
+ * Read mesh and a list of data in MSH file format (.msh extension). We read only
2455
+ * low-order vertices, edges, tria, quadra, tetra and prisms.
2456
+ *
2457
+ * \remark Fortran interface:
2458
+ * > SUBROUTINE MMG3D_LOADMSHMESH_AND_ALLDATA(mesh,sol,filename,strlen0,retval)\n
2459
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol\n
2460
+ * > CHARACTER(LEN=*), INTENT(IN) :: filename\n
2461
+ * > INTEGER, INTENT(IN) :: strlen0\n
2462
+ * > INTEGER, INTENT(OUT) :: retval\n
2463
+ * > END SUBROUTINE\n
2464
+ *
2465
+ */
2466
+ LIBMMG3D_EXPORT int MMG3D_loadMshMesh_and_allData(MMG5_pMesh mesh,MMG5_pSol *sol,const char *filename);
2467
+
2468
+ /**
2469
+ * \brief Read mesh data in a format determined by the filename extension.
2470
+ *
2471
+ * \param mesh pointer to the mesh structure.
2472
+ * \param met pointer to the metric structure or the NULL pointer.
2473
+ * \param sol pointer to the level-set structure or the NULL pointer.
2474
+ * \param filename name of file.
2475
+ *
2476
+ * \return 0 if file is not found, -1 if fail for another reason (insufficient memory, file
2477
+ * format...), 1 if success.
2478
+ *
2479
+ * \remark Fortran interface:
2480
+ * > SUBROUTINE MMG3D_LOADGENERICMESH(mesh,met,sol,filename,strlen0,retval)\n
2481
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met,sol\n
2482
+ * > CHARACTER(LEN=*), INTENT(IN) :: filename\n
2483
+ * > INTEGER, INTENT(IN) :: strlen0\n
2484
+ * > INTEGER, INTENT(OUT) :: retval\n
2485
+ * > END SUBROUTINE\n
2486
+ *
2487
+ */
2488
+ LIBMMG3D_EXPORT int MMG3D_loadGenericMesh(MMG5_pMesh mesh,MMG5_pSol met,MMG5_pSol sol,const char *filename);
2489
+
2490
+ /**
2491
+ * \brief Save a mesh in .mesh/.meshb format.
2492
+ *
2493
+ * \param mesh pointer to the mesh structure.
2494
+ * \param filename pointer to the name of file.
2495
+ * \return 0 if failed, 1 otherwise.
2496
+ *
2497
+ * \remark Fortran interface:
2498
+ * > SUBROUTINE MMG3D_SAVEMESH(mesh,filename,strlen0,retval)\n
2499
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh\n
2500
+ * > CHARACTER(LEN=*), INTENT(IN) :: filename\n
2501
+ * > INTEGER, INTENT(IN) :: strlen0\n
2502
+ * > INTEGER, INTENT(OUT) :: retval\n
2503
+ * > END SUBROUTINE\n
2504
+ *
2505
+ */
2506
+ LIBMMG3D_EXPORT int MMG3D_saveMesh(MMG5_pMesh mesh, const char *filename);
2507
+
2508
+ /**
2509
+ * \brief Save a mesh in MSH format, ascii or binary depending on the filename extension.
2510
+ *
2511
+ * \param mesh pointer to the mesh structure.
2512
+ * \param sol pointer to the solution structure.
2513
+ * \param filename name of file.
2514
+ * \return 0 if failed, 1 otherwise.
2515
+ *
2516
+ * Write mesh and 0 or 1 data in MSH file format (.msh extension). Write binary
2517
+ * file for .mshb extension and ASCII for .msh one.
2518
+ *
2519
+ * \remark Fortran interface:
2520
+ * > SUBROUTINE MMG3D_SAVEMSHMESH(mesh,sol,filename,strlen0,retval)\n
2521
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol\n
2522
+ * > CHARACTER(LEN=*), INTENT(IN) :: filename\n
2523
+ * > INTEGER, INTENT(IN) :: strlen0\n
2524
+ * > INTEGER, INTENT(OUT) :: retval\n
2525
+ * > END SUBROUTINE\n
2526
+ *
2527
+ */
2528
+ LIBMMG3D_EXPORT int MMG3D_saveMshMesh(MMG5_pMesh mesh,MMG5_pSol sol,const char *filename);
2529
+
2530
+ /**
2531
+ * \brief Save a mesh and data in MSH format, ascii or binary depending on the filename extension.
2532
+ *
2533
+ * \param mesh pointer to the mesh structure.
2534
+ * \param sol pointer to the solution structure.
2535
+ * \param filename name of file.
2536
+ * \return 0 if failed, 1 otherwise.
2537
+ *
2538
+ * Write mesh and a list of data fields (that are considered as solutions and
2539
+ * not metrics, thus, we do nothing over the ridge vertices) in MSH file format
2540
+ * (.msh extension). Save file in ASCII format for .msh extension, in binary
2541
+ * format for .mshb one.
2542
+ *
2543
+ * \remark Fortran interface:
2544
+ * > SUBROUTINE MMG3D_SAVEMSHMESH_AND_ALLDATA(mesh,sol,filename,strlen0,retval)\n
2545
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol\n
2546
+ * > CHARACTER(LEN=*), INTENT(IN) :: filename\n
2547
+ * > INTEGER, INTENT(IN) :: strlen0\n
2548
+ * > INTEGER, INTENT(OUT) :: retval\n
2549
+ * > END SUBROUTINE\n
2550
+ *
2551
+ */
2552
+ LIBMMG3D_EXPORT int MMG3D_saveMshMesh_and_allData(MMG5_pMesh mesh,MMG5_pSol *sol,const char *filename);
2553
+
2554
+ /**
2555
+ * \brief Save a mesh and optionally one solution in VTK format.
2556
+ *
2557
+ * \param mesh pointer to the mesh structure.
2558
+ * \param sol pointer to the solution structure.
2559
+ * \param filename name of file.
2560
+ * \return 0 if failed, 1 otherwise.
2561
+ *
2562
+ * Write mesh and 0 or 1 data in Vtk file format (.vtk extension).
2563
+ *
2564
+ * \remark Fortran interface:
2565
+ * > SUBROUTINE MMG3D_SAVEVTKMESH(mesh,sol,filename,strlen0,retval)\n
2566
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol\n
2567
+ * > CHARACTER(LEN=*), INTENT(IN) :: filename\n
2568
+ * > INTEGER, INTENT(IN) :: strlen0\n
2569
+ * > INTEGER, INTENT(OUT) :: retval\n
2570
+ * > END SUBROUTINE\n
2571
+ *
2572
+ */
2573
+ LIBMMG3D_EXPORT int MMG3D_saveVtkMesh(MMG5_pMesh mesh,MMG5_pSol sol,const char *filename);
2574
+
2575
+ /**
2576
+ * \brief Save a mesh and multiple data fields in VTK format.
2577
+ *
2578
+ * \param mesh pointer to the mesh structure.
2579
+ * \param sol pointer to the solution structure.
2580
+ * \param filename name of file.
2581
+ * \return 0 if failed, 1 otherwise.
2582
+ *
2583
+ * Write mesh and a list of data fields in Vtk file format (.vtk extension).
2584
+ *
2585
+ * \remark Fortran interface:
2586
+ * > SUBROUTINE MMG3D_SAVEVTKMESH_AND_ALLDATA(mesh,sol,filename,strlen0,retval)\n
2587
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol\n
2588
+ * > CHARACTER(LEN=*), INTENT(IN) :: filename\n
2589
+ * > INTEGER, INTENT(IN) :: strlen0\n
2590
+ * > INTEGER, INTENT(OUT) :: retval\n
2591
+ * > END SUBROUTINE\n
2592
+ *
2593
+ */
2594
+ LIBMMG3D_EXPORT int MMG3D_saveVtkMesh_and_allData(MMG5_pMesh mesh,MMG5_pSol *sol,const char *filename);
2595
+
2596
+ /**
2597
+ * \brief Save a mesh and optionally one data field in VTU format.
2598
+ *
2599
+ * \param mesh pointer to the mesh structure.
2600
+ * \param sol pointer to the solution structure.
2601
+ * \param filename name of file.
2602
+ * \return 0 if failed, 1 otherwise.
2603
+ *
2604
+ * Write mesh and 0 or 1 data in vtu Vtk file format (.vtu extension).
2605
+ *
2606
+ * \remark Fortran interface:
2607
+ * > SUBROUTINE MMG3D_SAVEVTUMESH(mesh,sol,filename,strlen0,retval)\n
2608
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol\n
2609
+ * > CHARACTER(LEN=*), INTENT(IN) :: filename\n
2610
+ * > INTEGER, INTENT(IN) :: strlen0\n
2611
+ * > INTEGER, INTENT(OUT) :: retval\n
2612
+ * > END SUBROUTINE\n
2613
+ *
2614
+ */
2615
+ LIBMMG3D_EXPORT int MMG3D_saveVtuMesh(MMG5_pMesh mesh,MMG5_pSol sol,const char *filename);
2616
+
2617
+ /**
2618
+ * \brief Save a mesh and multiple data fields in VTU format.
2619
+ *
2620
+ * \param mesh pointer to the mesh structure.
2621
+ * \param sol pointer to the solution structure.
2622
+ * \param filename name of file.
2623
+ * \return 0 if failed, 1 otherwise.
2624
+ *
2625
+ * Write mesh and a list of data fields in vtu Vtk file format (.vtu extension).
2626
+ *
2627
+ * \remark Fortran interface:
2628
+ * > SUBROUTINE MMG3D_SAVEVTUMESH_AND_ALLDATA(mesh,sol,filename,strlen0,retval)\n
2629
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol\n
2630
+ * > CHARACTER(LEN=*), INTENT(IN) :: filename\n
2631
+ * > INTEGER, INTENT(IN) :: strlen0\n
2632
+ * > INTEGER, INTENT(OUT) :: retval\n
2633
+ * > END SUBROUTINE\n
2634
+ *
2635
+ */
2636
+ LIBMMG3D_EXPORT int MMG3D_saveVtuMesh_and_allData(MMG5_pMesh mesh,MMG5_pSol *sol,const char *filename);
2637
+
2638
+ /**
2639
+ * \brief Save data in Tetgen's Triangle format.
2640
+ *
2641
+ * \param mesh pointer to the mesh structure.
2642
+ * \param filename name of the readed file.
2643
+ * \return 0 or -1 if fail, 1 otherwise.
2644
+ *
2645
+ * Save mesh data in Triangle (or equivalent to Tetgen in 3D) file format.
2646
+ *
2647
+ * \remark Fortran interface:
2648
+ * > SUBROUTINE MMG3D_SAVETETGENMESH(mesh,filename,strlen0,retval)\n
2649
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh\n
2650
+ * > CHARACTER(LEN=*), INTENT(IN) :: filename\n
2651
+ * > INTEGER, INTENT(IN) :: strlen0\n
2652
+ * > INTEGER, INTENT(OUT) :: retval\n
2653
+ * > END SUBROUTINE\n
2654
+ *
2655
+ */
2656
+ LIBMMG3D_EXPORT int MMG3D_saveTetgenMesh(MMG5_pMesh ,const char *);
2657
+
2658
+ /**
2659
+ * \brief Save mesh data in a file whose format depends on the filename extension.
2660
+ *
2661
+ * \param mesh pointer to the mesh structure.
2662
+ * \param filename name of file.
2663
+ * \return 0 if failed, 1 otherwise.
2664
+ *
2665
+ * \remark Fortran interface:
2666
+ * > SUBROUTINE MMG3D_SAVEGENERICMESH(mesh,sol,filename,strlen0,retval)\n
2667
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol\n
2668
+ * > CHARACTER(LEN=*), INTENT(IN) :: filename\n
2669
+ * > INTEGER, INTENT(IN) :: strlen0\n
2670
+ * > INTEGER, INTENT(OUT) :: retval\n
2671
+ * > END SUBROUTINE\n
2672
+ *
2673
+ */
2674
+ LIBMMG3D_EXPORT int MMG3D_saveGenericMesh(MMG5_pMesh mesh,MMG5_pSol sol,const char *filename);
2675
+
2676
+ /**
2677
+ * \brief Load a metric field (or other solution).
2678
+ *
2679
+ * \param mesh pointer to the mesh structure.
2680
+ * \param met pointer to the sol structure.
2681
+ * \param filename name of file.
2682
+ *
2683
+ * \return 0 if file is not found, -1 if fail for another reason (insufficient
2684
+ * memory, file format...), 1 if successful.
2685
+ *
2686
+ * Load metric field. The solution file must contains only 1 solution: the
2687
+ * metric
2688
+ *
2689
+ * \remark Fortran interface:
2690
+ * > SUBROUTINE MMG3D_LOADSOL(mesh,met,filename,strlen0,retval)\n
2691
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met\n
2692
+ * > CHARACTER(LEN=*), INTENT(IN) :: filename\n
2693
+ * > INTEGER, INTENT(IN) :: strlen0\n
2694
+ * > INTEGER, INTENT(OUT) :: retval\n
2695
+ * > END SUBROUTINE\n
2696
+ *
2697
+ */
2698
+ LIBMMG3D_EXPORT int MMG3D_loadSol(MMG5_pMesh mesh,MMG5_pSol met, const char *filename);
2699
+
2700
+ /**
2701
+ * \brief Load one or more solutions in a solution file in medit file format.
2702
+ *
2703
+ * \param mesh pointer to the mesh structure.
2704
+ * \param sol pointer to the solutions array
2705
+ * \param filename name of file.
2706
+ *
2707
+ * \return 0 if file is not found, -1 if fail for another reason (insufficient
2708
+ * memory, file format...), 1 if successful.
2709
+ *
2710
+ * \remark Fortran interface:
2711
+ * > SUBROUTINE MMG3D_LOADALLSOLS(mesh,sol,filename,strlen0,retval)\n
2712
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol\n
2713
+ * > CHARACTER(LEN=*), INTENT(IN) :: filename\n
2714
+ * > INTEGER, INTENT(IN) :: strlen0\n
2715
+ * > INTEGER, INTENT(OUT) :: retval\n
2716
+ * > END SUBROUTINE\n
2717
+ *
2718
+ */
2719
+ LIBMMG3D_EXPORT int MMG3D_loadAllSols(MMG5_pMesh mesh,MMG5_pSol *sol, const char* filename);
2720
+
2721
+ /**
2722
+ * \brief Write isotropic or anisotropic metric.
2723
+ *
2724
+ * \param mesh pointer to the mesh structure.
2725
+ * \param met pointer to the sol structure.
2726
+ * \param filename name of file.
2727
+ * \return 0 if failed, 1 otherwise.
2728
+ *
2729
+ * \remark Fortran interface:
2730
+ * > SUBROUTINE MMG3D_SAVESOL(mesh,met,filename,strlen0,retval)\n
2731
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met\n
2732
+ * > CHARACTER(LEN=*), INTENT(IN) :: filename\n
2733
+ * > INTEGER, INTENT(IN) :: strlen0\n
2734
+ * > INTEGER, INTENT(OUT) :: retval\n
2735
+ * > END SUBROUTINE\n
2736
+ *
2737
+ */
2738
+ LIBMMG3D_EXPORT int MMG3D_saveSol(MMG5_pMesh mesh,MMG5_pSol met, const char *filename);
2739
+
2740
+ /**
2741
+ * \brief Save 1 or more solutions in medit solution file format
2742
+ *
2743
+ * \param mesh pointer to the mesh structure.
2744
+ * \param sol pointer to the solutions array
2745
+ * \param filename name of the solution file.
2746
+ * \return 0 or -1 if fail, 1 otherwise.
2747
+ *
2748
+ * \remark Fortran interface:
2749
+ * > SUBROUTINE MMG3D_SAVEALLSOLS(mesh,sol,filename,strlen0,retval)\n
2750
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol\n
2751
+ * > CHARACTER(LEN=*), INTENT(IN) :: filename\n
2752
+ * > INTEGER, INTENT(IN) :: strlen0\n
2753
+ * > INTEGER, INTENT(OUT) :: retval\n
2754
+ * > END SUBROUTINE\n
2755
+ *
2756
+ */
2757
+ LIBMMG3D_EXPORT int MMG3D_saveAllSols(MMG5_pMesh mesh,MMG5_pSol *sol ,const char *filename);
2758
+
2759
+ /**
2760
+ * \brief Deallocate an array of solution fields
2761
+ *
2762
+ * \param mesh pointer to the mesh structure.
2763
+ * \param sol pointer to an array of solution structure (that stores solution fields).
2764
+ * \return 1
2765
+ *
2766
+ * \remark Fortran interface:
2767
+ * > SUBROUTINE MMG3D_Free_allSols(mesh,sol,retval)\n
2768
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol\n
2769
+ * > INTEGER, INTENT(OUT) :: retval\n
2770
+ * > END SUBROUTINE\n
2771
+ *
2772
+ */
2773
+ LIBMMG3D_EXPORT int MMG3D_Free_allSols(MMG5_pMesh mesh,MMG5_pSol *sol);
2774
+
2775
+ /* deallocations */
2776
+ /**
2777
+ * \brief Deallocations before return.
2778
+ *
2779
+ * \param starter dummy argument used to initialize the variadic argument
2780
+ * list.
2781
+ * \param ... variadic arguments that depend on the library function that you
2782
+ * have call.
2783
+ *
2784
+ * For the MMG3D_mmg3dlib function, you need
2785
+ * to call the \ref MMG3D_Init_mesh function with the following arguments :
2786
+ * MMG3D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh,
2787
+ * MMG5_ARG_ppMet,&your_metric,MMG5_ARG_end).
2788
+ *
2789
+ * For the MMG3D_mmg3dls function, you need
2790
+ * to call the \ref MMG3D_Init_mesh function with the following arguments :
2791
+ * MMG3D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppLs,
2792
+ * &your_level_set,MMG5_ARG_end).
2793
+ *
2794
+ * For the MMG3D_mmg3dmov function, you must call
2795
+ * : MMG3D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh,
2796
+ * MMG5_ARG_ppMet,&empty_metric,MMG5_ARG_ppDisp, &your_displacement,
2797
+ * MMG5_ARG_end).
2798
+ *
2799
+ * \return 1 if success, 0 if fail
2800
+ *
2801
+ * \remark we pass the structures by reference in order to have argument
2802
+ * compatibility between the library call from a Fortran code and a C code.
2803
+ *
2804
+ * \remark no Fortran interface to allow variadic args.
2805
+ *
2806
+ */
2807
+ LIBMMG3D_EXPORT int MMG3D_Free_all(const int starter,...);
2808
+
2809
+ /**
2810
+ * \brief Structure deallocations before return.
2811
+ *
2812
+ * \param starter dummy argument used to initialize the variadic argument
2813
+ * list.
2814
+ * \param ... variadic arguments that depend on the library function that you
2815
+ * have call.
2816
+ *
2817
+ * For the MMG3D_mmg3dlib function, you need
2818
+ * to call the \ref MMG3D_Init_mesh function with the following arguments :
2819
+ * MMG3D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh,
2820
+ * MMG5_ARG_ppMet,&your_metric,MMG5_ARG_end).
2821
+ *
2822
+ * For the MMG3D_mmg3dls function, you need
2823
+ * to call the \ref MMG3D_Init_mesh function with the following arguments :
2824
+ * MMG3D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppLs,
2825
+ * &your_level_set,MMG5_ARG_end).
2826
+ *
2827
+ * For the \ref MMG3D_mmg3dmov function, you must call
2828
+ * : MMG3D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh,
2829
+ * MMG5_ARG_ppMet,&empty_metric,MMG5_ARG_ppDisp, &your_displacement,
2830
+ * MMG5_ARG_end).
2831
+ *
2832
+ * \return 0 if fail, 1 if success
2833
+ *
2834
+ * \remark we pass the structures by reference in order to have argument
2835
+ * compatibility between the library call from a Fortran code and a C code.
2836
+ *
2837
+ * \remark No fortran interface to allow variadic arguments.
2838
+ *
2839
+ * \remark no Fortran interface to allow variadic args.
2840
+ *
2841
+ */
2842
+ LIBMMG3D_EXPORT int MMG3D_Free_structures(const int starter,...);
2843
+
2844
+ /**
2845
+ * \brief Structure deallocations before return.
2846
+ *
2847
+ * \param starter dummy argument used to initialize the variadic argument
2848
+ * list.
2849
+ * \param ... variadic arguments that depend on the library function that you
2850
+ * have call.
2851
+ *
2852
+ * For the MMG3D_mmg3dlib function, you need
2853
+ * to call the \ref MMG3D_Init_mesh function with the following arguments :
2854
+ * MMG3D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh,
2855
+ * MMG5_ARG_ppMet,&your_metric,MMG5_ARG_end).
2856
+ *
2857
+ * For the MMG3D_mmg3dls function, you need
2858
+ * to call the \ref MMG3D_Init_mesh function with the following arguments :
2859
+ * MMG3D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppLs,
2860
+ * &your_level_set,MMG5_ARG_end).
2861
+ *
2862
+ * For the \ref MMG3D_mmg3dmov function, you must call
2863
+ * : MMG3D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh,
2864
+ * MMG5_ARG_ppMet,&empty_metric,MMG5_ARG_ppDisp, &your_displacement,
2865
+ * MMG5_ARG_end).
2866
+ *
2867
+ * \return 0 if fail, 1 if success
2868
+ *
2869
+ * \remark we pass the structures by reference in order to have argument
2870
+ * compatibility between the library call from a Fortran code and a C code.
2871
+ *
2872
+ * \remark No fortran interface to allow variadic arguments.
2873
+ *
2874
+ */
2875
+ LIBMMG3D_EXPORT int MMG3D_Free_names(const int starter,...);
2876
+
2877
+ /* library */
2878
+ /**
2879
+ * \brief Main "program" for the mesh adaptation library.
2880
+ *
2881
+ * \param mesh pointer to the mesh structure.
2882
+ * \param met pointer to the sol (metric) structure.
2883
+ * \return \ref MMG5_SUCCESS if success, \ref MMG5_LOWFAILURE if fail but a
2884
+ * conform mesh is saved or \ref MMG5_STRONGFAILURE if fail and we can't save
2885
+ * the mesh.
2886
+ *
2887
+ * \remark Fortran interface:
2888
+ * > SUBROUTINE MMG3D_MMG3DLIB(mesh,met,retval)\n
2889
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met\n
2890
+ * > INTEGER, INTENT(OUT) :: retval\n
2891
+ * > END SUBROUTINE\n
2892
+ *
2893
+ */
2894
+ LIBMMG3D_EXPORT int MMG3D_mmg3dlib(MMG5_pMesh mesh, MMG5_pSol met );
2895
+
2896
+ /**
2897
+ * \brief Main "program" for the level-set discretization library.
2898
+ *
2899
+ * \param mesh pointer to the mesh structure.
2900
+ * \param sol pointer to the sol (level-set) structure.
2901
+ * \param met pointer to a sol structure (metric), optional.
2902
+ * \return \ref MMG5_SUCCESS if success, \ref MMG5_LOWFAILURE if fail but a
2903
+ * conform mesh is saved or \ref MMG5_STRONGFAILURE if fail and we can't save
2904
+ * the mesh.
2905
+ *
2906
+ * Main program for the level-set discretization library. If a metric \a met is
2907
+ * provided, use it to adapt the mesh.
2908
+ *
2909
+ * \remark Fortran interface:
2910
+ * > SUBROUTINE MMG3D_MMG3DLS(mesh,sol,met,retval)\n
2911
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol\n
2912
+ * > MMG5_DATA_PTR_T :: met\n
2913
+ * > INTEGER, INTENT(OUT) :: retval\n
2914
+ * > END SUBROUTINE\n
2915
+ *
2916
+ */
2917
+ LIBMMG3D_EXPORT int MMG3D_mmg3dls(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_pSol met );
2918
+
2919
+ /**
2920
+ * \brief Main program for the rigid-body movement library.
2921
+ *
2922
+ * \param mesh pointer to the mesh structure.
2923
+ * \param met pointer to the sol (output metric) structure.
2924
+ * \param disp pointer to a sol (displacement for the lagrangian motion
2925
+ * mode) structure.
2926
+ * \return \ref MMG5_SUCCESS if success, \ref MMG5_LOWFAILURE if fail but a
2927
+ * conform mesh is saved or \ref MMG5_STRONGFAILURE if fail and we can't save
2928
+ * the mesh.
2929
+ *
2930
+ * \remark Fortran interface:
2931
+ * > SUBROUTINE MMG3D_MMG3DMOV(mesh,met,disp,retval)\n
2932
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met,disp\n
2933
+ * > INTEGER, INTENT(OUT) :: retval\n
2934
+ * > END SUBROUTINE\n
2935
+ *
2936
+ */
2937
+ LIBMMG3D_EXPORT int MMG3D_mmg3dmov(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol disp );
2938
+
2939
+ /** Tools for the library */
2940
+ /**
2941
+ * \brief Print the default parameters values.
2942
+ *
2943
+ * \param mesh pointer to the mesh structure.
2944
+ * \return 0 if fail, 1 if success.
2945
+ *
2946
+ * \remark Fortran interface:
2947
+ * > SUBROUTINE MMG3D_DEFAULTVALUES(mesh,retval)\n
2948
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh\n
2949
+ * > INTEGER, INTENT(OUT) :: retval\n
2950
+ * > END SUBROUTINE\n
2951
+ *
2952
+ */
2953
+ LIBMMG3D_EXPORT int MMG3D_defaultValues(MMG5_pMesh mesh);
2954
+
2955
+ /**
2956
+ * \brief Store command-line arguments.
2957
+ *
2958
+ * \param argc number of command line arguments.
2959
+ * \param argv command line arguments.
2960
+ * \param mesh pointer to the mesh structure.
2961
+ * \param met pointer to a metric
2962
+ * \param sol pointer to a level-set or displacement
2963
+ * \return 1 if we want to run Mmg after, 0 if not or if fail.
2964
+ *
2965
+ * \remark no matching fortran function.
2966
+ *
2967
+ */
2968
+ LIBMMG3D_EXPORT int MMG3D_parsar(int argc,char *argv[],MMG5_pMesh mesh,MMG5_pSol met,MMG5_pSol sol);
2969
+
2970
+ /**
2971
+ * \brief Read a file containing Local parameters (.mmg3d extension)
2972
+ *
2973
+ * \param mesh pointer to the mesh structure.
2974
+ * \param met pointer to the sol structure.
2975
+ * \return 1.
2976
+ *
2977
+ * Read local parameters file. This file must have the same name as
2978
+ * the mesh with the \a .mmg3d extension or must be named \a
2979
+ * DEFAULT.mmg3d.
2980
+ *
2981
+ * \remark Fortran interface:
2982
+ * > SUBROUTINE MMG3D_PARSOP(mesh,met,retval)\n
2983
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met\n
2984
+ * > INTEGER, INTENT(OUT) :: retval\n
2985
+ * > END SUBROUTINE\n
2986
+ *
2987
+ */
2988
+ LIBMMG3D_EXPORT int MMG3D_parsop(MMG5_pMesh mesh,MMG5_pSol met);
2989
+
2990
+ /**
2991
+ * \brief Print help for mmg3d options.
2992
+ *
2993
+ * \param prog pointer to the program name.
2994
+ * \param return 1 if success, 0 if fail.
2995
+ *
2996
+ * \remark Fortran interface:
2997
+ * > SUBROUTINE MMG3D_USAGE(prog,strlen0,retval)\n
2998
+ * > CHARACTER(LEN=*), INTENT(IN) :: prog\n
2999
+ * > INTEGER, INTENT(IN) :: strlen0\n
3000
+ * > INTEGER, INTENT(OUT) :: retval\n
3001
+ * > END SUBROUTINE\n
3002
+ *
3003
+ */
3004
+ LIBMMG3D_EXPORT int MMG3D_usage(char *prog);
3005
+
3006
+ /**
3007
+ * \brief Store the info structure in the mesh structure.
3008
+ *
3009
+ * \param mesh pointer to the mesh structure.
3010
+ * \param info pointer to the info structure.
3011
+ * \return 1.
3012
+ *
3013
+ * \remark Fortran interface:
3014
+ * > SUBROUTINE MMG3D_STOCKOPTIONS(mesh,info,retval)\n
3015
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,info\n
3016
+ * > INTEGER, INTENT(OUT) :: retval\n
3017
+ * > END SUBROUTINE\n
3018
+ *
3019
+ */
3020
+ LIBMMG3D_EXPORT int MMG3D_stockOptions(MMG5_pMesh mesh, MMG5_Info *info);
3021
+
3022
+ /**
3023
+ * \brief Recover the info structure stored in the mesh structure.
3024
+ *
3025
+ * \param mesh pointer to the mesh structure.
3026
+ * \param info pointer to the info structure.
3027
+ *
3028
+ * \remark Fortran interface:
3029
+ * > SUBROUTINE MMG3D_DESTOCKOPTIONS(mesh,info)\n
3030
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,info\n
3031
+ * > END SUBROUTINE\n
3032
+ *
3033
+ */
3034
+ LIBMMG3D_EXPORT void MMG3D_destockOptions(MMG5_pMesh mesh, MMG5_Info *info);
3035
+
3036
+ /** Checks */
3037
+ /**
3038
+ * \brief Search invalid elements (in term of quality or edge length) in a mesh.
3039
+ *
3040
+ * \param mesh pointer to the mesh structure.
3041
+ * \param met pointer to the sol structure (metric).
3042
+ * \param sol pointer to the sol structure (ls or displacement).
3043
+ * \param critmin minimum quality for elements.
3044
+ * \param lmin minimum edge length.
3045
+ * \param lmax maximum ede length.
3046
+ * \param eltab array of invalid elements.
3047
+ * \param metRidTyp Type of storage of ridges metrics: 0 for classic storage
3048
+ * (before the MMG5_defsiz call), 1 for special storage (after this call).
3049
+ *
3050
+ * \remark Fortran interface:
3051
+ * > SUBROUTINE MMG3D_MMG3DCHECK(mesh,met,sol,critmin,lmin,lmax,eltab,&\n
3052
+ * > metridtyp,retval)\n
3053
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met,sol\n
3054
+ * > REAL(KIND=8), INTENT(IN) :: critmin,lmin,lmax\n
3055
+ * > INTEGER(MMG5F_INT),DIMENSION(*), INTENT(OUT) :: eltab\n
3056
+ * > INTEGER, INTENT(IN) :: metridtyp\n
3057
+ * > INTEGER, INTENT(OUT) :: retval\n
3058
+ * > END SUBROUTINE\n
3059
+ *
3060
+ */
3061
+ LIBMMG3D_EXPORT int MMG3D_mmg3dcheck(MMG5_pMesh mesh,MMG5_pSol met,MMG5_pSol sol,double critmin,
3062
+ double lmin, double lmax, MMG5_int *eltab,int8_t metRidTyp);
3063
+
3064
+ /**
3065
+ * \brief List bad elements.
3066
+ *
3067
+ * \param mesh pointer to the mesh structure.
3068
+ * \param met pointer to the sol structure.
3069
+ * \param critmin minimum quality for elements.
3070
+ * \param eltab pointer to the array of invalid elements.
3071
+ * \param metRidTyp Type of storage of ridges metrics: 0 for classic storage
3072
+ * (before the MMG5_defsiz call), 1 for special storage (after this call).
3073
+ *
3074
+ * Store elements which have worse quality than \a critmin in \a eltab,
3075
+ * \a eltab is allocated and could contain \a mesh->ne elements.
3076
+ *
3077
+ * \remark Fortran interface:
3078
+ * > SUBROUTINE MMG3D_SEARCHQUA(mesh,met,critmin,eltab,metridtyp)\n
3079
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met\n
3080
+ * > REAL(KIND=8), INTENT(IN) :: critmin\n
3081
+ * > INTEGER(MMG5F_INT),DIMENSION(*), INTENT(OUT) :: eltab\n
3082
+ * > INTEGER, INTENT(IN) :: metridtyp\n
3083
+ * > END SUBROUTINE\n
3084
+ *
3085
+ */
3086
+ LIBMMG3D_EXPORT void MMG3D_searchqua(MMG5_pMesh mesh, MMG5_pSol met, double critmin,
3087
+ MMG5_int *eltab,int8_t metRidTyp);
3088
+
3089
+ /**
3090
+ * \brief List edges that are too short or too long.
3091
+ *
3092
+ * \param mesh pointer to the mesh structure.
3093
+ * \param met pointer to the sol structure.
3094
+ * \param lmin minimum edge length.
3095
+ * \param lmax maximum ede length.
3096
+ * \param eltab array of invalid elements.
3097
+ * \param metRidTyp Type of storage of ridges metrics: 0 for classic storage
3098
+ * (before the MMG5_defsiz call), 1 for special storage (after this call).
3099
+ *
3100
+ * \return 1 if success, 0 otherwise.
3101
+ *
3102
+ * Store in \a eltab elements which have edge lengths shorter than \a lmin
3103
+ * or longer than \a lmax, \a eltab is allocated and could contain
3104
+ * \a mesh->ne elements.
3105
+ *
3106
+ * \remark Fortran interface:
3107
+ * > SUBROUTINE MMG3D_SEARCHLEN(mesh,met,lmin,lmax,eltab,metridtyp,retval)\n
3108
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met\n
3109
+ * > REAL(KIND=8), INTENT(IN) :: lmin,lmax\n
3110
+ * > INTEGER(MMG5F_INT),DIMENSION(*), INTENT(OUT) :: eltab\n
3111
+ * > INTEGER, INTENT(IN) :: metridtyp\n
3112
+ * > INTEGER, INTENT(OUT) :: retval\n
3113
+ * > END SUBROUTINE\n
3114
+ *
3115
+ *
3116
+ */
3117
+ LIBMMG3D_EXPORT int MMG3D_searchlen(MMG5_pMesh mesh, MMG5_pSol met, double lmin,
3118
+ double lmax,MMG5_int *eltab,int8_t metRidTyp);
3119
+
3120
+ /** Utils */
3121
+ /**
3122
+ * \brief Return adjacent elements of a tetrahedron.
3123
+ *
3124
+ * \param mesh pointer to the mesh structure.
3125
+ * \param kel tetrahedron index.
3126
+ * \param listet pointer to the array of the 4 tetra adjacent to \a kel.
3127
+ * (the index is 0 if there is no adjacent)
3128
+ * \return 1.
3129
+ *
3130
+ * Find the indices of the 4 adjacent elements of tetrahedron \a
3131
+ * kel. \f$listet[i] = 0\f$ if the \f$i^{th}\f$ face has no adjacent element
3132
+ * (so we are on a boundary face).
3133
+ *
3134
+ * \remark Fortran interface:
3135
+ * > SUBROUTINE MMG3D_GET_ADJATET(mesh,kel,listet,retval)\n
3136
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh\n
3137
+ * > INTEGER(MMG5F_INT), INTENT(IN) :: kel\n
3138
+ * > INTEGER(MMG5F_INT), DIMENSION(4), INTENT(OUT) :: listet\n
3139
+ * > INTEGER, INTENT(OUT) :: retval\n
3140
+ * > END SUBROUTINE\n
3141
+ *
3142
+ */
3143
+ LIBMMG3D_EXPORT int MMG3D_Get_adjaTet(MMG5_pMesh mesh,MMG5_int kel, MMG5_int listet[4]);
3144
+
3145
+ /**
3146
+ * \brief Compute the length of an edge according to the size prescription.
3147
+ *
3148
+ * \param ca pointer to the coordinates of the first edge's extremity.
3149
+ * \param cb pointer to the coordinates of the second edge's extremity.
3150
+ * \param ma pointer to the metric associated to the first edge's
3151
+ * extremity.
3152
+ * \param mb pointer to the metric associated to the second edge's
3153
+ * extremity.
3154
+ * \return edge length.
3155
+ *
3156
+ * Compute the length of edge \f$[ca,cb]\f$ (with \a ca and \a cb
3157
+ * coordinates of edge endpoints) according to the size
3158
+ * prescription.
3159
+ *
3160
+ * \remark Fortran interface:
3161
+ * > SUBROUTINE MMG3D_LENEDGCOOR(ca,cb,sa,sb,retval)\n
3162
+ * > REAL(KIND=8), INTENT(IN) :: ca,cb,sa,sb\n
3163
+ * > REAL(KIND=8), INTENT(OUT) :: retval\n
3164
+ * > END SUBROUTINE\n
3165
+ *
3166
+ */
3167
+ LIBMMG3D_EXPORT extern double (*MMG3D_lenedgCoor)(double *ca,double *cb,double *sa,double *sb);
3168
+
3169
+ /**
3170
+ * \brief Create array of adjacency.
3171
+ *
3172
+ * \param mesh pointer to the mesh structure.
3173
+ * \param pack we pack the mesh at function begining if \f$pack=1\f$.
3174
+ * \return 0 if failed, 1 otherwise.
3175
+ *
3176
+ * Create array of adjacency. Set pack variable to 0 for a compact
3177
+ * mesh and to 1 for a mesh that need to be packed.
3178
+ *
3179
+ * \remark Fortran interface:
3180
+ * > SUBROUTINE MMG3D_HASHTETRA(mesh,pack,retval)\n
3181
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh\n
3182
+ * > INTEGER, INTENT(IN) :: pack\n
3183
+ * > INTEGER, INTENT(OUT) :: retval\n
3184
+ * > END SUBROUTINE\n
3185
+ *
3186
+ */
3187
+ LIBMMG3D_EXPORT int MMG3D_hashTetra(MMG5_pMesh mesh, int pack);
3188
+
3189
+ /**
3190
+ * \brief Compute isotropic size map according to the mean of the length of the
3191
+ * edges passing through a vertex.
3192
+ *
3193
+ * \param mesh pointer to the mesh structure
3194
+ * \param met pointer to the sol structure
3195
+ * \return 1 if success
3196
+ *
3197
+ * \remark Fortran interface:
3198
+ * > SUBROUTINE MMG3D_DOSOL(mesh,met,retval)\n
3199
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met\n
3200
+ * > INTEGER, INTENT(OUT) :: retval\n
3201
+ * > END SUBROUTINE\n
3202
+ *
3203
+ */
3204
+ LIBMMG3D_EXPORT extern int (*MMG3D_doSol)(MMG5_pMesh mesh,MMG5_pSol met);
3205
+
3206
+ /**
3207
+ * \brief Compute a constant size map according to the hsiz, hmin and hmax parameters.
3208
+ *
3209
+ * \param mesh pointer to the mesh structure
3210
+ * \param met pointer to the sol structure
3211
+ * \return 1 if success
3212
+ *
3213
+ * This function computes a constant size map according to mesh->info.hsiz,
3214
+ * mesh->info.hmin and mesh->info.hmax. It updates these 3 values if not
3215
+ * compatible.
3216
+ *
3217
+ * \remark Fortran interface:
3218
+ * > SUBROUTINE MMG3D_SET_CONSTANTSIZE(mesh,met,retval)\n
3219
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met\n
3220
+ * > INTEGER, INTENT(OUT) :: retval\n
3221
+ * > END SUBROUTINE\n
3222
+ *
3223
+ */
3224
+ LIBMMG3D_EXPORT int MMG3D_Set_constantSize(MMG5_pMesh mesh,MMG5_pSol met);
3225
+
3226
+ /**
3227
+ * \brief Swap the m22 and m23 values of the metric.
3228
+ *
3229
+ * \param mesh pointer to the mesh structure
3230
+ * \param met pointer to the sol structure
3231
+ * \return 1 if success
3232
+ *
3233
+ * Switch the m22 and m23 value of the metric to allow to pass from the API
3234
+ * storage to the medit storage.
3235
+ *
3236
+ * \remark Fortran interface:
3237
+ * > SUBROUTINE MMG3D_SWITCH_METRICSTORAGE(mesh,met,retval)\n
3238
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met\n
3239
+ * > INTEGER, INTENT(OUT) :: retval\n
3240
+ * > END SUBROUTINE\n
3241
+ *
3242
+ */
3243
+ LIBMMG3D_EXPORT int MMG3D_switch_metricStorage(MMG5_pMesh mesh, MMG5_pSol met);
3244
+
3245
+
3246
+ /** To associate function pointers without calling MMG3D_mmg3dlib */
3247
+ /**
3248
+ * \brief Set function pointers for caltet, lenedg, lenedgCoor defsiz, gradsiz...
3249
+ * depending if the metric that was read is anisotropic or isotropic
3250
+ *
3251
+ * \param mesh pointer to the mesh structure (unused).
3252
+ * \param met pointer to the sol structure (unused).
3253
+ *
3254
+ * \remark Fortran interface:
3255
+ * > SUBROUTINE MMG3D_SETFUNC(mesh,met)\n
3256
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met\n
3257
+ * > END SUBROUTINE\n
3258
+ *
3259
+ */
3260
+ LIBMMG3D_EXPORT void MMG3D_setfunc(MMG5_pMesh mesh,MMG5_pSol met);
3261
+
3262
+ /**
3263
+ * \brief Get the number of non-boundary triangles.
3264
+ *
3265
+ * \param mesh pointer to the mesh structure.
3266
+ * \param nb_tria pointer to the number of non-boundary triangles.
3267
+ * \return 0 if failed, 1 otherwise.
3268
+ *
3269
+ * Get the number of non-boundary triangles (for DG methods for example).
3270
+ * A triangle is
3271
+ * boundary if it is located at the interface of 2 domains with different
3272
+ * references or if it belongs to one tetra only.
3273
+ * Append these triangles to the list of triangles.
3274
+ *
3275
+ * \warning reallocates the triangle array and appends the internal triangles.
3276
+ * This may modify the behaviour of other functions.
3277
+ *
3278
+ * \remark Fortran interface:
3279
+ * > SUBROUTINE MMG3D_GET_NUMBEROFNONBDYTRIANGLESS(mesh,nb_tria,retval)\n
3280
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
3281
+ * > INTEGER(MMG5F_INT), INTENT(OUT) :: nb_tria\n
3282
+ * > INTEGER, INTENT(OUT) :: retval\n
3283
+ * > END SUBROUTINE\n
3284
+ *
3285
+ */
3286
+ LIBMMG3D_EXPORT int MMG3D_Get_numberOfNonBdyTriangles(MMG5_pMesh mesh, MMG5_int* nb_tria);
3287
+
3288
+ /**
3289
+ * \brief Get vertices and reference of a non-boundary triangle.
3290
+ *
3291
+ * \param mesh pointer to the mesh structure.
3292
+ * \param v0 pointer to the firts vertex of the triangle
3293
+ * \param v1 pointer to the second vertex of the triangle.
3294
+ * \param v2 pointer to the third vertex of the triangle.
3295
+ * \param ref pointer to the triangle reference.
3296
+ * \param idx index of the non-boundary triangle to get (between 1 and nb_tria)
3297
+ * \return 0 if failed, 1 otherwise.
3298
+ *
3299
+ * Get vertices and reference \a ref of the idx^th non-boundary
3300
+ * triangle (for DG methods for example). A tria is boundary if it is located at
3301
+ * the interface of 2 domains with different references or if it belongs to one
3302
+ * tetra only.
3303
+ *
3304
+ * \remark Fortran interface:
3305
+ * > SUBROUTINE MMG3D_GET_NONBDYTRIANGLE(mesh,v0,v1,v2,ref,idx,retval)\n
3306
+ * > MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh\n
3307
+ * > INTEGER(MMG5F_INT), INTENT(OUT):: v0,v1,v2\n
3308
+ * > INTEGER(MMG5F_INT) :: ref\n
3309
+ * > INTEGER(MMG5F_INT), INTENT(IN) :: idx\n
3310
+ * > INTEGER, INTENT(OUT) :: retval\n
3311
+ * > END SUBROUTINE\n
3312
+ *
3313
+ */
3314
+ LIBMMG3D_EXPORT int MMG3D_Get_nonBdyTriangle(MMG5_pMesh mesh, MMG5_int* v0, MMG5_int* v1, MMG5_int* v2, MMG5_int* ref, MMG5_int idx);
3315
+
3316
+ /**
3317
+ * \brief Get a tetrahedron given one of its triangles and the index by which it
3318
+ * refers to this triangle (DEPRECATED).
3319
+ *
3320
+ * \param mesh pointer to the mesh structure.
3321
+ * \param ktri index of the boundary triangle.
3322
+ * \param ktet pointer to an integer that will contains the tetra index.
3323
+ * \param iface pointer to the triangle in \a ktet.
3324
+ *
3325
+ * \return 0 if fail, 1 otherwise
3326
+ *
3327
+ * Fill \a ktet by the index of a tetrahedron to which belongs a boundary triangle
3328
+ * and \a iface by the index of the triangle in the tetra.
3329
+ *
3330
+ * \warning will be deprecated in release 5.5
3331
+ *
3332
+ * \remark Fortran interface:
3333
+ * > SUBROUTINE MMG3D_GET_TETFROMTRIA(mesh,ktri,ktet,iface,retval)\n
3334
+ * > MMG5_DATA_PTR_T, INTENT(IN) :: mesh\n
3335
+ * > INTEGER(MMG5F_INT), INTENT(IN) :: ktri\n
3336
+ * > INTEGER(MMG5F_INT), INTENT(OUT) :: ktet\n
3337
+ * > INTEGER, INTENT(OUT) :: iface\n
3338
+ * > INTEGER, INTENT(OUT) :: retval\n
3339
+ * > END SUBROUTINE\n
3340
+ *
3341
+ */
3342
+ LIBMMG3D_EXPORT int MMG3D_Get_tetFromTria(MMG5_pMesh mesh, MMG5_int ktri, MMG5_int *ktet, int *iface);
3343
+
3344
+ /**
3345
+ * \brief Get two tetrahedra given a triangle and face indices.
3346
+ *
3347
+ * \param mesh pointer to the mesh structure.
3348
+ * \param ktri index of the boundary triangle.
3349
+ * \param ktet array of size 2 that will contain the indices of the tetra
3350
+ * (filled by the function).
3351
+ * \param iface pointer to an array of size 2 that will contains the indices
3352
+ * of the faces of the tetras \a ktet[i] that corresponds to the boundary tria
3353
+ * \a ktri.
3354
+ *
3355
+ * \return 0 if fail, 1 otherwise
3356
+ *
3357
+ * Fill \a ktet by the indices of the tetrahedra that have a boundary triangle
3358
+ * and \a iface by the indices of the faces of the tetras that correspond to the
3359
+ * triangle. Fill ktet[1] and iface[1] by 0 if the triangle belongs to 1 tetrahedron only.
3360
+ *
3361
+ * \remark Fortran interface:
3362
+ * > SUBROUTINE MMG3D_GET_TETSFROMTRIA(mesh,ktri,ktet,iface,retval)\n
3363
+ * > MMG5_DATA_PTR_T, INTENT(IN) :: mesh\n
3364
+ * > INTEGER(MMG5F_INT), INTENT(IN) :: ktri\n
3365
+ * > INTEGER(MMG5F_INT), DIMENSION(2), INTENT(OUT):: ktet\n
3366
+ * > INTEGER, DIMENSION(2), INTENT(OUT) :: iface\n
3367
+ * > INTEGER, INTENT(OUT) :: retval\n
3368
+ * > END SUBROUTINE\n
3369
+ *
3370
+ */
3371
+ LIBMMG3D_EXPORT int MMG3D_Get_tetsFromTria(MMG5_pMesh mesh, MMG5_int ktri, MMG5_int ktet[2], int iface[2]);
3372
+
3373
+ /**
3374
+ * \brief Compute the real eigenvalues and eigenvectors of a symmetric matrix
3375
+ *
3376
+ * \param m upper part of a symmetric matrix diagonalizable in |R
3377
+ * \param lambda array of the metric eigenvalues
3378
+ * \param vp array of the metric eigenvectors
3379
+ *
3380
+ * \return the order of the eigenvalues
3381
+ *
3382
+ * Compute the real eigenvalues and eigenvectors of a symmetric matrix m whose
3383
+ * upper part is provided (m11, m12, m13, m22, m23, m33 in this order).
3384
+ *
3385
+ * lambda[0] is the eigenvalue associated to the eigenvector ( v[0][0], v[0,1], v[0,2] )
3386
+ * in C and to the eigenvector v(1,:) in fortran
3387
+ *
3388
+ * lambda[1] is the eigenvalue associated to the eigenvector ( v[1][0], v[1,1], v[1,2] )
3389
+ * in C and to the eigenvector v(2,:) in fortran
3390
+ *
3391
+ * lambda[2] is the eigenvalue associated to the eigenvector ( v[2][0], v[2,1], v[2,2] )
3392
+ * in C and to the eigenvector v(3,:) in fortran
3393
+ *
3394
+ * \remark Fortran interface:
3395
+ * > SUBROUTINE MMG3D_COMPUTE_EIGENV(m,lambda,vp,retval)\n
3396
+ * > REAL(KIND=8), INTENT(IN) :: m(*)\n
3397
+ * > REAL(KIND=8), INTENT(OUT) :: lambda(*),vp(*)\n
3398
+ * > INTEGER, INTENT(OUT) :: retval\n
3399
+ * > END SUBROUTINE\n
3400
+ *
3401
+ */
3402
+ LIBMMG3D_EXPORT int MMG3D_Compute_eigenv(double m[6],double lambda[3],double vp[3][3]);
3403
+
3404
+ /**
3405
+ * \brief Clean data (triangles and edges) linked to isosurface.
3406
+ *
3407
+ * \param mesh pointer to the mesh structure
3408
+ *
3409
+ * \return 1 if successful, 0 otherwise.
3410
+ *
3411
+ * \remark Fortran interface:
3412
+ * > SUBROUTINE MMG3D_CLEAN_ISOSURF(mesh,retval)\n
3413
+ * > MMG5_DATA_PTR_T, INTENT(IN) :: mesh\n
3414
+ * > INTEGER, INTENT(OUT) :: retval\n
3415
+ * > END SUBROUTINE\n
3416
+ *
3417
+ */
3418
+ LIBMMG3D_EXPORT int MMG3D_Clean_isoSurf(MMG5_pMesh mesh);
3419
+
3420
+ /**
3421
+ * \brief Free the solution structure of a given mesh.
3422
+ *
3423
+ * \param mesh pointer to the mesh structure
3424
+ * \param sol pointer to the solution structure
3425
+ *
3426
+ * \remark Fortran interface:
3427
+ * > SUBROUTINE MMG3D_FREE_SOLUTIONS(mesh,sol)\n
3428
+ * > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol\n
3429
+ * > END SUBROUTINE\n
3430
+ *
3431
+ */
3432
+ LIBMMG3D_EXPORT void MMG3D_Free_solutions(MMG5_pMesh mesh,MMG5_pSol sol);
3433
+
3434
+
3435
+ /**
3436
+ * Set common pointer functions between mmgs and mmg3d to the matching mmg3d
3437
+ * functions.
3438
+ */
3439
+ LIBMMG3D_EXPORT void MMG3D_Set_commonFunc(void);
3440
+ #ifdef __cplusplus
3441
+ }
3442
+ #endif
3443
+
3444
+ #endif