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,3028 @@
1
+ ! /* This file is automatically generated by the"genheader.c" code
2
+ ! ** and the "genfort.pl" script (scripts directory).
3
+ ! ** Do not modified it by hand, it will be discarded.
4
+ ! **
5
+ ! ** This scripts recopy the macros of the libmmg*.h file
6
+ ! ** and convert enumerations into macros.
7
+ ! **
8
+ ! ** Note: "genfort.pl" is automatically called by the "genheader.c"
9
+ ! ** executable code.
10
+ ! **
11
+ ! ** See the "libmmg*.h" file for a correct displaying of the documentation.
12
+ ! */
13
+
14
+ #include "mmg/common/libmmgtypesf.h"
15
+
16
+ ! /* =============================================================================
17
+ ! ** This file is part of the mmg software package for the tetrahedral
18
+ ! ** mesh modification.
19
+ ! ** Copyright (c) Bx INP/CNRS/Inria/UBordeaux/UPMC, 2004-
20
+ ! **
21
+ ! ** mmg is free software: you can redistribute it and/or modify it
22
+ ! ** under the terms of the GNU Lesser General Public License as published
23
+ ! ** by the Free Software Foundation, either version 3 of the License, or
24
+ ! ** (at your option) any later version.
25
+ ! **
26
+ ! ** mmg is distributed in the hope that it will be useful, but WITHOUT
27
+ ! ** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
28
+ ! ** FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
29
+ ! ** License for more details.
30
+ ! **
31
+ ! ** You should have received a copy of the GNU Lesser General Public
32
+ ! ** License and of the GNU General Public License along with mmg (in
33
+ ! ** files COPYING.LESSER and COPYING). If not, see
34
+ ! ** <http://www.gnu.org/licenses/>. Please read their terms carefully and
35
+ ! ** use this copy of the mmg distribution only if you accept them.
36
+ ! ** =============================================================================
37
+ ! */
38
+
39
+
40
+ ! /*
41
+ ! * This file defines the C and Fortran headers of the mmgs API, and
42
+ ! * their Doxygen documentation.
43
+ ! *
44
+ ! * NOTES FOR DEVELOPERS:
45
+ ! *
46
+ ! * - The Fortran headers are generated from comment lines that start with '* >'.
47
+ ! * They must match the C declarations.
48
+ ! *
49
+ ! * - We cannot handle enum types in the Fortran version so enums are replaced
50
+ ! * by ints in both versions.
51
+ ! *
52
+ ! * - To keep the genheader program working, don't break line between an enum
53
+ ! * name and the opening brace (it creates errors under windows)
54
+ ! *
55
+ ! * - Since Mmg version 5,
56
+ ! * -- data structures and parameters that are common between mmg3d, mmg2d
57
+ ! * and mmgs use the MMG5_ prefix;
58
+ ! * -- API functions should have an MMG3D_, MMG2D_, or MMGS_ prefix,
59
+ ! * depending on the library; and
60
+ ! * -- some MMG5_ API functions exists but they are common to the
61
+ ! * three libraries.
62
+ ! *
63
+ ! */
64
+
65
+
66
+ ! /**
67
+ ! * \file mmgs/libmmgs.h
68
+ ! * \ingroup API
69
+ ! * \brief API headers and documentation for the mmgs library
70
+ ! * \author Algiane Froehly (Inria/UBordeaux)
71
+ ! * \version 5
72
+ ! * \date 01 2014
73
+ ! * \copyright GNU Lesser General Public License.
74
+ ! *
75
+ ! * These are the API functions for the mmgs library. These functions allow to
76
+ ! * load and save meshes and data defined on meshes; add, extract, or modify mesh
77
+ ! * data; and to call the library functions that perform remeshing and level-set
78
+ ! * discretization.
79
+ ! *
80
+ ! * Meshes are here defined in terms of vertices and two-dimensional objects:
81
+ ! * triangles and quadrangles, which live in 3D space. Edges can also be
82
+ ! * represented. All of these \a entities can have a \a reference: an integer
83
+ ! * value that can serve as a group identifier. In addition mesh entities can
84
+ ! * have \a attributes such as "required" or "corner".
85
+ ! *
86
+ ! * Data defined on meshes can be for example functions that are meant for
87
+ ! * level-set discretization and metric tensors that will govern edge
88
+ ! * lengths. These data can be scalar, vector, or (symmetric) tensor-valued; and
89
+ ! * there can be more than one data item associated with a mesh entity. These
90
+ ! * data are often referred to as \a solutions.
91
+ ! *
92
+ ! * Two of the functions here are referred to as "programs", because they perform
93
+ ! * the tasks for which mmgs is meant: meshing and level-set discretization. The
94
+ ! * other functions merely serve to load and save data and to perform pre- and
95
+ ! * post-processing. These programs actually behave much like independent
96
+ ! * programs: they send diagnostic output to stdout and in rare cases they may
97
+ ! * call the exit() function.
98
+ ! *
99
+ ! */
100
+
101
+
102
+ #ifndef MMGSLIB_H
103
+ #define MMGSLIB_H
104
+
105
+
106
+ ! #ifdef __cplusplus
107
+ ! extern "C" {
108
+ ! #endif
109
+
110
+ ! #include "mmg/mmgs/mmgs_export.h"
111
+ ! #include "mmg/common/libmmgtypes.h"
112
+
113
+ ! /**
114
+ ! * Maximum array size when storing adjacent vertices (or ball) of a vertex.
115
+ ! */
116
+
117
+ #define MMGS_LMAX 1024
118
+
119
+ ! /**
120
+ ! * \enum MMGS_Param
121
+ ! * \brief Input parameters for mmg library.
122
+ ! *
123
+ ! * Input parameters for mmg library. Options prefixed by \a
124
+ ! * MMGS_IPARAM asked for integers values ans options prefixed by \a
125
+ ! * MMGS_DPARAM asked for real values.
126
+ ! *
127
+ ! */
128
+
129
+ ! /*!< [-1..10] Level of verbosity */
130
+ #define MMGS_IPARAM_verbose 0
131
+ ! /*!< [n/-1] Max memory size in MBytes or -1 to keep the default value */
132
+ #define MMGS_IPARAM_mem 1
133
+ ! /*!< [1/0] Turn on/off debug mode */
134
+ #define MMGS_IPARAM_debug 2
135
+ ! /*!< [1/0] Turn on/off angle detection */
136
+ #define MMGS_IPARAM_angle 3
137
+ ! /*!< [1/0] Enable level-set discretization */
138
+ #define MMGS_IPARAM_iso 4
139
+ ! /*!< [1/0] Enable level-set discretization on the surface part */
140
+ #define MMGS_IPARAM_isosurf 5
141
+ ! /*!< [0/n] Iso-surface boundary material reference */
142
+ #define MMGS_IPARAM_isoref 6
143
+ ! /*!< [1/0] Preserve the initial domain references in level-set mode */
144
+ #define MMGS_IPARAM_keepRef 7
145
+ ! /*!< [1/0] Optimize mesh keeping its initial edge sizes */
146
+ #define MMGS_IPARAM_optim 8
147
+ ! /*!< [1/0] Avoid/allow vertex insertion */
148
+ #define MMGS_IPARAM_noinsert 9
149
+ ! /*!< [1/0] Avoid/allow edge or face flipping */
150
+ #define MMGS_IPARAM_noswap 10
151
+ ! /*!< [1/0] Avoid/allow vertex relocation */
152
+ #define MMGS_IPARAM_nomove 11
153
+ ! /*!< [0/1] Disable/enable regularization of normals */
154
+ #define MMGS_IPARAM_nreg 12
155
+ ! /*!< [0/1] Disable/enable regularization by moving vertices */
156
+ #define MMGS_IPARAM_xreg 13
157
+ ! /*!< [n] Number of local parameters */
158
+ #define MMGS_IPARAM_numberOfLocalParam 14
159
+ ! /*!< [n] Number of base references for bubble removal */
160
+ #define MMGS_IPARAM_numberOfLSBaseReferences 15
161
+ ! /*!< [n] Number of material in level-set mode */
162
+ #define MMGS_IPARAM_numberOfMat 16
163
+ ! /*!< [0/n] Save only subdomain n (0==all subdomains) */
164
+ #define MMGS_IPARAM_numsubdomain 17
165
+ ! /*!< [1/0] Turn on/off renumbering with Scotch */
166
+ #define MMGS_IPARAM_renum 18
167
+ ! /*!< [1/0] Turn on/off anisotropic metric creation when no metric is provided */
168
+ #define MMGS_IPARAM_anisosize 19
169
+ ! /*!< [0/1] Allow/avoid overwritings of sizes at required vertices (advanced usage) */
170
+ #define MMGS_IPARAM_nosizreq 20
171
+ ! /*!< [val] Threshold for angle detection */
172
+ #define MMGS_DPARAM_angleDetection 21
173
+ ! /*!< [val] Minimal edge length */
174
+ #define MMGS_DPARAM_hmin 22
175
+ ! /*!< [val] Maximal edge length */
176
+ #define MMGS_DPARAM_hmax 23
177
+ ! /*!< [val] Constant edge length */
178
+ #define MMGS_DPARAM_hsiz 24
179
+ ! /*!< [val] Global Hausdorff distance (on all the boundary surfaces of the mesh) */
180
+ #define MMGS_DPARAM_hausd 25
181
+ ! /*!< [val] Gradation */
182
+ #define MMGS_DPARAM_hgrad 26
183
+ ! /*!< [val] Gradation on required entites (advanced usage) */
184
+ #define MMGS_DPARAM_hgradreq 27
185
+ ! /*!< [val] Function value where the level set is to be discretized */
186
+ #define MMGS_DPARAM_ls 28
187
+ ! /*!< [val] Relaxation parameter for coordinate regularization (0<val<1) */
188
+ #define MMGS_DPARAM_xreg 29
189
+ ! /*!< [-1/val] Remove small disconnected components in level-set mode */
190
+ #define MMGS_DPARAM_rmc 30
191
+ ! /*!< [n] Number of parameters */
192
+ #define MMGS_PARAM_size 31
193
+
194
+ ! /*----------------------------- function headers -----------------------------*/
195
+ ! /* Initialization functions */
196
+ ! /* init structures */
197
+ ! /**
198
+ ! * \brief Initialize a mesh structure and optionally the associated solution and
199
+ ! * metric structures.
200
+ ! *
201
+ ! * \param starter dummy argument used to initialize the variadic argument list
202
+ ! * \param ... variadic arguments.
203
+ ! *
204
+ ! * For the MMGS_mmgslib function, you need
205
+ ! * to call the \ref MMGS_Init_mesh function with the following arguments :
206
+ ! * MMGS_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppMet,
207
+ ! * &your_metric,MMG5_ARG_end).
208
+ ! *
209
+ ! * For the \ref MMGS_mmgsls function, you need
210
+ ! * to call the \a MMGS_Init_mesh function with the following arguments :
211
+ ! * MMGS_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppLs,
212
+ ! * &your_level_set,MMG5_ARG_end).
213
+ ! *
214
+ ! * Here, \a your_mesh is a \ref MMG5_pMesh, \a your_metric and \a your_level_set
215
+ ! * are \ref MMG5_pSol.
216
+ ! *
217
+ ! * \return 1 on success, 0 on failure
218
+ ! *
219
+ ! * \remark No fortran interface, to allow variadic arguments.
220
+ ! *
221
+ ! */
222
+
223
+ ! LIBMMGS_EXPORT int MMGS_Init_mesh(const int starter,...);
224
+
225
+ ! /**
226
+ ! * \brief Initialize file names to their default values.
227
+ ! *
228
+ ! * \param mesh pointer to the mesh structure.
229
+ ! * \param sol pointer to the sol structure.
230
+ ! *
231
+ ! * \remark Fortran interface:
232
+ ! */
233
+ INTERFACE
234
+ SUBROUTINE MMGS_INIT_FILENAMES(mesh,sol)
235
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
236
+ END SUBROUTINE
237
+ END INTERFACE
238
+ ! *
239
+ ! */
240
+
241
+ ! LIBMMGS_EXPORT void MMGS_Init_fileNames(MMG5_pMesh mesh, MMG5_pSol sol);
242
+
243
+ ! /**
244
+ ! * \brief Initialize the input parameters.
245
+ ! *
246
+ ! * \param mesh pointer to the mesh structure.
247
+ ! *
248
+ ! * Initialization of the input parameters (stored in the Info structure).
249
+ ! *
250
+ ! * \remark Fortran interface:
251
+ ! */
252
+ INTERFACE
253
+ SUBROUTINE MMGS_INIT_PARAMETERS(mesh)
254
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
255
+ END SUBROUTINE
256
+ END INTERFACE
257
+ ! *
258
+ ! */
259
+
260
+ ! LIBMMGS_EXPORT void MMGS_Init_parameters(MMG5_pMesh mesh);
261
+
262
+ ! /* init file names */
263
+ ! /**
264
+ ! * \brief Set the name of the input mesh.
265
+ ! *
266
+ ! * \param mesh pointer to the mesh structure.
267
+ ! * \param meshin input mesh name.
268
+ ! * \return 1.
269
+ ! *
270
+ ! * \remark Fortran interface:
271
+ ! */
272
+ INTERFACE
273
+ SUBROUTINE MMGS_SET_INPUTMESHNAME(mesh,meshin,strlen0,retval)
274
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
275
+ CHARACTER(LEN=*), INTENT(IN) :: meshin
276
+ INTEGER, INTENT(IN) :: strlen0
277
+ INTEGER, INTENT(OUT) :: retval
278
+ END SUBROUTINE
279
+ END INTERFACE
280
+ ! *
281
+ ! */
282
+
283
+ ! LIBMMGS_EXPORT int MMGS_Set_inputMeshName(MMG5_pMesh mesh, const char* meshin);
284
+
285
+ ! /**
286
+ ! * \brief Set the name of the output mesh file.
287
+ ! *
288
+ ! * \param mesh pointer to the mesh structure.
289
+ ! * \param meshout name of the output mesh file.
290
+ ! * \return 1.
291
+ ! *
292
+ ! * \remark Fortran interface:
293
+ ! */
294
+ INTERFACE
295
+ SUBROUTINE MMGS_SET_OUTPUTMESHNAME(mesh,meshout,strlen0,retval)
296
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
297
+ CHARACTER(LEN=*), INTENT(IN) :: meshout
298
+ INTEGER, INTENT(IN) :: strlen0
299
+ INTEGER, INTENT(OUT) :: retval
300
+ END SUBROUTINE
301
+ END INTERFACE
302
+ ! *
303
+ ! */
304
+
305
+ ! LIBMMGS_EXPORT int MMGS_Set_outputMeshName(MMG5_pMesh mesh, const char* meshout);
306
+
307
+ ! /**
308
+ ! * \brief Set the name of the input solution file.
309
+ ! *
310
+ ! * \param mesh pointer to the mesh structure.
311
+ ! * \param sol pointer to the sol structure.
312
+ ! * \param solin name of the input solution file.
313
+ ! * \return 1.
314
+ ! *
315
+ ! * \remark Fortran interface:
316
+ ! */
317
+ INTERFACE
318
+ SUBROUTINE MMGS_SET_INPUTSOLNAME(mesh,sol,solin,strlen0,retval)
319
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
320
+ CHARACTER(LEN=*), INTENT(IN) :: solin
321
+ INTEGER, INTENT(IN) :: strlen0
322
+ INTEGER, INTENT(OUT) :: retval
323
+ END SUBROUTINE
324
+ END INTERFACE
325
+ ! *
326
+ ! */
327
+
328
+ ! LIBMMGS_EXPORT int MMGS_Set_inputSolName(MMG5_pMesh mesh,MMG5_pSol sol, const char* solin);
329
+
330
+ ! /**
331
+ ! * \brief Set the name of the output solution file.
332
+ ! *
333
+ ! * \param mesh pointer to the mesh structure.
334
+ ! * \param sol pointer to the sol structure.
335
+ ! * \param solout name of the output solution file.
336
+ ! * \return 0 on failure, 1 otherwise.
337
+ ! *
338
+ ! * \remark Fortran interface:
339
+ ! */
340
+ INTERFACE
341
+ SUBROUTINE MMGS_SET_OUTPUTSOLNAME(mesh,sol,solout,strlen0,retval)
342
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
343
+ CHARACTER(LEN=*), INTENT(IN) :: solout
344
+ INTEGER, INTENT(IN) :: strlen0
345
+ INTEGER, INTENT(OUT) :: retval
346
+ END SUBROUTINE
347
+ END INTERFACE
348
+ ! *
349
+ ! */
350
+
351
+ ! LIBMMGS_EXPORT int MMGS_Set_outputSolName(MMG5_pMesh mesh,MMG5_pSol sol, const char* solout);
352
+
353
+ ! /**
354
+ ! * \brief Set the name of the input parameter file.
355
+ ! *
356
+ ! * \param mesh pointer to the mesh structure.
357
+ ! * \param fparamin name of the input parameter file.
358
+ ! * \return 1.
359
+ ! *
360
+ ! * \remark Fortran interface:
361
+ ! */
362
+ INTERFACE
363
+ SUBROUTINE MMGS_SET_INPUTPARAMNAME(mesh,fparamin,strlen0,retval)
364
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
365
+ CHARACTER(LEN=*), INTENT(IN) :: fparamin
366
+ INTEGER, INTENT(IN) :: strlen0
367
+ INTEGER, INTENT(OUT) :: retval
368
+ END SUBROUTINE
369
+ END INTERFACE
370
+ ! *
371
+ ! */
372
+
373
+ ! LIBMMGS_EXPORT int MMGS_Set_inputParamName(MMG5_pMesh mesh, const char* fparamin);
374
+
375
+ ! /* init structure sizes */
376
+ ! /**
377
+ ! * \brief Initialize an array of solution fields: set dimension, types and
378
+ ! * number of fields.
379
+ ! *
380
+ ! * \param mesh pointer to the mesh structure.
381
+ ! * \param sol pointer to the sol structure.
382
+ ! * \param typEntity types of solution entities (vertices, triangles, ...
383
+ ! * see \ref MMG5_entities for possible values).
384
+ ! * \param np number of solutions.
385
+ ! * \param typSol type of solution (scalar, vectorial, ..., see \ref MMG5_type for possible values)
386
+ ! * \return 0 on failure, 1 otherwise.
387
+ ! *
388
+ ! * To use to initialize an array of solution fields (not used by Mmg itself).
389
+ ! *
390
+ ! * \remark Fortran interface:
391
+ ! */
392
+ INTERFACE
393
+ SUBROUTINE MMGS_SET_SOLSIZE(mesh,sol,typEntity,np,typSol,retval)
394
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
395
+ INTEGER, INTENT(IN) :: typEntity,typSol
396
+ INTEGER(MMG5F_INT), INTENT(IN):: np
397
+ INTEGER, INTENT(OUT) :: retval
398
+ END SUBROUTINE
399
+ END INTERFACE
400
+ ! *
401
+ ! */
402
+
403
+ ! LIBMMGS_EXPORT int MMGS_Set_solSize(MMG5_pMesh mesh, MMG5_pSol sol, int typEntity, MMG5_int np, int typSol);
404
+
405
+ ! /**
406
+ ! * \brief Initialize an array of solution fields defined at vertices: set
407
+ ! * dimension, types and number of fields.
408
+ ! *
409
+ ! * \param mesh pointer to the mesh structure.
410
+ ! * \param sol pointer to an allocatable sol structure.
411
+ ! * \param nsols number of solutions per entity
412
+ ! * \param nentities number of entities
413
+ ! * \param typSol Array of size nsol listing the type of the solutions
414
+ ! * (scalar, vectorial, ..., see \ref MMG5_type for possible values)
415
+ ! * \return 0 on failure, 1 otherwise.
416
+ ! *
417
+ ! * To use to initialize an array of solution fields (not used by Mmg itself).
418
+ ! *
419
+ ! * \remark Fortran interface:
420
+ ! */
421
+ INTERFACE
422
+ SUBROUTINE MMGS_SET_SOLSATVERTICESSIZE(mesh,sol,nsols,nentities,typSol,retval)
423
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
424
+ INTEGER, INTENT(IN) :: nsols
425
+ INTEGER(MMG5F_INT), INTENT(IN):: nentities
426
+ INTEGER, INTENT(IN) :: typSol(*)
427
+ INTEGER, INTENT(OUT) :: retval
428
+ END SUBROUTINE
429
+ END INTERFACE
430
+ ! *
431
+ ! */
432
+
433
+ ! LIBMMGS_EXPORT int MMGS_Set_solsAtVerticesSize(MMG5_pMesh mesh, MMG5_pSol *sol,int nsols,
434
+ ! MMG5_int nentities, int *typSol);
435
+
436
+ ! /**
437
+ ! * \brief Set the number of vertices, triangles and edges of the
438
+ ! * mesh and allocate the associated tables.
439
+ ! *
440
+ ! * \param mesh pointer to the mesh structure.
441
+ ! * \param np number of vertices.
442
+ ! * \param nt number of triangles.
443
+ ! * \param na number of edges.
444
+ ! * \return 0 on failure, 1 otherwise.
445
+ ! *
446
+ ! * If called again, this function resets the
447
+ ! * whole mesh to reallocate it at the new size
448
+ ! *
449
+ ! * \remark Fortran interface:
450
+ ! */
451
+ INTERFACE
452
+ SUBROUTINE MMGS_SET_MESHSIZE(mesh,np,nt,na,retval)
453
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
454
+ INTEGER(MMG5F_INT) :: np,nt,na
455
+ INTEGER, INTENT(OUT) :: retval
456
+ END SUBROUTINE
457
+ END INTERFACE
458
+ ! *
459
+ ! */
460
+
461
+ ! LIBMMGS_EXPORT int MMGS_Set_meshSize(MMG5_pMesh mesh, MMG5_int np, MMG5_int nt, MMG5_int na);
462
+
463
+ ! /* init structure data */
464
+ ! /**
465
+ ! * \brief Set the coordinates of a single vertex.
466
+ ! *
467
+ ! * \param mesh pointer to the mesh structure.
468
+ ! * \param c0 coordinate of the vertex along the first dimension.
469
+ ! * \param c1 coordinate of the vertex along the second dimension.
470
+ ! * \param c2 coordinate of the vertex along the third dimension.
471
+ ! * \param ref vertex reference.
472
+ ! * \param pos position of the vertex in the mesh.
473
+ ! * \return 1.
474
+ ! *
475
+ ! * \brief Set vertex coordinates \a c0, \a c1,\a c2 and reference \a ref at
476
+ ! * position \a pos in the mesh structure (\a pos from 1 to the number of
477
+ ! * vertices included).
478
+ ! *
479
+ ! * \remark Fortran interface:
480
+ ! */
481
+ INTERFACE
482
+ SUBROUTINE MMGS_SET_VERTEX(mesh,c0,c1,c2,ref,pos,retval)
483
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
484
+ REAL(KIND=8), INTENT(IN) :: c0,c1,c2
485
+ INTEGER(MMG5F_INT), INTENT(IN):: ref,pos
486
+ INTEGER, INTENT(OUT) :: retval
487
+ END SUBROUTINE
488
+ END INTERFACE
489
+ ! *
490
+ ! */
491
+
492
+ ! LIBMMGS_EXPORT int MMGS_Set_vertex(MMG5_pMesh mesh, double c0, double c1,
493
+ ! double c2, MMG5_int ref, MMG5_int pos);
494
+
495
+ ! /**
496
+ ! * \brief Set the coordinates and references of all vertices in a mesh
497
+ ! *
498
+ ! * \param mesh pointer to the mesh structure.
499
+ ! * \param vertices array of vertex coordinates in the order
500
+ ! * \f$[x_1, y_1, z_1, x_2, \ldots, z_N]\f$ where \f$N\f$ is the number of vertices.
501
+ ! * \param refs array of references.
502
+ ! * The reference of vertex \f$i\f$ is stored in refs[\f$i-1\f$].
503
+ ! * \return 1.
504
+ ! *
505
+ ! * \remark Fortran interface: (commentated in order to allow to pass
506
+ ! * \%val(0) instead of the refs array)
507
+ ! */
508
+ INTERFACE
509
+ ! SUBROUTINE MMGS_SET_VERTICES(mesh,vertices,refs,retval)
510
+ ! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
511
+ ! REAL(KIND=8), DIMENSION(*),INTENT(IN) :: vertices
512
+ ! INTEGER(MMG5F_INT),DIMENSION(*), INTENT(IN) :: refs
513
+ ! INTEGER, INTENT(OUT) :: retval
514
+ ! END SUBROUTINE
515
+ END INTERFACE
516
+ ! *
517
+ ! */
518
+
519
+ ! LIBMMGS_EXPORT int MMGS_Set_vertices(MMG5_pMesh mesh, double *vertices,MMG5_int *refs);
520
+
521
+ ! /**
522
+ ! * \brief Set the coordinates and reference of a single triangle.
523
+ ! *
524
+ ! * \param mesh pointer to the mesh structure.
525
+ ! * \param v0 first vertex of triangle.
526
+ ! * \param v1 second vertex of triangle.
527
+ ! * \param v2 third vertex of triangle.
528
+ ! * \param ref triangle reference.
529
+ ! * \param pos triangle position in the mesh.
530
+ ! * \return 0 on failure, 1 otherwise.
531
+ ! *
532
+ ! * This function sets a triangle with vertices \a v0, \a v1, \a v2 and reference
533
+ ! * \a ref at position \a pos in the mesh structure (\a pos from 1 to the number
534
+ ! * of triangles included).
535
+ ! *
536
+ ! * \remark Fortran interface:
537
+ ! */
538
+ INTERFACE
539
+ SUBROUTINE MMGS_SET_TRIANGLE(mesh,v0,v1,v2,ref,pos,retval)
540
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
541
+ INTEGER(MMG5F_INT), INTENT(IN):: v0,v1,v2,ref,pos
542
+ INTEGER, INTENT(OUT) :: retval
543
+ END SUBROUTINE
544
+ END INTERFACE
545
+ ! *
546
+ ! */
547
+
548
+ ! LIBMMGS_EXPORT int MMGS_Set_triangle(MMG5_pMesh mesh, MMG5_int v0, MMG5_int v1,
549
+ ! MMG5_int v2, MMG5_int ref,MMG5_int pos);
550
+
551
+ ! /**
552
+ ! * \brief Set the vertices and references of all triangles in the mesh.
553
+ ! *
554
+ ! * \param mesh pointer to the mesh structure.
555
+ ! * \param tria pointer to an array of vertex numbers
556
+ ! * Vertices of the \f$i^{th}\f$ triangles are stored in tria[(i-1)*3]\@3.
557
+ ! * \param refs pointer to an array of triangle references.
558
+ ! * refs[i-1] is the reference of the \f$i^{th}\f$ triangle.
559
+ ! * \return 0 on failure, 1 otherwise.
560
+ ! *
561
+ ! * \remark Fortran interface: (commentated in order to allow to pass
562
+ ! * \%val(0) instead of the refs array)
563
+ ! */
564
+ INTERFACE
565
+ ! SUBROUTINE MMGS_SET_TRIANGLES(mesh,tria,refs,retval)
566
+ ! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
567
+ ! INTEGER(MMG5F_INT),DIMENSION(*), INTENT(IN) :: tria,refs
568
+ ! INTEGER, INTENT(OUT) :: retval
569
+ ! END SUBROUTINE
570
+ END INTERFACE
571
+ ! *
572
+ ! */
573
+
574
+ ! LIBMMGS_EXPORT int MMGS_Set_triangles(MMG5_pMesh mesh, MMG5_int *tria, MMG5_int *refs);
575
+
576
+ ! /**
577
+ ! * \brief Set the vertices and reference of one edge in the mesh.
578
+ ! *
579
+ ! * \param mesh pointer to the mesh structure.
580
+ ! * \param v0 first extremity of the edge.
581
+ ! * \param v1 second extremity of the edge.
582
+ ! * \param ref edge reference.
583
+ ! * \param pos edge position in the mesh.
584
+ ! * \return 0 on failure, 1 otherwise.
585
+ ! *
586
+ ! * Assigns vertices \a v0, \a v1 and reference \a ref to the edge at position \a
587
+ ! * pos in the mesh structure (\a pos from 1 to the number of edges included).
588
+ ! *
589
+ ! * \remark Fortran interface:
590
+ ! */
591
+ INTERFACE
592
+ SUBROUTINE MMGS_SET_EDGE(mesh,v0,v1,ref,pos,retval)
593
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
594
+ INTEGER(MMG5F_INT), INTENT(IN):: v0,v1,ref,pos
595
+ INTEGER, INTENT(OUT) :: retval
596
+ END SUBROUTINE
597
+ END INTERFACE
598
+ ! *
599
+ ! */
600
+
601
+ ! LIBMMGS_EXPORT int MMGS_Set_edge(MMG5_pMesh mesh, MMG5_int v0, MMG5_int v1, MMG5_int ref,MMG5_int pos);
602
+
603
+ ! /**
604
+ ! * \brief Assign the "corner" attribute to a vertex.
605
+ ! *
606
+ ! * \param mesh pointer to the mesh structure.
607
+ ! * \param k vertex number.
608
+ ! * \return 1.
609
+ ! *
610
+ ! * This function sets the corner attribute at vertex \a pos (\a pos from 1 to
611
+ ! * the number of vertices included).
612
+ ! *
613
+ ! * \remark Fortran interface:
614
+ ! */
615
+ INTERFACE
616
+ SUBROUTINE MMGS_SET_CORNER(mesh,k,retval)
617
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
618
+ INTEGER(MMG5F_INT), INTENT(IN):: k
619
+ INTEGER, INTENT(OUT) :: retval
620
+ END SUBROUTINE
621
+ END INTERFACE
622
+ ! *
623
+ ! */
624
+
625
+ ! LIBMMGS_EXPORT int MMGS_Set_corner(MMG5_pMesh mesh, MMG5_int k);
626
+
627
+ ! /**
628
+ ! * \brief Remove the "corner" attribute from a vertex.
629
+ ! *
630
+ ! * \param mesh pointer to the mesh structure.
631
+ ! * \param k vertex number.
632
+ ! * \return 1.
633
+ ! *
634
+ ! * This function removes the corner attribute from vertex \a pos (from 1 to the
635
+ ! * number of vertices included).
636
+ ! *
637
+ ! * \remark Fortran interface
638
+ ! *
639
+ ! */
640
+ INTERFACE
641
+ SUBROUTINE MMGS_UNSET_CORNER(mesh,k,retval)
642
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
643
+ INTEGER(MMG5F_INT), INTENT(IN):: k
644
+ INTEGER, INTENT(OUT) :: retval
645
+ END SUBROUTINE
646
+ END INTERFACE
647
+ ! *
648
+ ! */
649
+
650
+ ! LIBMMGS_EXPORT int MMGS_Unset_corner(MMG5_pMesh mesh, MMG5_int k);
651
+
652
+ ! /**
653
+ ! * \brief Assign the "required" attribute to a vertex.
654
+ ! *
655
+ ! * \param mesh pointer to the mesh structure.
656
+ ! * \param k vertex number.
657
+ ! * \return 1.
658
+ ! *
659
+ ! * This function sets the required attribute at vertex \a k.
660
+ ! * Vertices with this attribute will not be modified by the remesher.
661
+ ! *
662
+ ! * \remark Fortran interface:
663
+ ! */
664
+ INTERFACE
665
+ SUBROUTINE MMGS_SET_REQUIREDVERTEX(mesh,k,retval)
666
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
667
+ INTEGER(MMG5F_INT), INTENT(IN):: k
668
+ INTEGER, INTENT(OUT) :: retval
669
+ END SUBROUTINE
670
+ END INTERFACE
671
+ ! *
672
+ ! */
673
+
674
+ ! LIBMMGS_EXPORT int MMGS_Set_requiredVertex(MMG5_pMesh mesh, MMG5_int k);
675
+
676
+ ! /**
677
+ ! * \brief Remove the "required" attribute from a vertex.
678
+ ! *
679
+ ! * \param mesh pointer to the mesh structure.
680
+ ! * \param k vertex number.
681
+ ! * \return 1.
682
+ ! *
683
+ ! * This function removes the required attribute from vertex \a k.
684
+ ! *
685
+ ! * \remark Fortran interface:
686
+ ! */
687
+ INTERFACE
688
+ SUBROUTINE MMGS_UNSET_REQUIREDVERTEX(mesh,k,retval)
689
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
690
+ INTEGER(MMG5F_INT), INTENT(IN):: k
691
+ INTEGER, INTENT(OUT) :: retval
692
+ END SUBROUTINE
693
+ END INTERFACE
694
+ ! *
695
+ ! */
696
+
697
+ ! LIBMMGS_EXPORT int MMGS_Unset_requiredVertex(MMG5_pMesh mesh, MMG5_int k);
698
+
699
+ ! /**
700
+ ! * \brief Assign the "required" attribute to a triangle.
701
+ ! *
702
+ ! * \param mesh pointer to the mesh structure.
703
+ ! * \param k triangle index.
704
+ ! * \return 1.
705
+ ! *
706
+ ! * This function sets the required attribute at triangle \a k.
707
+ ! *
708
+ ! * \remark Fortran interface:
709
+ ! */
710
+ INTERFACE
711
+ SUBROUTINE MMGS_SET_REQUIREDTRIANGLE(mesh,k,retval)
712
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
713
+ INTEGER(MMG5F_INT), INTENT(IN):: k
714
+ INTEGER, INTENT(OUT) :: retval
715
+ END SUBROUTINE
716
+ END INTERFACE
717
+ ! *
718
+ ! */
719
+
720
+ ! LIBMMGS_EXPORT int MMGS_Set_requiredTriangle(MMG5_pMesh mesh, MMG5_int k);
721
+
722
+ ! /**
723
+ ! * \brief Remove the "required" attribute from a vertex.
724
+ ! *
725
+ ! * \param mesh pointer to the mesh structure.
726
+ ! * \param k triangle index.
727
+ ! * \return 1.
728
+ ! *
729
+ ! * This function removes the required attribute from triangle \a k.
730
+ ! *
731
+ ! * \remark Fortran interface:
732
+ ! */
733
+ INTERFACE
734
+ SUBROUTINE MMGS_UNSET_REQUIREDTRIANGLE(mesh,k,retval)
735
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
736
+ INTEGER(MMG5F_INT), INTENT(IN):: k
737
+ INTEGER, INTENT(OUT) :: retval
738
+ END SUBROUTINE
739
+ END INTERFACE
740
+ ! *
741
+ ! */
742
+
743
+ ! LIBMMGS_EXPORT int MMGS_Unset_requiredTriangle(MMG5_pMesh mesh, MMG5_int k);
744
+
745
+ ! /**
746
+ ! * \brief Assign the "ridge" attribute to an edge.
747
+ ! *
748
+ ! * \param mesh pointer to the mesh structure.
749
+ ! * \param k edge index.
750
+ ! * \return 1.
751
+ ! *
752
+ ! * This function gives the ridge attribute to edge \a k. This influences how
753
+ ! * this edge is treated by the remesher.
754
+ ! *
755
+ ! * \remark Fortran interface:
756
+ ! */
757
+ INTERFACE
758
+ SUBROUTINE MMGS_SET_RIDGE(mesh,k,retval)
759
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
760
+ INTEGER(MMG5F_INT), INTENT(IN):: k
761
+ INTEGER, INTENT(OUT) :: retval
762
+ END SUBROUTINE
763
+ END INTERFACE
764
+ ! *
765
+ ! */
766
+
767
+ ! LIBMMGS_EXPORT int MMGS_Set_ridge(MMG5_pMesh mesh, MMG5_int k);
768
+
769
+ ! /**
770
+ ! * \brief Remove the "ridge" attribute from an edge.
771
+ ! *
772
+ ! * \param mesh pointer to the mesh structure.
773
+ ! * \param k edge index.
774
+ ! * \return 1.
775
+ ! *
776
+ ! * This function removes the ridge attribute from edge \a k.
777
+ ! *
778
+ ! * \remark Fortran interface:
779
+ ! */
780
+ INTERFACE
781
+ SUBROUTINE MMGS_UNSET_RIDGE(mesh,k,retval)
782
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
783
+ INTEGER(MMG5F_INT), INTENT(IN):: k
784
+ INTEGER, INTENT(OUT) :: retval
785
+ END SUBROUTINE
786
+ END INTERFACE
787
+ ! *
788
+ ! */
789
+
790
+ ! LIBMMGS_EXPORT int MMGS_Unset_ridge(MMG5_pMesh mesh, MMG5_int k);
791
+
792
+ ! /**
793
+ ! * \brief Assign the "required" attribute to an edge.
794
+ ! *
795
+ ! * \param mesh pointer to the mesh structure.
796
+ ! * \param k edge index.
797
+ ! * \return 1.
798
+ ! *
799
+ ! * This function makes edge \a k a required edge. Required edges will not be
800
+ ! * modified by the remesher.
801
+ ! *
802
+ ! * \remark Fortran interface:
803
+ ! */
804
+ INTERFACE
805
+ SUBROUTINE MMGS_SET_REQUIREDEDGE(mesh,k,retval)
806
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
807
+ INTEGER(MMG5F_INT), INTENT(IN):: k
808
+ INTEGER, INTENT(OUT) :: retval
809
+ END SUBROUTINE
810
+ END INTERFACE
811
+ ! *
812
+ ! */
813
+
814
+ ! LIBMMGS_EXPORT int MMGS_Set_requiredEdge(MMG5_pMesh mesh, MMG5_int k);
815
+
816
+ ! /**
817
+ ! * \brief Remove the "required" attribute from an edge.
818
+ ! *
819
+ ! * \param mesh pointer to the mesh structure.
820
+ ! * \param k edge index.
821
+ ! * \return 1.
822
+ ! *
823
+ ! * This function removes the "required" attribute from edge \a k.
824
+ ! *
825
+ ! * \remark Fortran interface:
826
+ ! */
827
+ INTERFACE
828
+ SUBROUTINE MMGS_UNSET_REQUIREDEDGE(mesh,k,retval)
829
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
830
+ INTEGER(MMG5F_INT), INTENT(IN):: k
831
+ INTEGER, INTENT(OUT) :: retval
832
+ END SUBROUTINE
833
+ END INTERFACE
834
+ ! *
835
+ ! */
836
+
837
+ ! LIBMMGS_EXPORT int MMGS_Unset_requiredEdge(MMG5_pMesh mesh, MMG5_int k);
838
+
839
+ ! /**
840
+ ! * \brief Set the vertices and references of all edges in a mesh.
841
+ ! *
842
+ ! * \param mesh pointer to the mesh structure.
843
+ ! * \param edges pointer to an array of edges.
844
+ ! * The vertices of edge i should be given in
845
+ ! * edges[(i-1)*2] and edges[(i-1)*2+1].
846
+ ! * \param refs pointer to an array of references.
847
+ ! * refs[i-1] is the reference of edge i.
848
+ ! * \return 0 on failure, 1 otherwise.
849
+ ! *
850
+ ! * \remark Fortran interface:
851
+ ! */
852
+ INTERFACE
853
+ SUBROUTINE MMGS_SET_EDGES(mesh,edges,refs,retval)
854
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
855
+ INTEGER(MMG5F_INT), INTENT(IN):: edges(*),refs(*)
856
+ INTEGER, INTENT(OUT) :: retval
857
+ END SUBROUTINE
858
+ END INTERFACE
859
+ ! *
860
+ ! */
861
+
862
+ ! LIBMMGS_EXPORT int MMGS_Set_edges(MMG5_pMesh mesh, MMG5_int *edges, MMG5_int* refs);
863
+
864
+ ! /**
865
+ ! * \brief Get vertices, references and attributes of all edges in the mesh.
866
+ ! *
867
+ ! * \param mesh pointer to the mesh structure.
868
+ ! * \param edges pointer to an array of edges.
869
+ ! * The vertices of edge i are stored in edges[(i-1)*2] and edges[(i-1)*2+1].
870
+ ! * \param refs edge references. refs[i-1] is the reference of edge \a i.
871
+ ! * \param areRidges 1 if the edge is a ridge, 0 otherwise.
872
+ ! * \param areRequired 1 if the edge is required, 0 otherwise.
873
+ ! * \return 0 on failure, 1 otherwise.
874
+ ! *
875
+ ! * \remark Fortran interface:
876
+ ! */
877
+ INTERFACE
878
+ SUBROUTINE MMGS_GET_EDGES(mesh,edges,refs,areRidges,areRequired,retval)
879
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
880
+ INTEGER(MMG5F_INT), INTENT(IN):: refs(*),edges(*)
881
+ INTEGER, INTENT(OUT) :: areRequired(*),areRidges(*)
882
+ INTEGER, INTENT(OUT) :: retval
883
+ END SUBROUTINE
884
+ END INTERFACE
885
+ ! *
886
+ ! */
887
+
888
+ ! LIBMMGS_EXPORT int MMGS_Get_edges(MMG5_pMesh mesh,MMG5_int *edges,MMG5_int* refs,
889
+ ! int *areRidges,int *areRequired);
890
+
891
+ ! /**
892
+ ! * \brief Set the normal orientation at a single vertex.
893
+ ! *
894
+ ! * \param mesh pointer to the mesh structure.
895
+ ! * \param k vertex index
896
+ ! * \param n0 x componant of the normal at vertex \a k.
897
+ ! * \param n1 y componant of the normal at vertex \a k.
898
+ ! * \param n2 z componant of the normal at vertex \a k.
899
+ ! *
900
+ ! * \return 1 on success.
901
+ ! *
902
+ ! * Set normal (n0,n1,n2) at vertex \a k.
903
+ ! *
904
+ ! * \remark Fortran interface:
905
+ ! */
906
+ INTERFACE
907
+ SUBROUTINE MMGS_SET_NORMALATVERTEX(mesh,k,n0,n1,n2,retval)
908
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
909
+ INTEGER(MMG5F_INT), INTENT(IN):: k
910
+ REAL(KIND=8), INTENT(IN) :: n0,n1,n2
911
+ INTEGER, INTENT(OUT) :: retval
912
+ END SUBROUTINE
913
+ END INTERFACE
914
+ ! *
915
+ ! */
916
+
917
+ ! LIBMMGS_EXPORT int MMGS_Set_normalAtVertex(MMG5_pMesh mesh, MMG5_int k, double n0, double n1, double n2) ;
918
+
919
+ ! /**
920
+ ! * \brief Get the quality measure of a triangle.
921
+ ! *
922
+ ! * \param mesh pointer to the mesh structure.
923
+ ! * \param met pointer to the metric structure.
924
+ ! * \param k index of the triangle for which we want to get the quality.
925
+ ! * \return the computed quality or 0 on failure.
926
+ ! *
927
+ ! * \remark Fortran interface:
928
+ ! */
929
+ INTERFACE
930
+ SUBROUTINE MMGS_GET_TRIANGLEQUALITY(mesh,met,k,retval)
931
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,met
932
+ INTEGER(MMG5F_INT), INTENT(IN):: k
933
+ REAL(KIND=8), INTENT(OUT) :: retval
934
+ END SUBROUTINE
935
+ END INTERFACE
936
+ ! *
937
+ ! */
938
+
939
+ ! double MMGS_Get_triangleQuality(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k);
940
+
941
+ ! /**
942
+ ! * \brief Set a single element of a scalar solution structure.
943
+ ! *
944
+ ! * \param met pointer to the sol structure.
945
+ ! * \param s solution scalar value.
946
+ ! * \param pos position of the solution in the mesh.
947
+ ! * \return 0 on failure, 1 otherwise.
948
+ ! *
949
+ ! * This function sets the scalar value \a s at position \a pos in the solution
950
+ ! * structure (\a pos from 1 to the number of vertices included).
951
+ ! *
952
+ ! * \remark Fortran interface:
953
+ ! */
954
+ INTERFACE
955
+ SUBROUTINE MMGS_SET_SCALARSOL(met,s,pos,retval)
956
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: met
957
+ REAL(KIND=8), INTENT(IN) :: s
958
+ INTEGER(MMG5F_INT), INTENT(IN):: pos
959
+ INTEGER, INTENT(OUT) :: retval
960
+ END SUBROUTINE
961
+ END INTERFACE
962
+ ! *
963
+ ! */
964
+
965
+ ! LIBMMGS_EXPORT int MMGS_Set_scalarSol(MMG5_pSol met, double s, MMG5_int pos);
966
+
967
+ ! /**
968
+ ! * \brief Set the values of all elements of a scalar solution structure.
969
+ ! *
970
+ ! * \param met pointer to the sol structure.
971
+ ! * \param s array of scalar solutions values.
972
+ ! * s[i-1] is the solution at vertex i.
973
+ ! * \return 0 on failure, 1 otherwise.
974
+ ! *
975
+ ! * \remark Fortran interface:
976
+ ! */
977
+ INTERFACE
978
+ SUBROUTINE MMGS_SET_SCALARSOLS(met,s,retval)
979
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: met
980
+ REAL(KIND=8),DIMENSION(*), INTENT(IN) :: s
981
+ INTEGER, INTENT(OUT) :: retval
982
+ END SUBROUTINE
983
+ END INTERFACE
984
+ ! *
985
+ ! */
986
+
987
+ ! LIBMMGS_EXPORT int MMGS_Set_scalarSols(MMG5_pSol met, double *s);
988
+
989
+ ! /**
990
+ ! * \brief Set a single element of a vector solution structure.
991
+ ! *
992
+ ! * \param met pointer to the sol structure.
993
+ ! * \param vx x value of the vectorial solution.
994
+ ! * \param vy y value of the vectorial solution.
995
+ ! * \param vz z value of the vectorial solution.
996
+ ! * \param pos position of the solution in the mesh (begin to 1).
997
+ ! * \return 0 on failure, 1 otherwise.
998
+ ! *
999
+ ! * This function sets the vectorial value \f$(v_x,v_y,v_z)\f$ at position \a pos
1000
+ ! * in the solution structure (\a pos from 1 to the number of vertices
1001
+ ! * included).
1002
+ ! *
1003
+ ! * \remark Fortran interface:
1004
+ ! */
1005
+ INTERFACE
1006
+ SUBROUTINE MMGS_SET_VECTORSOL(met,vx,vy,vz,pos,retval)
1007
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: met
1008
+ REAL(KIND=8), INTENT(IN) :: vx,vy,vz
1009
+ INTEGER(MMG5F_INT), INTENT(IN):: pos
1010
+ INTEGER, INTENT(OUT) :: retval
1011
+ END SUBROUTINE
1012
+ END INTERFACE
1013
+ ! *
1014
+ ! */
1015
+
1016
+ ! LIBMMGS_EXPORT int MMGS_Set_vectorSol(MMG5_pSol met, double vx,double vy, double vz, MMG5_int pos);
1017
+
1018
+ ! /**
1019
+ ! * \brief Set all elements of a vector solution structure.
1020
+ ! *
1021
+ ! * \param met pointer to the sol structure.
1022
+ ! * \param sols array of vectorial solutions
1023
+ ! * sols[3*(i-1)]\@3 is the solution at vertex i
1024
+ ! * \return 0 on failure, 1 otherwise.
1025
+ ! *
1026
+ ! * This function sets a vector-valued solution at each element of solution
1027
+ ! * structure.
1028
+ ! *
1029
+ ! * \remark Fortran interface:
1030
+ ! */
1031
+ INTERFACE
1032
+ SUBROUTINE MMGS_SET_VECTORSOLS(met,sols,retval)
1033
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: met
1034
+ REAL(KIND=8),DIMENSION(*), INTENT(IN) :: sols
1035
+ INTEGER, INTENT(OUT) :: retval
1036
+ END SUBROUTINE
1037
+ END INTERFACE
1038
+ ! *
1039
+ ! */
1040
+
1041
+ ! LIBMMGS_EXPORT int MMGS_Set_vectorSols(MMG5_pSol met, double *sols);
1042
+
1043
+ ! /**
1044
+ ! * \brief Set a single element of a tensor solution structure.
1045
+ ! *
1046
+ ! * \param met pointer to the sol structure.
1047
+ ! * \param m11 value of the tensorial solution at position (1,1) in the tensor.
1048
+ ! * \param m12 value of the tensorial solution at position (1,2) in the tensor.
1049
+ ! * \param m13 value of the tensorial solution at position (1,3) in the tensor.
1050
+ ! * \param m22 value of the tensorial solution at position (2,2) in the tensor.
1051
+ ! * \param m23 value of the tensorial solution at position (2,3) in the tensor.
1052
+ ! * \param m33 value of the tensorial solution at position (3,3) in the tensor.
1053
+ ! * \param pos position of the solution in the mesh (begin to 1).
1054
+ ! * \return 0 on failure, 1 otherwise.
1055
+ ! *
1056
+ ! * This function sets a tensor value at position \a pos in solution
1057
+ ! * structure (\a pos from 1 to the number of vertices included).
1058
+ ! *
1059
+ ! * \remark Fortran interface:
1060
+ ! */
1061
+ INTERFACE
1062
+ SUBROUTINE MMGS_SET_TENSORSOL(met,m11,m12,m13,m22,m23,m33,pos,retval)
1063
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: met
1064
+ REAL(KIND=8), INTENT(IN) :: m11,m12,m13,m22,m23,m33
1065
+ INTEGER(MMG5F_INT), INTENT(IN):: pos
1066
+ INTEGER, INTENT(OUT) :: retval
1067
+ END SUBROUTINE
1068
+ END INTERFACE
1069
+ ! *
1070
+ ! */
1071
+
1072
+ ! LIBMMGS_EXPORT int MMGS_Set_tensorSol(MMG5_pSol met, double m11,double m12, double m13,
1073
+ ! double m22,double m23, double m33, MMG5_int pos);
1074
+
1075
+ ! /**
1076
+ ! * \brief Set all elements of a tensor solution structure.
1077
+ ! *
1078
+ ! * \param met pointer to the sol structure.
1079
+ ! * \param sols array of tensorial solutions.
1080
+ ! * sols[6*(i-1)]\@6 is the solution at vertex i
1081
+ ! * \return 0 on failure, 1 otherwise.
1082
+ ! *
1083
+ ! * \remark Fortran interface:
1084
+ ! */
1085
+ INTERFACE
1086
+ SUBROUTINE MMGS_SET_TENSORSOLS(met,sols,retval)
1087
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: met
1088
+ REAL(KIND=8),DIMENSION(*), INTENT(IN) :: sols
1089
+ INTEGER, INTENT(OUT) :: retval
1090
+ END SUBROUTINE
1091
+ END INTERFACE
1092
+ ! *
1093
+ ! */
1094
+
1095
+ ! LIBMMGS_EXPORT int MMGS_Set_tensorSols(MMG5_pSol met, double *sols);
1096
+
1097
+ ! /**
1098
+ ! * \brief Set a single element of one out of multiple solution fields that are defined on vertices.
1099
+ ! *
1100
+ ! * \param sol pointer to the array of solutions
1101
+ ! * \param i position of the solution field that we want to set.
1102
+ ! * \param s solution(s) at mesh vertex \a pos.
1103
+ ! * \param pos index of the vertex on which we set the solution.
1104
+ ! *
1105
+ ! * \return 0 on failure, 1 otherwise.
1106
+ ! *
1107
+ ! * Set values of the solution at field \a i of the solution array and at
1108
+ ! * position \pos (\a pos from 1 to the number of vertices included and \a i from 1
1109
+ ! * to the number of solutions). The type of solution is determined from \a sol.
1110
+ ! *
1111
+ ! * \remark Fortran interface:
1112
+ ! */
1113
+ INTERFACE
1114
+ SUBROUTINE MMGS_SET_ITHSOL_INSOLSATVERTICES(sol,i,s,pos,retval)
1115
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: sol
1116
+ INTEGER, INTENT(IN) :: i
1117
+ INTEGER(MMG5F_INT), INTENT(IN) :: pos
1118
+ REAL(KIND=8), DIMENSION(*),INTENT(OUT) :: s
1119
+ INTEGER, INTENT(OUT) :: retval
1120
+ END SUBROUTINE
1121
+ END INTERFACE
1122
+ ! *
1123
+ ! */
1124
+
1125
+ ! LIBMMGS_EXPORT int MMGS_Set_ithSol_inSolsAtVertices(MMG5_pSol sol, int i, double* s, MMG5_int pos);
1126
+
1127
+ ! /**
1128
+ ! * \brief Set all elements of one out of multiple solution fields that are defined on vertices.
1129
+ ! *
1130
+ ! * \param sol pointer to the array of solutions
1131
+ ! * \param i position of the solution field that we want to set.
1132
+ ! * \param s array of solutions at mesh vertices. The solution at vertex \a k
1133
+ ! * is given by s[k-1] for a scalar sol, s[3*(k-1)]\@3 for a vectorial solution
1134
+ ! * and s[6*(k-1)]\@6 for a tensor solution.
1135
+ ! *
1136
+ ! * \return 0 on failure, 1 otherwise.
1137
+ ! *
1138
+ ! * Set values of the solution at field \a i of the solution array (\a i from
1139
+ ! * 1 to the number of solutions). The type of solution is determined from \a sol.
1140
+ ! *
1141
+ ! * \remark Fortran interface:
1142
+ ! */
1143
+ INTERFACE
1144
+ SUBROUTINE MMGS_SET_ITHSOLS_INSOLSATVERTICES(sol,i,s,retval)
1145
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: sol
1146
+ INTEGER, INTENT(IN) :: i
1147
+ REAL(KIND=8), DIMENSION(*),INTENT(OUT) :: s
1148
+ INTEGER, INTENT(OUT) :: retval
1149
+ END SUBROUTINE
1150
+ END INTERFACE
1151
+ ! *
1152
+ ! */
1153
+
1154
+ ! LIBMMGS_EXPORT int MMGS_Set_ithSols_inSolsAtVertices(MMG5_pSol sol,int i, double* s);
1155
+
1156
+ ! /* check init */
1157
+ ! /**
1158
+ ! * \brief Check if the numbers of given entities match with mesh and solution
1159
+ ! * size and check mesh data.
1160
+ ! *
1161
+ ! * \param mesh pointer to the mesh structure.
1162
+ ! * \param met pointer to the solution structure.
1163
+ ! * \return 0 on failure, 1 otherwise.
1164
+ ! *
1165
+ ! * This function checks if the numbers of given entities match with the mesh and
1166
+ ! * solution sizes and checks the mesh data. Use of this function is not
1167
+ ! * mandatory.
1168
+ ! *
1169
+ ! * \remark Fortran interface:
1170
+ ! */
1171
+ INTERFACE
1172
+ SUBROUTINE MMGS_CHK_MESHDATA(mesh,met,retval)
1173
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,met
1174
+ INTEGER, INTENT(OUT) :: retval
1175
+ END SUBROUTINE
1176
+ END INTERFACE
1177
+ ! *
1178
+ ! */
1179
+
1180
+ ! LIBMMGS_EXPORT int MMGS_Chk_meshData(MMG5_pMesh mesh, MMG5_pSol met);
1181
+
1182
+ ! /** functions to set parameters */
1183
+ ! /**
1184
+ ! * \brief set an integer parameter of the remesher
1185
+ ! *
1186
+ ! * \param mesh pointer to the mesh structure.
1187
+ ! * \param sol pointer to the sol structure (unused).
1188
+ ! * \param iparam integer parameter to set (see \ref MMGS_Param for a
1189
+ ! * list of parameters that can be set).
1190
+ ! * \param val value for the parameter.
1191
+ ! * \return 0 on failure, 1 otherwise.
1192
+ ! *
1193
+ ! * This function sets integer parameter \a iparam to value \a val.
1194
+ ! *
1195
+ ! * \remark Fortran interface:
1196
+ ! */
1197
+ INTERFACE
1198
+ SUBROUTINE MMGS_SET_IPARAMETER(mesh,sol,iparam,val,retval)
1199
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
1200
+ MMG5_DATA_PTR_T :: sol
1201
+ INTEGER, INTENT(IN) :: iparam
1202
+ INTEGER(MMG5F_INT), INTENT(IN) :: val
1203
+ INTEGER, INTENT(OUT) :: retval
1204
+ END SUBROUTINE
1205
+ END INTERFACE
1206
+ ! *
1207
+ ! */
1208
+
1209
+ ! LIBMMGS_EXPORT int MMGS_Set_iparameter(MMG5_pMesh mesh,MMG5_pSol sol, int iparam, MMG5_int val);
1210
+
1211
+ ! /**
1212
+ ! * \brief set a real-valued parameter of the remesher
1213
+ ! *
1214
+ ! * \param mesh pointer to the mesh structure.
1215
+ ! * \param sol pointer to the sol structure (unused).
1216
+ ! * \param dparam double parameter to set (see \ref MMGS_Param for a
1217
+ ! * list of parameters that can be set).
1218
+ ! * \param val value of the parameter.
1219
+ ! * \return 0 on failure, 1 otherwise.
1220
+ ! *
1221
+ ! * This function sets the double parameter \a dparam to value \a val.
1222
+ ! *
1223
+ ! * \remark Fortran interface:
1224
+ ! */
1225
+ INTERFACE
1226
+ SUBROUTINE MMGS_SET_DPARAMETER(mesh,sol,dparam,val,retval)
1227
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
1228
+ MMG5_DATA_PTR_T :: sol
1229
+ INTEGER, INTENT(IN) :: dparam
1230
+ REAL(KIND=8), INTENT(IN) :: val
1231
+ INTEGER, INTENT(OUT) :: retval
1232
+ END SUBROUTINE
1233
+ END INTERFACE
1234
+ ! *
1235
+ ! */
1236
+
1237
+ ! LIBMMGS_EXPORT int MMGS_Set_dparameter(MMG5_pMesh mesh,MMG5_pSol sol, int dparam, double val);
1238
+
1239
+ ! /**
1240
+ ! * \brief set a local parameter
1241
+ ! *
1242
+ ! * \param mesh pointer to the mesh structure.
1243
+ ! * \param sol pointer to the sol structure.
1244
+ ! * \param typ type of entity (triangle, edge,...).
1245
+ ! * \param ref reference of the entity.
1246
+ ! * \param hmin minimal edge length.
1247
+ ! * \param hmax maximal edge length.
1248
+ ! * \param Hausdorff distance.
1249
+ ! * \return 0 on failure, 1 otherwise.
1250
+ ! *
1251
+ ! * Set local parameters: set the hausdorff distance at \a hausd, the minmal edge
1252
+ ! * length at \a hmin and the maximal edge length at \a hmax for all
1253
+ ! * elements of type \a typ and reference \a ref.
1254
+ ! *
1255
+ ! * \remark Fortran interface:
1256
+ ! */
1257
+ INTERFACE
1258
+ SUBROUTINE MMGS_SET_LOCALPARAMETER(mesh,sol,typ,ref,hmin,hmax,hausd,retval)
1259
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
1260
+ INTEGER, INTENT(IN) :: typ
1261
+ INTEGER(MMG5F_INT), INTENT(IN) :: ref
1262
+ REAL(KIND=8), INTENT(IN) :: hmin,hmax,hausd
1263
+ INTEGER, INTENT(OUT) :: retval
1264
+ END SUBROUTINE
1265
+ END INTERFACE
1266
+ ! *
1267
+ ! */
1268
+
1269
+ ! LIBMMGS_EXPORT int MMGS_Set_localParameter(MMG5_pMesh mesh, MMG5_pSol sol, int typ, MMG5_int ref,
1270
+ ! double hmin, double hmax, double hausd);
1271
+
1272
+ ! /**
1273
+ ! * \brief Set the reference mapping for the elements of reference
1274
+ ! * \a ref in level-set discretization mode.
1275
+ ! *
1276
+ ! * \param mesh pointer to the mesh structure.
1277
+ ! * \param sol pointer to the sol structure.
1278
+ ! * \param ref input triangle reference.
1279
+ ! * \param split MMG5_MMAT_NoSplit if the entity must not be split, MMG5_MMAT_Split otherwise
1280
+ ! * \param rmin reference for the negative side after LS discretization
1281
+ ! * \param rplus reference for the positive side after LS discretization
1282
+ ! * \return 0 on failure, 1 otherwise.
1283
+ ! *
1284
+ ! * With this function you can determine which references will be given to the
1285
+ ! * triangles on both sides of the level set, after discretization. Negative and
1286
+ ! * positive here refer to areas where the function is smaller or larger,
1287
+ ! * respectively, than the isovalue of the level set.
1288
+ ! *
1289
+ ! * \remark Fortran interface:
1290
+ ! */
1291
+ INTERFACE
1292
+ SUBROUTINE MMGS_SET_MULTIMAT(mesh,sol,ref,split,rmin,rplus,retval)
1293
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
1294
+ INTEGER(MMG5F_INT), INTENT(IN):: ref,rmin,rplus
1295
+ INTEGER, INTENT(IN) :: split
1296
+ INTEGER, INTENT(OUT) :: retval
1297
+ END SUBROUTINE
1298
+ END INTERFACE
1299
+ ! *
1300
+ ! */
1301
+
1302
+ ! LIBMMGS_EXPORT int MMGS_Set_multiMat(MMG5_pMesh mesh, MMG5_pSol sol,MMG5_int ref,
1303
+ ! int split,MMG5_int rmin, MMG5_int rplus);
1304
+
1305
+ ! /**
1306
+ ! * \brief Set a new level-set base reference.
1307
+ ! *
1308
+ ! * \param mesh pointer to the mesh structure.
1309
+ ! * \param sol pointer to the sol structure.
1310
+ ! * \param br new level-set base reference.
1311
+ ! * \return 0 on failure, 1 otherwise.
1312
+ ! *
1313
+ ! * Set a new level-set base reference of ref \a br in level-set discretization
1314
+ ! * mode. Base references are boundary conditions to which an implicit domain can
1315
+ ! * be attached. All implicit volumes that are not attached to listed base
1316
+ ! * references are deleted as spurious volumes by the \a rmc option.
1317
+ ! *
1318
+ ! * \remark Fortran interface:
1319
+ ! */
1320
+ INTERFACE
1321
+ SUBROUTINE MMGS_SET_LSBASEREFERENCE(mesh,sol,br,retval)
1322
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
1323
+ INTEGER(MMG5F_INT), INTENT(IN):: br
1324
+ INTEGER, INTENT(OUT) :: retval
1325
+ END SUBROUTINE
1326
+ END INTERFACE
1327
+ ! *
1328
+ ! */
1329
+
1330
+ ! LIBMMGS_EXPORT int MMGS_Set_lsBaseReference(MMG5_pMesh mesh, MMG5_pSol sol,MMG5_int br);
1331
+
1332
+ ! /** recover data */
1333
+ ! /**
1334
+ ! * \brief Get the number of vertices, triangles, and edges of the mesh.
1335
+ ! *
1336
+ ! * \param mesh pointer to the mesh structure.
1337
+ ! * \param np pointer to the number of vertices.
1338
+ ! * \param nt pointer to the number of triangles.
1339
+ ! * \param na pointer to the number of edges.
1340
+ ! * \return 1.
1341
+ ! *
1342
+ ! * \remark Fortran interface:
1343
+ ! */
1344
+ INTERFACE
1345
+ SUBROUTINE MMGS_GET_MESHSIZE(mesh,np,nt,na,retval)
1346
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
1347
+ INTEGER(MMG5F_INT) :: np,nt,na
1348
+ INTEGER, INTENT(OUT) :: retval
1349
+ END SUBROUTINE
1350
+ END INTERFACE
1351
+ ! *
1352
+ ! */
1353
+
1354
+ ! LIBMMGS_EXPORT int MMGS_Get_meshSize(MMG5_pMesh mesh, MMG5_int* np, MMG5_int* nt, MMG5_int* na);
1355
+
1356
+ ! /**
1357
+ ! * \brief Get the number of elements, dimension, and type of a solution.
1358
+ ! *
1359
+ ! * \param mesh pointer to the mesh structure.
1360
+ ! * \param sol pointer to the sol structure.
1361
+ ! * \param typEntity pointer to the type of entities to which solutions are applied.
1362
+ ! * (see \ref MMG5_entities for possible values)
1363
+ ! * \param np pointer to the number of elements in the solution.
1364
+ ! * \param typSol pointer to the type of the solution (\ref MMG5_Scalar, \ref MMG5_Vector,
1365
+ ! * \ref MMG5_Tensor, \ref MMG5_Notype)
1366
+ ! * \return 1.
1367
+ ! *
1368
+ ! * \remark Fortran interface:
1369
+ ! */
1370
+ INTERFACE
1371
+ SUBROUTINE MMGS_GET_SOLSIZE(mesh,sol,typEntity,np,typSol,retval)
1372
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
1373
+ INTEGER :: typEntity,typSol
1374
+ INTEGER(MMG5F_INT) :: np
1375
+ INTEGER, INTENT(OUT) :: retval
1376
+ END SUBROUTINE
1377
+ END INTERFACE
1378
+ ! *
1379
+ ! */
1380
+
1381
+ ! LIBMMGS_EXPORT int MMGS_Get_solSize(MMG5_pMesh mesh, MMG5_pSol sol, int* typEntity, MMG5_int* np,
1382
+ ! int* typSol);
1383
+
1384
+ ! /**
1385
+ ! * \brief Get the number of elements, type, and dimensions of several solutions defined on vertices.
1386
+ ! *
1387
+ ! * \param mesh pointer to the mesh structure.
1388
+ ! * \param sol pointer to an array of sol structures.
1389
+ ! * \param nsols number of solutions per entity
1390
+ ! * \param nentities pointer to the number of entities.
1391
+ ! * \param typSol array of size MMG5_NSOL_MAX to store type of each solution
1392
+ ! * (scalar, vectorial, ..., see \ref MMG5_type for possible values).
1393
+ ! *
1394
+ ! * \return 1.
1395
+ ! *
1396
+ ! * \remark Fortran interface:
1397
+ ! */
1398
+ INTERFACE
1399
+ SUBROUTINE MMGS_GET_SOLSATVERTICESSIZE(mesh,sol,nsols,nentities,typSol,retval)
1400
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
1401
+ INTEGER :: nsols
1402
+ INTEGER(MMG5F_INT) :: nentities
1403
+ INTEGER :: typSol(*)
1404
+ INTEGER, INTENT(OUT) :: retval
1405
+ END SUBROUTINE
1406
+ END INTERFACE
1407
+ ! *
1408
+ ! */
1409
+
1410
+ ! LIBMMGS_EXPORT int MMGS_Get_solsAtVerticesSize(MMG5_pMesh mesh, MMG5_pSol* sol,int *nsols,
1411
+ ! MMG5_int* nentities,int* typSol);
1412
+
1413
+ ! /**
1414
+ ! * \brief Get the coordinates \a c0, \a c1,\a c2 and reference \a ref of the
1415
+ ! * next vertex of \a mesh.
1416
+ ! *
1417
+ ! * \param mesh pointer to the mesh structure.
1418
+ ! * \param c0 pointer to the coordinate of the vertex along the first dimension.
1419
+ ! * \param c1 pointer to the coordinate of the vertex along the second dimension.
1420
+ ! * \param c2 pointer to the coordinate of the vertex along the third dimension.
1421
+ ! * \param ref pointer to the vertex reference.
1422
+ ! * \param isCorner pointer to the flag saying if the vertex is corner.
1423
+ ! * \param isRequired pointer to the flag saying if the vertex is required.
1424
+ ! * \return 1.
1425
+ ! *
1426
+ ! * This function retrieves the coordinates \a c0, \a c1,\a c2, reference \a ref,
1427
+ ! * and attributes of the next vertex of a mesh. It is meant to be used in a loop
1428
+ ! * over all vertices. When this function has been called as many times as there
1429
+ ! * are vertices, the internal loop counter will be reset. To obtain data for a
1430
+ ! * specific vertex, the \ref MMGS_GetByIdx_vertex function can be used instead.
1431
+ ! *
1432
+ ! * \remark Fortran interface:
1433
+ ! */
1434
+ INTERFACE
1435
+ SUBROUTINE MMGS_GET_VERTEX(mesh,c0,c1,c2,ref,isCorner,isRequired,retval)
1436
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
1437
+ REAL(KIND=8), INTENT(OUT) :: c0,c1,c2
1438
+ INTEGER(MMG5F_INT) :: ref
1439
+ INTEGER :: isCorner,isRequired
1440
+ INTEGER, INTENT(OUT) :: retval
1441
+ END SUBROUTINE
1442
+ END INTERFACE
1443
+ ! *
1444
+ ! */
1445
+
1446
+ ! LIBMMGS_EXPORT int MMGS_Get_vertex(MMG5_pMesh mesh, double* c0, double* c1, double* c2, MMG5_int* ref,
1447
+ ! int* isCorner, int* isRequired);
1448
+
1449
+ ! /**
1450
+ ! * \brief Get the coordinates and reference of a specific vertex in the mesh.
1451
+ ! *
1452
+ ! * \param mesh pointer to the mesh structure.
1453
+ ! * \param c0 pointer to the coordinate of the vertex along the first dimension.
1454
+ ! * \param c1 pointer to the coordinate of the vertex along the second dimension.
1455
+ ! * \param c2 pointer to the coordinate of the vertex along the third dimension.
1456
+ ! * \param ref pointer to the vertex reference.
1457
+ ! * \param isCorner pointer to the flag saying if the vertex is corner.
1458
+ ! * \param isRequired pointer to the flag saying if the vertex is required.
1459
+ ! * \param idx index of vertex to get.
1460
+ ! * \return 1.
1461
+ ! *
1462
+ ! * This function retrieves the coordinates \a c0, \a c1, \a c2 and reference \a ref of
1463
+ ! * vertex \a idx of mesh, as well as its "corner" and "required" attributes.
1464
+ ! *
1465
+ ! * \remark Fortran interface:
1466
+ ! */
1467
+ INTERFACE
1468
+ SUBROUTINE MMGS_GETBYIDX_VERTEX(mesh,c0,c1,c2,ref,isCorner,isRequired,idx,retval)
1469
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
1470
+ REAL(KIND=8), INTENT(OUT) :: c0,c1,c2
1471
+ INTEGER :: isCorner,isRequired
1472
+ INTEGER(MMG5F_INT) :: ref,idx
1473
+ INTEGER, INTENT(OUT) :: retval
1474
+ END SUBROUTINE
1475
+ END INTERFACE
1476
+ ! *
1477
+ ! */
1478
+
1479
+ ! LIBMMGS_EXPORT int MMGS_GetByIdx_vertex(MMG5_pMesh mesh, double* c0, double* c1, double* c2, MMG5_int* ref,
1480
+ ! int* isCorner, int* isRequired,MMG5_int idx);
1481
+
1482
+ ! /**
1483
+ ! * \brief Get the coordinates, references and attributes of all vertices in the mesh.
1484
+ ! *
1485
+ ! * \param mesh pointer to the mesh structure.
1486
+ ! * \param vertices pointer to the array of coordinates.
1487
+ ! * The coordinates of vertex \a i are stored in
1488
+ ! * vertices[(i-1)*3]\@3.
1489
+ ! * \param refs pointer to the array of vertex references.
1490
+ ! * The ref of vertex \a i is stored in refs[i-1].
1491
+ ! * \param areCorners pointer to the array of flags saying if
1492
+ ! * vertices are corners.
1493
+ ! * areCorners[i-1]=1 if vertex \a i is corner.
1494
+ ! * \param areRequired pointer to the table of flags saying if vertices
1495
+ ! * are required. areRequired[i-1]=1 if vertex \a i is required.
1496
+ ! * \return 1.
1497
+ ! *
1498
+ ! * \remark Fortran interface: (commentated in order to allow to pass
1499
+ ! * \%val(0) instead of the refs,areCorners and areRequired arrays)
1500
+ ! */
1501
+ INTERFACE
1502
+ ! SUBROUTINE MMGS_GET_VERTICES(mesh,vertices,refs,areCorners,&
1503
+ ! areRequired,retval)
1504
+ ! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
1505
+ ! REAL(KIND=8),DIMENSION(*), INTENT(OUT) :: vertices
1506
+ ! INTEGER(MMG5F_INT), DIMENSION(*) :: refs
1507
+ ! INTEGER, DIMENSION(*) :: areCorners,areRequired
1508
+ ! INTEGER, INTENT(OUT) :: retval
1509
+ ! END SUBROUTINE
1510
+ END INTERFACE
1511
+ ! *
1512
+ ! */
1513
+
1514
+ ! LIBMMGS_EXPORT int MMGS_Get_vertices(MMG5_pMesh mesh, double* vertices, MMG5_int* refs,
1515
+ ! int* areCorners, int* areRequired);
1516
+
1517
+ ! /**
1518
+ ! * \brief Get the vertices, reference, and required attribute of the next
1519
+ ! * triangle in the mesh.
1520
+ ! *
1521
+ ! * \param mesh pointer to the mesh structure.
1522
+ ! * \param v0 pointer to the first vertex of the triangle.
1523
+ ! * \param v1 pointer to the second vertex of the triangle.
1524
+ ! * \param v2 pointer to the third vertex of the triangle.
1525
+ ! * \param ref pointer to the triangle reference.
1526
+ ! * \param isRequired pointer to the flag saying if the triangle is required.
1527
+ ! * \return 0 on failure, 1 otherwise.
1528
+ ! *
1529
+ ! * This function retrieves the vertices \a v0, \a v1, \a v2, reference \a ref,
1530
+ ! * and required attribute \a isRequired of the next triangle of \a mesh. It is
1531
+ ! * meant to be called in a loop over all triangles. When it has been called as
1532
+ ! * many times as there are triangles, the internal loop counter will be reset.
1533
+ ! *
1534
+ ! * \remark Fortran interface:
1535
+ ! */
1536
+ INTERFACE
1537
+ SUBROUTINE MMGS_GET_TRIANGLE(mesh,v0,v1,v2,ref,isRequired,retval)
1538
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
1539
+ INTEGER(MMG5F_INT), INTENT(OUT):: v0,v1,v2,ref
1540
+ INTEGER :: isRequired
1541
+ INTEGER, INTENT(OUT) :: retval
1542
+ END SUBROUTINE
1543
+ END INTERFACE
1544
+ ! *
1545
+ ! */
1546
+
1547
+ ! LIBMMGS_EXPORT int MMGS_Get_triangle(MMG5_pMesh mesh, MMG5_int* v0, MMG5_int* v1, MMG5_int* v2,
1548
+ ! MMG5_int* ref, int* isRequired);
1549
+
1550
+ ! /**
1551
+ ! * \brief Get the vertices, references, and required attributes of all triangles
1552
+ ! * in the mesh.
1553
+ ! *
1554
+ ! * \param mesh pointer to the mesh structure.
1555
+ ! * \param tria pointer to an array of vertices
1556
+ ! * Vertices of triangle \a i are stored in tria[(i-1)*3]\@3.
1557
+ ! * \param refs pointer to the array of triangles references.
1558
+ ! * refs[i-1] is the ref of triangle \a i.
1559
+ ! * \param areRequired pointer to an array of flags saying if triangles
1560
+ ! * are required. areRequired[i-1]=1 if triangle \a i
1561
+ ! * is required.
1562
+ ! * \return 0 on failure, 1 otherwise.
1563
+ ! *
1564
+ ! * \remark Fortran interface: (commentated in order to allow to pass
1565
+ ! * \%val(0) instead of the refs and areRequired arrays)
1566
+ ! */
1567
+ INTERFACE
1568
+ ! SUBROUTINE MMGS_GET_TRIANGLES(mesh,tria,refs,areRequired,retval)
1569
+ ! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
1570
+ ! INTEGER(MMG5F_INT), DIMENSION(*),INTENT(OUT) :: tria
1571
+ ! INTEGER(MMG5F_INT), DIMENSION(*) :: refs
1572
+ ! INTEGER, DIMENSION(*) :: areRequired
1573
+ ! INTEGER, INTENT(OUT) :: retval
1574
+ ! END SUBROUTINE
1575
+ END INTERFACE
1576
+ ! *
1577
+ ! */
1578
+
1579
+ ! LIBMMGS_EXPORT int MMGS_Get_triangles(MMG5_pMesh mesh, MMG5_int* tria, MMG5_int* refs,
1580
+ ! int* areRequired);
1581
+ ! /**
1582
+ ! * \brief Get the vertices, reference, and attributes of the next edge in the mesh.
1583
+ ! *
1584
+ ! * \param mesh pointer to the mesh structure.
1585
+ ! * \param e0 pointer to the index of the first vertex of the edge.
1586
+ ! * \param e1 pointer to the index of the second vertex of the edge.
1587
+ ! * \param ref pointer to the edge reference.
1588
+ ! * \param isRidge pointer to the flag saying if the edge is ridge.
1589
+ ! * \param isRequired pointer to the flag saying if the edge is required.
1590
+ ! * \return 0 on failure, 1 otherwise.
1591
+ ! *
1592
+ ! * This function retrieves the extremities \a e0, \a e1, reference \a ref, and
1593
+ ! * attributes of the next edge of \a mesh. It is meant to be called in a loop
1594
+ ! * over all edges. When it has been called as many times as there are edges in
1595
+ ! * the mesh, the internal edge counter will be reset.
1596
+ ! *
1597
+ ! * \remark Fortran interface:
1598
+ ! */
1599
+ INTERFACE
1600
+ SUBROUTINE MMGS_GET_EDGE(mesh,e0,e1,ref,isRidge,isRequired,retval)
1601
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
1602
+ INTEGER(MMG5F_INT), INTENT(OUT):: e0,e1
1603
+ INTEGER(MMG5F_INT) :: ref
1604
+ INTEGER :: isRidge,isRequired
1605
+ INTEGER, INTENT(OUT) :: retval
1606
+ END SUBROUTINE
1607
+ END INTERFACE
1608
+ ! *
1609
+ ! */
1610
+
1611
+ ! LIBMMGS_EXPORT int MMGS_Get_edge(MMG5_pMesh mesh, MMG5_int* e0, MMG5_int* e1, MMG5_int* ref,
1612
+ ! int* isRidge, int* isRequired);
1613
+
1614
+ ! /**
1615
+ ! * \brief Get the normal orientation at an edge.
1616
+ ! *
1617
+ ! * \param mesh pointer to the mesh structure.
1618
+ ! * \param k vertex number
1619
+ ! * \param n0 x componant of the normal at vertex \a k.
1620
+ ! * \param n1 y componant of the normal at vertex \a k.
1621
+ ! * \param n2 z componant of the normal at vertex \a k.
1622
+ ! *
1623
+ ! * \return 1 on success.
1624
+ ! *
1625
+ ! * This function retrieves the normal (n0,n1,n2) at vertex \a k.
1626
+ ! *
1627
+ ! * \remark Fortran interface:
1628
+ ! */
1629
+ INTERFACE
1630
+ SUBROUTINE MMGS_GET_NORMALATVERTEX(mesh,k,n0,n1,n2,retval)
1631
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
1632
+ INTEGER(MMG5F_INT), INTENT(IN):: k
1633
+ REAL(KIND=8) :: n0,n1,n2
1634
+ INTEGER, INTENT(OUT) :: retval
1635
+ END SUBROUTINE
1636
+ END INTERFACE
1637
+ ! *
1638
+ ! */
1639
+
1640
+ ! LIBMMGS_EXPORT int MMGS_Get_normalAtVertex(MMG5_pMesh mesh, MMG5_int k, double *n0, double *n1, double *n2) ;
1641
+
1642
+ ! /**
1643
+ ! * \brief Get the next element of a scalar solution structure.
1644
+ ! *
1645
+ ! * \param met pointer to the sol structure.
1646
+ ! * \param s pointer to the scalar solution value.
1647
+ ! * \return 0 on failure, 1 otherwise.
1648
+ ! *
1649
+ ! * This function retrieves the next element \a s of the solution field \a
1650
+ ! * met. It is meant to be called in a loop over all elements. When it has been
1651
+ ! * called as many times as there are elements in the solution, the internal loop
1652
+ ! * counter will be reset.
1653
+ ! *
1654
+ ! * \remark Fortran interface:
1655
+ ! */
1656
+ INTERFACE
1657
+ SUBROUTINE MMGS_GET_SCALARSOL(met,s,retval)
1658
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: met
1659
+ REAL(KIND=8), INTENT(OUT) :: s
1660
+ INTEGER, INTENT(OUT) :: retval
1661
+ END SUBROUTINE
1662
+ END INTERFACE
1663
+ ! *
1664
+ ! */
1665
+
1666
+ ! LIBMMGS_EXPORT int MMGS_Get_scalarSol(MMG5_pSol met, double* s);
1667
+
1668
+ ! /**
1669
+ ! * \brief Get all elements of a scalar solution structure.
1670
+ ! *
1671
+ ! * \param met pointer to the solution structure.
1672
+ ! * \param s array of scalar solutions at mesh vertices. s[i-1] is
1673
+ ! * the solution at vertex i.
1674
+ ! * \return 0 on failure, 1 otherwise.
1675
+ ! *
1676
+ ! * \remark Fortran interface:
1677
+ ! */
1678
+ INTERFACE
1679
+ SUBROUTINE MMGS_GET_SCALARSOLS(met,s,retval)
1680
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: met
1681
+ REAL(KIND=8), DIMENSION(*),INTENT(OUT) :: s
1682
+ INTEGER, INTENT(OUT) :: retval
1683
+ END SUBROUTINE
1684
+ END INTERFACE
1685
+ ! *
1686
+ ! */
1687
+
1688
+ ! LIBMMGS_EXPORT int MMGS_Get_scalarSols(MMG5_pSol met, double* s);
1689
+
1690
+ ! /**
1691
+ ! * \brief Get the next element of a vector solution structure.
1692
+ ! *
1693
+ ! * \param met pointer to the sol structure.
1694
+ ! * \param vx x value of the vectorial solution.
1695
+ ! * \param vy y value of the vectorial solution.
1696
+ ! * \param vz z value of the vectorial solution.
1697
+ ! * \return 0 on failure, 1 otherwise.
1698
+ ! *
1699
+ ! * This function retrieves the next vector-valued element \f$(v_x,v_y,vz)\f$ of
1700
+ ! * a solution field. It is meant to be called in a loop over all elements. When
1701
+ ! * it has been called as many times as there are elements in the solution, the
1702
+ ! * internal loop counter will be reset.
1703
+ ! *
1704
+ ! * \remark Fortran interface:
1705
+ ! */
1706
+ INTERFACE
1707
+ SUBROUTINE MMGS_GET_VECTORSOL(met,vx,vy,vz,retval)
1708
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: met
1709
+ REAL(KIND=8), INTENT(OUT) :: vx,vy,vz
1710
+ INTEGER, INTENT(OUT) :: retval
1711
+ END SUBROUTINE
1712
+ END INTERFACE
1713
+ ! *
1714
+ ! */
1715
+
1716
+ ! LIBMMGS_EXPORT int MMGS_Get_vectorSol(MMG5_pSol met, double* vx, double* vy, double* vz);
1717
+
1718
+ ! /**
1719
+ ! * \brief Get all elements of a vector solution structure.
1720
+ ! *
1721
+ ! * \param met pointer to the sol structure.
1722
+ ! * \param sols array of solutions at mesh vertices. sols[3*(i-1)]\@3 is
1723
+ ! * the solution at vertex i.
1724
+ ! * \return 0 on failure, 1 otherwise.
1725
+ ! *
1726
+ ! * This function retrieves all elements of a vector-valued solution field.
1727
+ ! *
1728
+ ! * \remark Fortran interface:
1729
+ ! */
1730
+ INTERFACE
1731
+ SUBROUTINE MMGS_GET_VECTORSOLS(met,sols,retval)
1732
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: met
1733
+ REAL(KIND=8), DIMENSION(*),INTENT(OUT) :: sols
1734
+ INTEGER, INTENT(OUT) :: retval
1735
+ END SUBROUTINE
1736
+ END INTERFACE
1737
+ ! *
1738
+ ! */
1739
+
1740
+ ! LIBMMGS_EXPORT int MMGS_Get_vectorSols(MMG5_pSol met, double* sols);
1741
+
1742
+ ! /**
1743
+ ! * \brief Get the next element of a tensor solution structure.
1744
+ ! *
1745
+ ! * \param met pointer to the sol structure.
1746
+ ! * \param m11 pointer to the position (1,1) in the solution tensor.
1747
+ ! * \param m12 pointer to the position (1,2) in the solution tensor.
1748
+ ! * \param m13 pointer to the position (1,3) in the solution tensor.
1749
+ ! * \param m22 pointer to the position (2,2) in the solution tensor.
1750
+ ! * \param m23 pointer to the position (2,3) in the solution tensor.
1751
+ ! * \param m33 pointer to the position (3,3) in the solution tensor.
1752
+ ! * \return 0 on failure, 1 otherwise.
1753
+ ! *
1754
+ ! * This function retrieves the next element
1755
+ ! * \f$(m_{11},m_{12},m_{13},m_{22},m_{23},m_{33})\f$ of a tensor-valued solution
1756
+ ! * field. It is meant to be called in a loop over all vertices. When it has
1757
+ ! * been called as many times as there are elements in the solution, the internal
1758
+ ! * loop counter will be reset.
1759
+ ! *
1760
+ ! * \remark Fortran interface:
1761
+ ! */
1762
+ INTERFACE
1763
+ SUBROUTINE MMGS_GET_TENSORSOL(met,m11,m12,m13,m22,m23,m33,retval)
1764
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: met
1765
+ REAL(KIND=8), INTENT(OUT) :: m11,m12,m13,m22,m23,m33
1766
+ INTEGER, INTENT(OUT) :: retval
1767
+ END SUBROUTINE
1768
+ END INTERFACE
1769
+ ! *
1770
+ ! */
1771
+
1772
+ ! LIBMMGS_EXPORT int MMGS_Get_tensorSol(MMG5_pSol met, double *m11, double *m12, double *m13,
1773
+ ! double *m22, double *m23, double *m33);
1774
+
1775
+ ! /**
1776
+ ! * \brief Get all elements of a tensor solution field.
1777
+ ! *
1778
+ ! * \param met pointer to the sol structure.
1779
+ ! * \param sols array of solution values.
1780
+ ! * sols[6*(i-1)]\@6 is the solution at vertex i.
1781
+ ! * \return 0 on failure, 1 otherwise.
1782
+ ! *
1783
+ ! * \remark Fortran interface:
1784
+ ! */
1785
+ INTERFACE
1786
+ SUBROUTINE MMGS_GET_TENSORSOLS(met,sols,retval)
1787
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: met
1788
+ REAL(KIND=8), DIMENSION(*), INTENT(OUT) :: sols
1789
+ INTEGER, INTENT(OUT) :: retval
1790
+ END SUBROUTINE
1791
+ END INTERFACE
1792
+ ! *
1793
+ ! */
1794
+
1795
+ ! LIBMMGS_EXPORT int MMGS_Get_tensorSols(MMG5_pSol met, double *sols);
1796
+
1797
+ ! /**
1798
+ ! * \brief Get one out of several solutions at a specific vertex.
1799
+ ! *
1800
+ ! * \param sol pointer to the array of solutions
1801
+ ! * \param i position of the solution field that we want to get.
1802
+ ! * \param s solution(s) at mesh vertex \a pos. The required size
1803
+ ! * of this array depends on the type of solution.
1804
+ ! * \param pos index of the vertex on which we get the solution.
1805
+ ! *
1806
+ ! * \return 0 on failure, 1 otherwise.
1807
+ ! *
1808
+ ! * This function retreives the value of field \a i of the solution array at
1809
+ ! * vertex \a pos. (\a pos from 1 to the number of vertices included and \a i
1810
+ ! * from 1 to the number of solutions). It works for any type of solution; the
1811
+ ! * types are inferred from \a sol.
1812
+ ! *
1813
+ ! * \remark Fortran interface:
1814
+ ! */
1815
+ INTERFACE
1816
+ SUBROUTINE MMGS_GET_ITHSOL_INSOLSATVERTICES(sol,i,s,pos,retval)
1817
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: sol
1818
+ INTEGER, INTENT(IN) :: i
1819
+ INTEGER(MMG5F_INT), INTENT(IN) :: pos
1820
+ REAL(KIND=8), DIMENSION(*),INTENT(OUT) :: s
1821
+ INTEGER, INTENT(OUT) :: retval
1822
+ END SUBROUTINE
1823
+ END INTERFACE
1824
+ ! *
1825
+ ! */
1826
+
1827
+ ! LIBMMGS_EXPORT int MMGS_Get_ithSol_inSolsAtVertices(MMG5_pSol sol, int i, double* s, MMG5_int pos);
1828
+
1829
+ ! /**
1830
+ ! * \brief Get one out of several solutions at all vertices in the mesh.
1831
+ ! *
1832
+ ! * \param sol pointer to the array of solutions
1833
+ ! * \param i position of the solution field that we want to get.
1834
+ ! * \param s array of solutions at mesh vertices. The solution at vertex \a k
1835
+ ! * is given by s[k-1] for a scalar sol, s[3*(k-1)]\@3 for a vectorial solution
1836
+ ! * and s[6*(k-1)]\@6 for a tensor solution.
1837
+ ! *
1838
+ ! * \return 0 on failure, 1 otherwise.
1839
+ ! *
1840
+ ! * This function retrieves the values of field \a i of the solution array \a sol
1841
+ ! * (\a i from 1 to \a the number of solutions). It works for any type of solution;
1842
+ ! * the type is inferred from \a sol.
1843
+ ! *
1844
+ ! * \remark Fortran interface:
1845
+ ! */
1846
+ INTERFACE
1847
+ SUBROUTINE MMGS_GET_ITHSOLS_INSOLSATVERTICES(sol,i,s,retval)
1848
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: sol
1849
+ INTEGER, INTENT(IN) :: i
1850
+ REAL(KIND=8), DIMENSION(*),INTENT(OUT) :: s
1851
+ INTEGER, INTENT(OUT) :: retval
1852
+ END SUBROUTINE
1853
+ END INTERFACE
1854
+ ! *
1855
+ ! */
1856
+
1857
+ ! LIBMMGS_EXPORT int MMGS_Get_ithSols_inSolsAtVertices(MMG5_pSol sol, int i, double* s);
1858
+
1859
+ ! /**
1860
+ ! * \brief Get the value of an integer parameter of the remesher.
1861
+ ! *
1862
+ ! * \param mesh pointer to the mesh structure.
1863
+ ! * \param iparam integer parameter to get (see \ref MMGS_Param structure).
1864
+ ! * \return The value of the parameter.
1865
+ ! *
1866
+ ! * This function retrieves the value of integer parameter \a iparam (see \ref
1867
+ ! * MMGS_Param for a list of parameters). It returns the value of the parameter,
1868
+ ! * or zero if the value of \a iparam is not recognized.
1869
+ ! *
1870
+ ! * \remark Fortran interface:
1871
+ ! */
1872
+ INTERFACE
1873
+ SUBROUTINE MMGS_GET_IPARAMETER(mesh,iparam,retval)
1874
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
1875
+ INTEGER(MMG5F_INT), INTENT(IN) :: iparam
1876
+ INTEGER, INTENT(OUT) :: retval
1877
+ END SUBROUTINE
1878
+ END INTERFACE
1879
+ ! *
1880
+ ! */
1881
+
1882
+ ! LIBMMGS_EXPORT int MMGS_Get_iparameter(MMG5_pMesh mesh, MMG5_int iparam);
1883
+
1884
+ ! /* input/output functions */
1885
+ ! /**
1886
+ ! * \brief Load a mesh (in .mesh/.mesb format) from file.
1887
+ ! *
1888
+ ! * \param mesh pointer to the mesh structure.
1889
+ ! * \param filename name of the file to load.
1890
+ ! * \return 0 on failure, 1 otherwise.
1891
+ ! *
1892
+ ! * This function reads .mesh (ASCII) and .meshb (binary) files. If the name
1893
+ ! * contains ".mesh" the file will be read as an ASCII file and if the name
1894
+ ! * contains .meshb it be read as a binary file. If the file contains neither of
1895
+ ! * these strings the function will first try to open "[filename].meshb"
1896
+ ! * and if this fails it will try "[filename].mesh".
1897
+ ! *
1898
+ ! * \remark Fortran interface:
1899
+ ! */
1900
+ INTERFACE
1901
+ SUBROUTINE MMGS_LOADMESH(mesh,filename,strlen0,retval)
1902
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
1903
+ CHARACTER(LEN=*), INTENT(IN) :: filename
1904
+ INTEGER, INTENT(IN) :: strlen0
1905
+ INTEGER, INTENT(OUT) :: retval
1906
+ END SUBROUTINE
1907
+ END INTERFACE
1908
+ ! *
1909
+ ! */
1910
+
1911
+ ! LIBMMGS_EXPORT int MMGS_loadMesh(MMG5_pMesh mesh, const char* filename);
1912
+
1913
+ ! /**
1914
+ ! * \brief Load a mesh and optionally a solution in VTP (VTK) format from file.
1915
+ ! *
1916
+ ! * \param mesh pointer to the mesh structure.
1917
+ ! * \param met pointer to the metric structure or the NULL pointer.
1918
+ ! * \param sol pointer to the level-set structure or the NULL pointer.
1919
+ ! * \param filename name of the file to load.
1920
+ ! * \return 0 on failure, 1 otherwise.
1921
+ ! *
1922
+ ! * This function reads a mesh and optionally one data field in VTK vtp file
1923
+ ! * format (.vtp extension). We read only low-order vertices, edges, triangles
1924
+ ! * and quadrangles.
1925
+ ! *
1926
+ ! * \remark Fortran interface:
1927
+ ! */
1928
+ INTERFACE
1929
+ SUBROUTINE MMGS_LOADVTPMESH(mesh,met,sol,filename,strlen0,retval)
1930
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met,sol
1931
+ CHARACTER(LEN=*), INTENT(IN) :: filename
1932
+ INTEGER, INTENT(IN) :: strlen0
1933
+ INTEGER, INTENT(OUT) :: retval
1934
+ END SUBROUTINE
1935
+ END INTERFACE
1936
+ ! *
1937
+ ! */
1938
+
1939
+ ! LIBMMGS_EXPORT int MMGS_loadVtpMesh(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol sol,
1940
+ ! const char *filename);
1941
+
1942
+ ! /**
1943
+ ! * \brief Load a mesh and multiple solutions in VTP (VTK) format from file.
1944
+ ! *
1945
+ ! * \param mesh pointer to the mesh structure.
1946
+ ! * \param sol pointer to the solution structure.
1947
+ ! * \param filename name of the file to load.
1948
+ ! * \return 0 on failure, 1 otherwise.
1949
+ ! *
1950
+ ! * Read a mesh and multiple data fields in VTK vtp file format (.vtp extension). We
1951
+ ! * read only low-order vertices, edges, triangles and quadrangles.
1952
+ ! *
1953
+ ! * \remark Fortran interface:
1954
+ ! */
1955
+ INTERFACE
1956
+ SUBROUTINE MMGS_LOADVTPMESH_AND_ALLDATA(mesh,sol,filename,strlen0,retval)
1957
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
1958
+ CHARACTER(LEN=*), INTENT(IN) :: filename
1959
+ INTEGER, INTENT(IN) :: strlen0
1960
+ INTEGER, INTENT(OUT) :: retval
1961
+ END SUBROUTINE
1962
+ END INTERFACE
1963
+ ! *
1964
+ ! */
1965
+
1966
+ ! LIBMMGS_EXPORT int MMGS_loadVtpMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol,
1967
+ ! const char *filename);
1968
+
1969
+ ! /**
1970
+ ! * \brief Load a mesh and possibly data in VTU (VTK) format from file.
1971
+ ! *
1972
+ ! * \param mesh pointer to the mesh structure.
1973
+ ! * \param met pointer to the metric structure or the NULL pointer.
1974
+ ! * \param sol pointer to the level-set structure or the NULL pointer.
1975
+ ! * \param filename name of the file to load.
1976
+ ! * \return 0 on failure, 1 otherwise.
1977
+ ! *
1978
+ ! * Read a mesh and optionally one data field in VTK vtu file format (.vtu
1979
+ ! * extension). We read only low-order vertices, edges, triangles and
1980
+ ! * quadrangles.
1981
+ ! *
1982
+ ! * \remark Fortran interface:
1983
+ ! */
1984
+ INTERFACE
1985
+ SUBROUTINE MMGS_LOADVTUMESH(mesh,met,sol,filename,strlen0,retval)
1986
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met,sol
1987
+ CHARACTER(LEN=*), INTENT(IN) :: filename
1988
+ INTEGER, INTENT(IN) :: strlen0
1989
+ INTEGER, INTENT(OUT) :: retval
1990
+ END SUBROUTINE
1991
+ END INTERFACE
1992
+ ! *
1993
+ ! */
1994
+
1995
+ ! LIBMMGS_EXPORT int MMGS_loadVtuMesh(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol sol, const char *filename);
1996
+
1997
+ ! /**
1998
+ ! * \brief Load a mesh and multiple solutions in VTU (VTK) format from file.
1999
+ ! *
2000
+ ! * \param mesh pointer to the mesh structure.
2001
+ ! * \param sol pointer to the solution structure.
2002
+ ! * \param filename name of the file to load.
2003
+ ! * \return 0 on failure, 1 otherwise.
2004
+ ! *
2005
+ ! * Read a mesh and multiple data field in VTK vtu file format (.vtu extension). We
2006
+ ! * read only low-order vertices, edges, triangles and quadrangles.
2007
+ ! *
2008
+ ! * \remark Fortran interface:
2009
+ ! */
2010
+ INTERFACE
2011
+ SUBROUTINE MMGS_LOADVTUMESH_AND_ALLDATA(mesh,sol,filename,strlen0,retval)
2012
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
2013
+ CHARACTER(LEN=*), INTENT(IN) :: filename
2014
+ INTEGER, INTENT(IN) :: strlen0
2015
+ INTEGER, INTENT(OUT) :: retval
2016
+ END SUBROUTINE
2017
+ END INTERFACE
2018
+ ! *
2019
+ ! */
2020
+
2021
+ ! LIBMMGS_EXPORT int MMGS_loadVtuMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol,
2022
+ ! const char *filename);
2023
+
2024
+ ! /**
2025
+ ! * \brief Load a mesh and possibly data in VTK format from file.
2026
+ ! *
2027
+ ! * \param mesh pointer to the mesh structure.
2028
+ ! * \param met pointer to the metric structure or the NULL pointer.
2029
+ ! * \param sol pointer to the level-set structure or the NULL pointer.
2030
+ ! * \param filename name of the file to load.
2031
+ ! * \return 0 on failure, 1 otherwise.
2032
+ ! *
2033
+ ! * Read a mesh and optionally one data field in VTK vtk file format (.vtk extension). We
2034
+ ! * read only low-order vertices, edges, triangles and quadrangles.
2035
+ ! *
2036
+ ! * \remark Fortran interface:
2037
+ ! */
2038
+ INTERFACE
2039
+ SUBROUTINE MMGS_LOADVTKMESH(mesh,met,sol,filename,strlen0,retval)
2040
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met,sol
2041
+ CHARACTER(LEN=*), INTENT(IN) :: filename
2042
+ INTEGER, INTENT(IN) :: strlen0
2043
+ INTEGER, INTENT(OUT) :: retval
2044
+ END SUBROUTINE
2045
+ END INTERFACE
2046
+ ! *
2047
+ ! */
2048
+
2049
+ ! LIBMMGS_EXPORT int MMGS_loadVtkMesh(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol sol,
2050
+ ! const char *filename);
2051
+
2052
+ ! /**
2053
+ ! * \brief Load a mesh and multiple solutions in VTK format from file.
2054
+ ! *
2055
+ ! * \param mesh pointer to the mesh structure.
2056
+ ! * \param sol pointer to the solution structure.
2057
+ ! * \param filename name of the file to load.
2058
+ ! * \return 0 on failure, 1 otherwise.
2059
+ ! *
2060
+ ! * Read a mesh and multiple data field in VTK vtk file format (.vtk extension). We
2061
+ ! * read only low-order vertices, edges, triangles and quadrangles.
2062
+ ! *
2063
+ ! * \remark Fortran interface:
2064
+ ! */
2065
+ INTERFACE
2066
+ SUBROUTINE MMGS_LOADVTKMESH_AND_ALLDATA(mesh,sol,filename,strlen0,retval)
2067
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
2068
+ CHARACTER(LEN=*), INTENT(IN) :: filename
2069
+ INTEGER, INTENT(IN) :: strlen0
2070
+ INTEGER, INTENT(OUT) :: retval
2071
+ END SUBROUTINE
2072
+ END INTERFACE
2073
+ ! *
2074
+ ! */
2075
+
2076
+ ! LIBMMGS_EXPORT int MMGS_loadVtkMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol,
2077
+ ! const char *filename);
2078
+
2079
+ ! /**
2080
+ ! * \brief Load a mesh and possibly a solution in .msh format from file.
2081
+ ! *
2082
+ ! * \param mesh pointer to the mesh structure.
2083
+ ! * \param sol pointer to the solution structure.
2084
+ ! * \param filename name of the file to load.
2085
+ ! * \return 0 on failure, 1 otherwise.
2086
+ ! *
2087
+ ! * Read a mesh and optionally one data field in MSH file format (.msh extension). We read
2088
+ ! * only low-order vertices, edges, triangles, quadrangles, tetrahedra and prisms.
2089
+ ! *
2090
+ ! * \remark Fortran interface:
2091
+ ! */
2092
+ INTERFACE
2093
+ SUBROUTINE MMGS_LOADMSHMESH(mesh,sol,filename,strlen0,retval)
2094
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
2095
+ CHARACTER(LEN=*), INTENT(IN) :: filename
2096
+ INTEGER, INTENT(IN) :: strlen0
2097
+ INTEGER, INTENT(OUT) :: retval
2098
+ END SUBROUTINE
2099
+ END INTERFACE
2100
+ ! *
2101
+ ! */
2102
+
2103
+ ! LIBMMGS_EXPORT int MMGS_loadMshMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename);
2104
+
2105
+ ! /**
2106
+ ! * \brief Load a mesh and all data from a file in MSH format.
2107
+ ! *
2108
+ ! * \param mesh pointer to the mesh structure.
2109
+ ! * \param sol pointer to a list of solution structures.
2110
+ ! * \param filename name of the file to load.
2111
+ ! * \return 0 on failure, 1 otherwise.
2112
+ ! *
2113
+ ! * Read a mesh and multiple data in MSH file format (.msh extension). We read only
2114
+ ! * low-order vertices, edges, triangles, quadrangles, tetrahedra and prisms.
2115
+ ! *
2116
+ ! * \remark Fortran interface:
2117
+ ! */
2118
+ INTERFACE
2119
+ SUBROUTINE MMGS_LOADMSHMESH_AND_ALLDATA(mesh,sol,filename,strlen0,retval)
2120
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
2121
+ CHARACTER(LEN=*), INTENT(IN) :: filename
2122
+ INTEGER, INTENT(IN) :: strlen0
2123
+ INTEGER, INTENT(OUT) :: retval
2124
+ END SUBROUTINE
2125
+ END INTERFACE
2126
+ ! *
2127
+ ! */
2128
+
2129
+ ! LIBMMGS_EXPORT int MMGS_loadMshMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename);
2130
+
2131
+ ! /**
2132
+ ! * \brief Load a mesh and all data from a file. The format will be guessed from the filename extension.
2133
+ ! *
2134
+ ! * \param mesh pointer to the mesh structure.
2135
+ ! * \param met pointer to the metric structure or the NULL pointer.
2136
+ ! * \param sol pointer to the level-set structure or the NULL pointer.
2137
+ ! * \param filename name of the file to load.
2138
+ ! * \return 0 on failure, 1 otherwise.
2139
+ ! *
2140
+ ! * \remark Fortran interface:
2141
+ ! */
2142
+ INTERFACE
2143
+ SUBROUTINE MMGS_LOADGENERICMESH(mesh,met,sol,filename,strlen0,retval)
2144
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met,sol
2145
+ CHARACTER(LEN=*), INTENT(IN) :: filename
2146
+ INTEGER, INTENT(IN) :: strlen0
2147
+ INTEGER, INTENT(OUT) :: retval
2148
+ END SUBROUTINE
2149
+ END INTERFACE
2150
+ ! *
2151
+ ! */
2152
+
2153
+ ! LIBMMGS_EXPORT int MMGS_loadGenericMesh(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol sol,
2154
+ ! const char *filename);
2155
+
2156
+ ! /**
2157
+ ! * \brief Save a mesh in .mesh or .meshb format.
2158
+ ! *
2159
+ ! * \param mesh pointer to the mesh structure.
2160
+ ! * \param filename name of the file to load.
2161
+ ! * \return 0 on failure, 1 otherwise.
2162
+ ! *
2163
+ ! * This function saves a mesh in .mesh or .meshb format (depending on the
2164
+ ! * filename extension).
2165
+ ! *
2166
+ ! * \remark Fortran interface:
2167
+ ! */
2168
+ INTERFACE
2169
+ SUBROUTINE MMGS_SAVEMESH(mesh,filename,strlen0,retval)
2170
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
2171
+ CHARACTER(LEN=*), INTENT(IN) :: filename
2172
+ INTEGER, INTENT(IN) :: strlen0
2173
+ INTEGER, INTENT(OUT) :: retval
2174
+ END SUBROUTINE
2175
+ END INTERFACE
2176
+ ! *
2177
+ ! */
2178
+
2179
+ ! LIBMMGS_EXPORT int MMGS_saveMesh(MMG5_pMesh mesh, const char *filename);
2180
+
2181
+ ! /**
2182
+ ! * \brief Write mesh and optionally one data field in MSH file format (.msh extension).
2183
+ ! *
2184
+ ! * \param mesh pointer to the mesh structure.
2185
+ ! * \param sol pointer to the solution structure.
2186
+ ! * \param filename name of the file to load.
2187
+ ! * \return 0 on failure, 1 otherwise.
2188
+ ! *
2189
+ ! * The file is saved in ASCII format for .msh extension, an in binary format for
2190
+ ! * a .mshb extension.
2191
+ ! *
2192
+ ! * \remark Fortran interface:
2193
+ ! */
2194
+ INTERFACE
2195
+ SUBROUTINE MMGS_SAVEMSHMESH(mesh,sol,filename,strlen0,retval)
2196
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
2197
+ CHARACTER(LEN=*), INTENT(IN) :: filename
2198
+ INTEGER, INTENT(IN) :: strlen0
2199
+ INTEGER, INTENT(OUT) :: retval
2200
+ END SUBROUTINE
2201
+ END INTERFACE
2202
+ ! *
2203
+ ! */
2204
+
2205
+ ! LIBMMGS_EXPORT int MMGS_saveMshMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename);
2206
+
2207
+ ! /**
2208
+ ! * \brief Save a mesh and multiple data fields in MSH format, ascii or binary
2209
+ ! * depending on the filename extension.
2210
+ ! *
2211
+ ! * \param mesh pointer to the mesh structure.
2212
+ ! * \param sol pointer to the solution structure.
2213
+ ! * \param filename name of the file to write.
2214
+ ! * \return 0 on failure, 1 otherwise.
2215
+ ! *
2216
+ ! * This function saves a mesh and multiple data fields (that are considered as
2217
+ ! * solutions and not metrics, thus, we do nothing over the ridge vertices) in MSH
2218
+ ! * file format (.msh extension). The file is saved in ASCII format for .msh
2219
+ ! * extension and in binary format for a .mshb extension.
2220
+ ! *
2221
+ ! * \remark Fortran interface:
2222
+ ! */
2223
+ INTERFACE
2224
+ SUBROUTINE MMGS_SAVEMSHMESH_AND_ALLDATA(mesh,sol,filename,strlen0,retval)
2225
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
2226
+ CHARACTER(LEN=*), INTENT(IN) :: filename
2227
+ INTEGER, INTENT(IN) :: strlen0
2228
+ INTEGER, INTENT(OUT) :: retval
2229
+ END SUBROUTINE
2230
+ END INTERFACE
2231
+ ! *
2232
+ ! */
2233
+
2234
+ ! LIBMMGS_EXPORT int MMGS_saveMshMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename);
2235
+
2236
+ ! /**
2237
+ ! * \brief Write mesh and optionally one data field in Vtk file format (.vtk extension).
2238
+ ! *
2239
+ ! * \param mesh pointer to the mesh structure.
2240
+ ! * \param sol pointer to the solution structure.
2241
+ ! * \param filename name of the file to write.
2242
+ ! * \return 0 on failure, 1 otherwise.
2243
+ ! *
2244
+ ! * \remark Fortran interface:
2245
+ ! */
2246
+ INTERFACE
2247
+ SUBROUTINE MMGS_SAVEVTKMESH(mesh,sol,filename,strlen0,retval)
2248
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
2249
+ CHARACTER(LEN=*), INTENT(IN) :: filename
2250
+ INTEGER, INTENT(IN) :: strlen0
2251
+ INTEGER, INTENT(OUT) :: retval
2252
+ END SUBROUTINE
2253
+ END INTERFACE
2254
+ ! *
2255
+ ! */
2256
+
2257
+ ! LIBMMGS_EXPORT int MMGS_saveVtkMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename);
2258
+
2259
+ ! /**
2260
+ ! * \brief Save a mesh and multiple data fields in VTK format.
2261
+ ! *
2262
+ ! * \param mesh pointer to the mesh structure.
2263
+ ! * \param sol pointer to the solution structure.
2264
+ ! * \param filename name of the file to write.
2265
+ ! * \return 0 on failure, 1 otherwise.
2266
+ ! *
2267
+ ! * This function writes a mesh and a list of data fields in Vtk file format (.vtk extension).
2268
+ ! *
2269
+ ! * \remark Fortran interface:
2270
+ ! */
2271
+ INTERFACE
2272
+ SUBROUTINE MMGS_SAVEVTKMESH_AND_ALLDATA(mesh,sol,filename,strlen0,retval)
2273
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
2274
+ CHARACTER(LEN=*), INTENT(IN) :: filename
2275
+ INTEGER, INTENT(IN) :: strlen0
2276
+ INTEGER, INTENT(OUT) :: retval
2277
+ END SUBROUTINE
2278
+ END INTERFACE
2279
+ ! *
2280
+ ! */
2281
+
2282
+ ! LIBMMGS_EXPORT int MMGS_saveVtkMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename);
2283
+
2284
+ ! /**
2285
+ ! * \brief Write mesh and optionally one data field vtu Vtk file format (.vtu extension).
2286
+ ! *
2287
+ ! * \param mesh pointer to the mesh structure.
2288
+ ! * \param sol pointer to the solution structure.
2289
+ ! * \param filename name of the file to write.
2290
+ ! * \return 0 on failure, 1 otherwise.
2291
+ ! *
2292
+ ! * \remark Fortran interface:
2293
+ ! */
2294
+ INTERFACE
2295
+ SUBROUTINE MMGS_SAVEVTUMESH(mesh,sol,filename,strlen0,retval)
2296
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
2297
+ CHARACTER(LEN=*), INTENT(IN) :: filename
2298
+ INTEGER, INTENT(IN) :: strlen0
2299
+ INTEGER, INTENT(OUT) :: retval
2300
+ END SUBROUTINE
2301
+ END INTERFACE
2302
+ ! *
2303
+ ! */
2304
+
2305
+ ! LIBMMGS_EXPORT int MMGS_saveVtuMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename);
2306
+
2307
+ ! /**
2308
+ ! * \brief Write a mesh and multiple data fields in vtu Vtk file format (.vtu extension).
2309
+ ! *
2310
+ ! * \param mesh pointer to the mesh structure.
2311
+ ! * \param sol pointer to the solution structure.
2312
+ ! * \param filename name of the file to write.
2313
+ ! * \return 0 on failure, 1 otherwise.
2314
+ ! *
2315
+ ! * \remark Fortran interface:
2316
+ ! */
2317
+ INTERFACE
2318
+ SUBROUTINE MMGS_SAVEVTUMESH_AND_ALLDATA(mesh,sol,filename,strlen0,retval)
2319
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
2320
+ CHARACTER(LEN=*), INTENT(IN) :: filename
2321
+ INTEGER, INTENT(IN) :: strlen0
2322
+ INTEGER, INTENT(OUT) :: retval
2323
+ END SUBROUTINE
2324
+ END INTERFACE
2325
+ ! *
2326
+ ! */
2327
+
2328
+ ! LIBMMGS_EXPORT int MMGS_saveVtuMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol,
2329
+ ! const char *filename);
2330
+
2331
+ ! /**
2332
+ ! * \brief Save a mesh and optionally one data field in VTP format.
2333
+ ! *
2334
+ ! * \param mesh pointer to the mesh structure.
2335
+ ! * \param sol pointer to the solution structure.
2336
+ ! * \param filename name of the file to write.
2337
+ ! * \return 0 on failure, 1 otherwise.
2338
+ ! *
2339
+ ! * This function writes a mesh and optionally one data in polydata Vtk file
2340
+ ! * format (.vtp extension).
2341
+ ! *
2342
+ ! * \remark Fortran interface:
2343
+ ! */
2344
+ INTERFACE
2345
+ SUBROUTINE MMGS_SAVEVTPMESH(mesh,sol,filename,strlen0,retval)
2346
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
2347
+ CHARACTER(LEN=*), INTENT(IN) :: filename
2348
+ INTEGER, INTENT(IN) :: strlen0
2349
+ INTEGER, INTENT(OUT) :: retval
2350
+ END SUBROUTINE
2351
+ END INTERFACE
2352
+ ! *
2353
+ ! */
2354
+
2355
+ ! LIBMMGS_EXPORT int MMGS_saveVtpMesh(MMG5_pMesh mesh, MMG5_pSol sol,
2356
+ ! const char *filename);
2357
+
2358
+ ! /**
2359
+ ! * \brief Save a mesh and multiple data fields in VTP format.
2360
+ ! *
2361
+ ! * \param mesh pointer to the mesh structure.
2362
+ ! * \param sol pointer to the solution structure.
2363
+ ! * \param filename name of the file to write.
2364
+ ! * \return 0 on failure, 1 otherwise.
2365
+ ! *
2366
+ ! * This function writes a mesh and multiple data fields in polydata Vtk file
2367
+ ! * format (.vtp extension).
2368
+ ! *
2369
+ ! * \remark Fortran interface:
2370
+ ! */
2371
+ INTERFACE
2372
+ SUBROUTINE MMGS_SAVEVTPMESH_AND_ALLDATA(mesh,sol,filename,strlen0,retval)
2373
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
2374
+ CHARACTER(LEN=*), INTENT(IN) :: filename
2375
+ INTEGER, INTENT(IN) :: strlen0
2376
+ INTEGER, INTENT(OUT) :: retval
2377
+ END SUBROUTINE
2378
+ END INTERFACE
2379
+ ! *
2380
+ ! */
2381
+
2382
+ ! LIBMMGS_EXPORT int MMGS_saveVtpMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol,
2383
+ ! const char *filename);
2384
+
2385
+ ! /**
2386
+ ! * \brief Save mesh data in a file whose format depends on the filename extension.
2387
+ ! *
2388
+ ! * \param mesh pointer to the mesh structure.
2389
+ ! * \param filename name of the file to write.
2390
+ ! * \return 0 on failure, 1 otherwise.
2391
+ ! *
2392
+ ! * \remark Fortran interface:
2393
+ ! */
2394
+ INTERFACE
2395
+ SUBROUTINE MMGS_SAVEGENERICMESH(mesh,sol,filename,strlen0,retval)
2396
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
2397
+ CHARACTER(LEN=*), INTENT(IN) :: filename
2398
+ INTEGER, INTENT(IN) :: strlen0
2399
+ INTEGER, INTENT(OUT) :: retval
2400
+ END SUBROUTINE
2401
+ END INTERFACE
2402
+ ! *
2403
+ ! */
2404
+
2405
+ ! LIBMMGS_EXPORT int MMGS_saveGenericMesh(MMG5_pMesh mesh, MMG5_pSol sol,
2406
+ ! const char *filename);
2407
+
2408
+ ! /**
2409
+ ! * \brief Load a metric field (or other solution) in medit's .sol format.
2410
+ ! *
2411
+ ! * \param mesh pointer to the mesh structure.
2412
+ ! * \param met pointer to the sol structure.
2413
+ ! * \param filename name of the file to load.
2414
+ ! * \return 0 on failure, 1 otherwise.
2415
+ ! *
2416
+ ! * Load metric field. The solution file (in medit file format) must contain
2417
+ ! * only 1 solution: the metric.
2418
+ ! *
2419
+ ! * \remark Fortran interface:
2420
+ ! */
2421
+ INTERFACE
2422
+ SUBROUTINE MMGS_LOADSOL(mesh,met,filename,strlen0,retval)
2423
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
2424
+ CHARACTER(LEN=*), INTENT(IN) :: filename
2425
+ INTEGER, INTENT(IN) :: strlen0
2426
+ INTEGER, INTENT(OUT) :: retval
2427
+ END SUBROUTINE
2428
+ END INTERFACE
2429
+ ! *
2430
+ ! */
2431
+
2432
+ ! LIBMMGS_EXPORT int MMGS_loadSol(MMG5_pMesh mesh, MMG5_pSol met, const char* filename);
2433
+
2434
+ ! /**
2435
+ ! * \brief Load one or more solutions in a solution file in medit file format.
2436
+ ! *
2437
+ ! * \param mesh pointer to the mesh structure.
2438
+ ! * \param sol pointer to the solutions array
2439
+ ! * \param filename name of the file to load.
2440
+ ! * \return 0 on failure, 1 otherwise.
2441
+ ! *
2442
+ ! * \remark Fortran interface:
2443
+ ! */
2444
+ INTERFACE
2445
+ SUBROUTINE MMGS_LOADALLSOLS(mesh,sol,filename,strlen0,retval)
2446
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
2447
+ CHARACTER(LEN=*), INTENT(IN) :: filename
2448
+ INTEGER, INTENT(IN) :: strlen0
2449
+ INTEGER, INTENT(OUT) :: retval
2450
+ END SUBROUTINE
2451
+ END INTERFACE
2452
+ ! *
2453
+ ! */
2454
+
2455
+ ! LIBMMGS_EXPORT int MMGS_loadAllSols(MMG5_pMesh mesh, MMG5_pSol *sol,
2456
+ ! const char* filename);
2457
+
2458
+ ! /**
2459
+ ! * \brief Write an isotropic or anisotropic metric in medit file format.
2460
+ ! *
2461
+ ! * \param mesh pointer to the mesh structure.
2462
+ ! * \param met pointer to the sol structure.
2463
+ ! * \param filename name of the file to write.
2464
+ ! * \return 0 on failure, 1 otherwise.
2465
+ ! *
2466
+ ! * \remark Fortran interface:
2467
+ ! */
2468
+ INTERFACE
2469
+ SUBROUTINE MMGS_SAVESOL(mesh,met,filename,strlen0,retval)
2470
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
2471
+ CHARACTER(LEN=*), INTENT(IN) :: filename
2472
+ INTEGER, INTENT(IN) :: strlen0
2473
+ INTEGER, INTENT(OUT) :: retval
2474
+ END SUBROUTINE
2475
+ END INTERFACE
2476
+ ! *
2477
+ ! */
2478
+
2479
+ ! LIBMMGS_EXPORT int MMGS_saveSol(MMG5_pMesh mesh, MMG5_pSol met,
2480
+ ! const char *filename);
2481
+
2482
+ ! /**
2483
+ ! * \brief Save one or more solutions in a solution file in medit file format.
2484
+ ! *
2485
+ ! * \param mesh pointer to the mesh structure.
2486
+ ! * \param sol pointer to the solutions array
2487
+ ! * \param filename name of the solution file.
2488
+ ! * \return 0 or -1 on failure, 1 otherwise.
2489
+ ! *
2490
+ ! * \remark Fortran interface:
2491
+ ! */
2492
+ INTERFACE
2493
+ SUBROUTINE MMGS_SAVEALLSOLS(mesh,sol,filename,strlen0,retval)
2494
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
2495
+ CHARACTER(LEN=*), INTENT(IN) :: filename
2496
+ INTEGER, INTENT(IN) :: strlen0
2497
+ INTEGER, INTENT(OUT) :: retval
2498
+ END SUBROUTINE
2499
+ END INTERFACE
2500
+ ! *
2501
+ ! */
2502
+
2503
+ ! LIBMMGS_EXPORT int MMGS_saveAllSols(MMG5_pMesh mesh, MMG5_pSol *sol,
2504
+ ! const char *filename);
2505
+
2506
+ ! /**
2507
+ ! * \brief Deallocate an array of solution fields
2508
+ ! *
2509
+ ! * \param mesh pointer to the mesh structure.
2510
+ ! * \param sol pointer to an array of solution structures (that stores solution fields).
2511
+ ! * \return 1
2512
+ ! *
2513
+ ! * \remark Fortran interface:
2514
+ ! */
2515
+ INTERFACE
2516
+ SUBROUTINE MMGS_Free_allSols(mesh,sol,retval)
2517
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
2518
+ INTEGER, INTENT(OUT) :: retval
2519
+ END SUBROUTINE
2520
+ END INTERFACE
2521
+ ! *
2522
+ ! */
2523
+
2524
+ ! LIBMMGS_EXPORT int MMGS_Free_allSols(MMG5_pMesh mesh,MMG5_pSol *sol);
2525
+
2526
+ ! /* deallocations */
2527
+ ! /**
2528
+ ! * \brief Deallocations before return.
2529
+ ! *
2530
+ ! * \param starter dummy argument used to initialize the variadic argument list.
2531
+ ! * \param ... variadic arguments.
2532
+ ! *
2533
+ ! * For the \ref MMGS_mmgslib function, you need
2534
+ ! * to call the \ref MMGS_Init_mesh function with the following arguments :
2535
+ ! * MMGS_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppMet,
2536
+ ! * &your_metric,MMG5_ARG_end).
2537
+ ! *
2538
+ ! * For the \ref MMGS_mmgsls function, you need
2539
+ ! * to call the \ref MMGS_Init_mesh function with the following arguments :
2540
+ ! * MMGS_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppLs,
2541
+ ! * &your_level_set,MMG5_ARG_end).
2542
+ ! *
2543
+ ! * Here, \a your_mesh is a \ref MMG5_pMesh, \a your_metric and \a your_level_set
2544
+ ! * are \ref MMG5_pSol.
2545
+ ! *
2546
+ ! * \return 0 on failure, 1 on success
2547
+ ! *
2548
+ ! * \remark we pass the structures by reference in order to have argument
2549
+ ! * compatibility between the library call from a Fortran code and a C code.
2550
+ ! *
2551
+ ! * \remark no Fortran interface to allow variadic args.
2552
+ ! *
2553
+ ! */
2554
+
2555
+ ! LIBMMGS_EXPORT int MMGS_Free_all(const int starter,...);
2556
+
2557
+ ! /**
2558
+ ! * \brief Structure deallocations before return.
2559
+ ! *
2560
+ ! * \param starter dummy argument used to initialize the variadic argument list.
2561
+ ! * \param ... variadic arguments.
2562
+ ! *
2563
+ ! * For the \ref MMGS_mmgslib function, you need
2564
+ ! * to call the \ref MMGS_Init_mesh function with the following arguments :
2565
+ ! * MMGS_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppMet,
2566
+ ! * &your_metric,MMG5_ARG_end).
2567
+ ! *
2568
+ ! * For the \ref MMGS_mmgsls function, you need
2569
+ ! * to call the \ref MMGS_Init_mesh function with the following arguments :
2570
+ ! * MMGS_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppLs,
2571
+ ! * &your_level_set,MMG5_ARG_end).
2572
+ ! *
2573
+ ! * Here, \a your_mesh is a pointer to \ref MMG5_pMesh and \a your_metric and
2574
+ ! * \a your_level_set are pointers to \ref MMG5_pSol.
2575
+ ! *
2576
+ ! * \return 0 on failure, 1 on success
2577
+ ! *
2578
+ ! * \remark we pass the structures by reference in order to have argument
2579
+ ! * compatibility between the library call from a Fortran code and a C code.
2580
+ ! *
2581
+ ! * \remark no Fortran interface to allow variadic args.
2582
+ ! *
2583
+ ! */
2584
+
2585
+ ! LIBMMGS_EXPORT int MMGS_Free_structures(const int starter,...);
2586
+
2587
+ ! /**
2588
+ ! * \brief Structure deallocations before return.
2589
+ ! *
2590
+ ! * \param starter dummy argument used to initialize the variadic argument list.
2591
+ ! * \param ... variadic arguments.
2592
+ ! *
2593
+ ! * For the \ref MMGS_mmgslib function, you need
2594
+ ! * to call the \ref MMGS_Init_mesh function with the following arguments :
2595
+ ! * MMGS_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppMet,
2596
+ ! * &your_metric,MMG5_ARG_end).
2597
+ ! *
2598
+ ! * For the \ref MMGS_mmgsls function, you need
2599
+ ! * to call the \ref MMGS_Init_mesh function with the following arguments :
2600
+ ! * MMGS_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppLs,
2601
+ ! * &your_level_set,MMG5_ARG_end).
2602
+ ! *
2603
+ ! * Here, \a your_mesh is a \ref MMG5_pMesh, \a your_metric and \a your_level_set
2604
+ ! * are \ref MMG5_pSol.
2605
+ ! *
2606
+ ! * \return 0 on failure, 1 on success
2607
+ ! *
2608
+ ! * \remark we pass the structures by reference in order to have argument
2609
+ ! * compatibility between the library call from a Fortran code and a C code.
2610
+ ! *
2611
+ ! * \remark no Fortran interface to allow variadic args.
2612
+ ! *
2613
+ ! */
2614
+
2615
+ ! LIBMMGS_EXPORT int MMGS_Free_names(const int starter,...);
2616
+
2617
+ ! /* library */
2618
+ ! /**
2619
+ ! * \brief Main "program" for mesh adaptation.
2620
+ ! *
2621
+ ! * \param mesh pointer to the mesh structure. \param met pointer to the sol
2622
+ ! * (metric) structure. \return \ref MMG5_SUCCESS on success, \ref
2623
+ ! * MMG5_LOWFAILURE in case there is a failure but a conform mesh can be returned
2624
+ ! * or \ref MMG5_STRONGFAILURE if there is a failure and we can't save the mesh.
2625
+ ! *
2626
+ ! * Main program for the library.
2627
+ ! *
2628
+ ! * \remark Fortran interface:
2629
+ ! */
2630
+ INTERFACE
2631
+ SUBROUTINE MMGS_MMGSLIB(mesh,met,retval)
2632
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
2633
+ INTEGER, INTENT(OUT) :: retval
2634
+ END SUBROUTINE
2635
+ END INTERFACE
2636
+ ! *
2637
+ ! */
2638
+
2639
+ ! LIBMMGS_EXPORT int MMGS_mmgslib(MMG5_pMesh mesh, MMG5_pSol met);
2640
+
2641
+ ! /**
2642
+ ! * \brief Main "program" for level-set discretization.
2643
+ ! *
2644
+ ! * \param mesh pointer to the mesh structure. \param sol pointer to the sol
2645
+ ! * (level-set) structure. \param met pointer to the sol (metric) structure
2646
+ ! * (optionnal). \return \ref MMG5_SUCCESS on success, \ref MMG5_LOWFAILURE if
2647
+ ! * there is a a failure but a conform mesh is saved or \ref MMG5_STRONGFAILURE
2648
+ ! * if there is a a failure and we can't save the mesh.
2649
+ ! *
2650
+ ! * Main program for level set discretization library. If a metric \a met is
2651
+ ! * provided, use it to adapt the mesh.
2652
+ ! *
2653
+ ! * \remark Fortran interface:
2654
+ ! */
2655
+ INTERFACE
2656
+ SUBROUTINE MMGS_MMGSLS(mesh,sol,met,retval)
2657
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
2658
+ MMG5_DATA_PTR_T :: met
2659
+ INTEGER, INTENT(OUT) :: retval
2660
+ END SUBROUTINE
2661
+ END INTERFACE
2662
+ ! *
2663
+ ! */
2664
+
2665
+ ! LIBMMGS_EXPORT int MMGS_mmgsls(MMG5_pMesh mesh, MMG5_pSol sol,MMG5_pSol met);
2666
+
2667
+ ! /** To associate function pointers without calling MMGS_mmgslib */
2668
+ ! /**
2669
+ ! * \brief Set function pointers for caltet, lenedg, defsiz and gradsiz.
2670
+ ! *
2671
+ ! * \param mesh pointer to the mesh structure (unused).
2672
+ ! * \param met pointer to the sol structure (unused).
2673
+ ! *
2674
+ ! * \remark Fortran interface:
2675
+ ! */
2676
+ INTERFACE
2677
+ SUBROUTINE MMGS_SETFUNC(mesh,met)
2678
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
2679
+ END SUBROUTINE
2680
+ END INTERFACE
2681
+ ! *
2682
+ ! */
2683
+
2684
+ ! LIBMMGS_EXPORT void MMGS_setfunc(MMG5_pMesh mesh,MMG5_pSol met);
2685
+
2686
+ ! /**
2687
+ ! * \brief Get the number of non-boundary edges.
2688
+ ! *
2689
+ ! * \param mesh pointer to the mesh structure.
2690
+ ! * \param the number of edges pointer to the number of non boundary edges.
2691
+ ! * \return 0 on failure, 1 otherwise.
2692
+ ! *
2693
+ ! * Get the number of non-boundary edges (for DG methods for example). An edge is
2694
+ ! * boundary if it is located at the interface of 2 domains with different
2695
+ ! * references, if it belongs to one triangle only or if it is a singular edge
2696
+ ! * (ridge or required).
2697
+ ! * Append these edges to the list of edges.
2698
+ ! *
2699
+ ! * \warning reallocate the edge array and append the internal edges. This may
2700
+ ! * modify the behaviour of other functions.
2701
+ ! *
2702
+ ! * \remark Fortran interface:
2703
+ ! */
2704
+ INTERFACE
2705
+ SUBROUTINE MMGS_GET_NUMBEROFNONBDYEDGES(mesh,nb_edges,retval)
2706
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
2707
+ INTEGER(MMG5F_INT), INTENT(OUT):: nb_edges
2708
+ INTEGER, INTENT(OUT) :: retval
2709
+ END SUBROUTINE
2710
+ END INTERFACE
2711
+ ! *
2712
+ ! */
2713
+
2714
+ ! LIBMMGS_EXPORT int MMGS_Get_numberOfNonBdyEdges(MMG5_pMesh mesh, MMG5_int* nb_edges);
2715
+
2716
+ ! /**
2717
+ ! * \brief Get vertices and reference of a non-boundary edge.
2718
+ ! *
2719
+ ! * \param mesh pointer to the mesh structure.
2720
+ ! * \param e0 pointer to the first extremity of the edge (a vertex number).
2721
+ ! * \param e1 pointer to the second extremity of the edge (a vertex number).
2722
+ ! * \param ref pointer to the edge reference.
2723
+ ! * \param idx index of the non boundary edge to get (between 1 and the number of edges)
2724
+ ! * \return 0 on failure, 1 otherwise.
2725
+ ! *
2726
+ ! * This function returns the vertices \a e0, \a e1 and reference \a ref of the non boundary
2727
+ ! * edge \a idx. An edge is boundary if it is located at
2728
+ ! * the interface of 2 domains with different references, if it belongs to one
2729
+ ! * triangle only or if it is a singular edge (ridge or required).
2730
+ ! *
2731
+ ! * \remark Fortran interface:
2732
+ ! */
2733
+ INTERFACE
2734
+ SUBROUTINE MMGS_GET_NONBDYEDGE(mesh,e0,e1,ref,idx,retval)
2735
+ MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
2736
+ INTEGER(MMG5F_INT), INTENT(OUT):: e0,e1
2737
+ INTEGER(MMG5F_INT) :: ref
2738
+ INTEGER(MMG5F_INT), INTENT(IN) :: idx
2739
+ INTEGER, INTENT(OUT) :: retval
2740
+ END SUBROUTINE
2741
+ END INTERFACE
2742
+ ! *
2743
+ ! */
2744
+
2745
+ ! LIBMMGS_EXPORT int MMGS_Get_nonBdyEdge(MMG5_pMesh mesh, MMG5_int* e0, MMG5_int* e1,
2746
+ ! MMG5_int* ref, MMG5_int idx);
2747
+
2748
+
2749
+ ! /* Tools for the library */
2750
+ ! /**
2751
+ ! * \brief Compute an isotropic size map according to the mean of the length of the
2752
+ ! * edges passing through a vertex.
2753
+ ! *
2754
+ ! * \param mesh pointer to the mesh structure
2755
+ ! * \param met pointer to the sol structure
2756
+ ! * \return 1 on success
2757
+ ! *
2758
+ ! * \remark Fortran interface:
2759
+ ! */
2760
+ INTERFACE
2761
+ SUBROUTINE MMGS_DOSOL(mesh,met,retval)
2762
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
2763
+ INTEGER, INTENT(OUT) :: retval
2764
+ END SUBROUTINE
2765
+ END INTERFACE
2766
+ ! *
2767
+ ! */
2768
+
2769
+ ! LIBMMGS_EXPORT extern int (*MMGS_doSol)(MMG5_pMesh mesh,MMG5_pSol met);
2770
+
2771
+ ! /**
2772
+ ! * \brief Compute a constant size map.
2773
+ ! *
2774
+ ! * \param mesh pointer to the mesh structure
2775
+ ! * \param met pointer to the sol structure
2776
+ ! * \return 1 on success
2777
+ ! *
2778
+ ! * This function computes a constant size map according to mesh->info.hsiz,
2779
+ ! * mesh->info.hmin and mesh->info.hmax. It updates these 3 values if they are
2780
+ ! * not compatible.
2781
+ ! *
2782
+ ! * \remark Fortran interface:
2783
+ ! */
2784
+ INTERFACE
2785
+ SUBROUTINE MMGS_SET_CONSTANTSIZE(mesh,met,retval)
2786
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
2787
+ INTEGER, INTENT(OUT) :: retval
2788
+ END SUBROUTINE
2789
+ END INTERFACE
2790
+ ! *
2791
+ ! */
2792
+
2793
+ ! LIBMMGS_EXPORT int MMGS_Set_constantSize(MMG5_pMesh mesh,MMG5_pSol met);
2794
+
2795
+ ! /**
2796
+ ! * \brief Print help for mmgs options.
2797
+ ! *
2798
+ ! * \param prog pointer to the program name.
2799
+ ! *
2800
+ ! * \remark Fortran interface:
2801
+ ! */
2802
+ INTERFACE
2803
+ SUBROUTINE MMGS_USAGE(prog,strlen0,retval)
2804
+ CHARACTER(LEN=*), INTENT(IN) :: prog
2805
+ INTEGER, INTENT(IN) :: strlen0
2806
+ INTEGER, INTENT(OUT) :: retval
2807
+ END SUBROUTINE
2808
+ END INTERFACE
2809
+ ! *
2810
+ ! */
2811
+
2812
+ ! LIBMMGS_EXPORT int MMGS_usage(char *prog);
2813
+
2814
+ ! /**
2815
+ ! * \brief Store command line arguments.
2816
+ ! *
2817
+ ! * \param argc number of command line arguments.
2818
+ ! * \param argv command line arguments.
2819
+ ! * \param mesh pointer to the mesh structure.
2820
+ ! * \param met pointer to the sol structure.
2821
+ ! * \param sol pointer to a level-set or displacement
2822
+ ! *
2823
+ ! * \return 1.
2824
+ ! *
2825
+ ! * \remark no matching fortran function.
2826
+ ! *
2827
+ ! */
2828
+
2829
+ ! LIBMMGS_EXPORT int MMGS_parsar(int argc,char *argv[],MMG5_pMesh mesh,MMG5_pSol met,MMG5_pSol sol);
2830
+
2831
+ ! /**
2832
+ ! * \brief Print the default parameter values.
2833
+ ! *
2834
+ ! * \param mesh pointer to the mesh structure.
2835
+ ! * \return 0 on failure, 1 on success.
2836
+ ! *
2837
+ ! * \remark Fortran interface:
2838
+ ! */
2839
+ INTERFACE
2840
+ SUBROUTINE MMGS_DEFAULTVALUES(mesh,retval)
2841
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
2842
+ INTEGER, INTENT(OUT) :: retval
2843
+ END SUBROUTINE
2844
+ END INTERFACE
2845
+ ! *
2846
+ ! */
2847
+
2848
+ ! LIBMMGS_EXPORT int MMGS_defaultValues(MMG5_pMesh mesh);
2849
+
2850
+ ! /**
2851
+ ! * \brief Store the info structure in the mesh structure.
2852
+ ! *
2853
+ ! * \param mesh pointer to the mesh structure.
2854
+ ! * \param info pointer to the info structure.
2855
+ ! * \return 1.
2856
+ ! *
2857
+ ! * \remark Fortran interface:
2858
+ ! */
2859
+ INTERFACE
2860
+ SUBROUTINE MMGS_STOCKOPTIONS(mesh,info,retval)
2861
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,info
2862
+ INTEGER, INTENT(OUT) :: retval
2863
+ END SUBROUTINE
2864
+ END INTERFACE
2865
+ ! *
2866
+ ! */
2867
+
2868
+ ! LIBMMGS_EXPORT int MMGS_stockOptions(MMG5_pMesh mesh, MMG5_Info *info);
2869
+
2870
+ ! /**
2871
+ ! * \brief Recover the info structure stored in the mesh structure.
2872
+ ! *
2873
+ ! * \param mesh pointer to the mesh structure.
2874
+ ! * \param info pointer to the info structure.
2875
+ ! *
2876
+ ! * \remark Fortran interface:
2877
+ ! */
2878
+ INTERFACE
2879
+ SUBROUTINE MMGS_DESTOCKOPTIONS(mesh,info)
2880
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,info
2881
+ END SUBROUTINE
2882
+ END INTERFACE
2883
+ ! *
2884
+ ! */
2885
+
2886
+ ! LIBMMGS_EXPORT void MMGS_destockOptions(MMG5_pMesh mesh, MMG5_Info *info);
2887
+
2888
+ ! /**
2889
+ ! * \brief Return adjacent triangles of a triangle.
2890
+ ! *
2891
+ ! * \param mesh pointer to the mesh structure.
2892
+ ! * \param kel triangle index.
2893
+ ! * \param listri pointer to the array of indices of the three adjacent
2894
+ ! * triangles of triangle \a kel (the index is 0 if there is no adjacent triangle).
2895
+ ! * \return 1.
2896
+ ! *
2897
+ ! * Find the indices of the 3 adjacent elements of triangle \a
2898
+ ! * kel. \f$v_i = 0\f$ if the \f$i^{th}\f$ face has no adjacent element
2899
+ ! * (so we are on a boundary face).
2900
+ ! *
2901
+ ! * \remark Fortran interface:
2902
+ ! */
2903
+ INTERFACE
2904
+ SUBROUTINE MMGS_GET_ADJATRI(mesh,kel,listri,retval)
2905
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
2906
+ INTEGER(MMG5F_INT), INTENT(IN) :: kel
2907
+ INTEGER(MMG5F_INT), DIMENSION(3), INTENT(OUT) :: listri
2908
+ INTEGER, INTENT(OUT) :: retval
2909
+ END SUBROUTINE
2910
+ END INTERFACE
2911
+ ! *
2912
+ ! */
2913
+
2914
+ ! LIBMMGS_EXPORT int MMGS_Get_adjaTri(MMG5_pMesh mesh, MMG5_int kel, MMG5_int listri[3]);
2915
+
2916
+ ! /**
2917
+ ! * \brief Find adjacent vertices of a triangle.
2918
+ ! *
2919
+ ! * \param mesh pointer to the mesh structure.
2920
+ ! * \param ip vertex index.
2921
+ ! * \param start index of a triangle holding \a ip.
2922
+ ! * \param lispoi pointer to an array of size MMGS_LMAX that will contain
2923
+ ! * the indices of adjacent vertices to the vertex \a ip.
2924
+ ! * \return nbpoi the number of adjacent vertices on success, 0 on failure.
2925
+ ! *
2926
+ ! * Find the indices of the adjacent vertices of the vertex \a
2927
+ ! * ip of the triangle \a start.
2928
+ ! *
2929
+ ! * \remark Fortran interface:
2930
+ ! */
2931
+ INTERFACE
2932
+ SUBROUTINE MMGS_GET_ADJAVERTICESFAST(mesh,ip,start,lispoi,retval)
2933
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
2934
+ INTEGER(MMG5F_INT), INTENT(IN) :: ip,start
2935
+ INTEGER(MMG5F_INT), DIMENSION(MMGS_LMAX), INTENT(OUT) :: lispoi
2936
+ INTEGER(MMG5F_INT), INTENT(OUT) :: retval
2937
+ END SUBROUTINE
2938
+ END INTERFACE
2939
+ ! *
2940
+ ! */
2941
+
2942
+ ! LIBMMGS_EXPORT int MMGS_Get_adjaVerticesFast(MMG5_pMesh mesh, MMG5_int ip,MMG5_int start, MMG5_int lispoi[MMGS_LMAX]);
2943
+
2944
+ ! /**
2945
+ ! * \brief Compute the real eigenvalues and eigenvectors of a symmetric matrix
2946
+ ! *
2947
+ ! * \param m upper part of a symmetric matrix diagonalizable in |R
2948
+ ! * \param lambda array of eigenvalues
2949
+ ! * \param vp array of eigenvectors
2950
+ ! *
2951
+ ! * \return the order of the eigenvalues
2952
+ ! *
2953
+ ! * Compute the real eigenvalues and eigenvectors of a symmetric matrix m whose
2954
+ ! * upper part is provided (m11, m12, m13, m22, m23, m33 in this order).
2955
+ ! *
2956
+ ! * lambda[0] is the eigenvalue associated to the eigenvector ( v[0][0], v[0,1], v[0,2] )
2957
+ ! * in C and to the eigenvector v(1,:) in fortran
2958
+ ! *
2959
+ ! * lambda[1] is the eigenvalue associated to the eigenvector ( v[1][0], v[1,1], v[1,2] )
2960
+ ! * in C and to the eigenvector v(2,:) in fortran
2961
+ ! *
2962
+ ! * lambda[2] is the eigenvalue associated to the eigenvector ( v[2][0], v[2,1], v[2,2] )
2963
+ ! * in C and to the eigenvector v(3,:) in fortran
2964
+ ! *
2965
+ ! * \remark Fortran interface:
2966
+ ! */
2967
+ INTERFACE
2968
+ SUBROUTINE MMGS_COMPUTE_EIGENV(m,lambda,vp,retval)
2969
+ REAL(KIND=8), INTENT(IN) :: m(*)
2970
+ REAL(KIND=8), INTENT(OUT) :: lambda(*),vp(*)
2971
+ INTEGER, INTENT(OUT) :: retval
2972
+ END SUBROUTINE
2973
+ END INTERFACE
2974
+ ! *
2975
+ ! */
2976
+
2977
+ ! LIBMMGS_EXPORT int MMGS_Compute_eigenv(double m[6],double lambda[3],double vp[3][3]);
2978
+
2979
+ ! /**
2980
+ ! * \brief Free a solution.
2981
+ ! *
2982
+ ! * \param mesh pointer to the mesh structure
2983
+ ! * \param sol pointer to the solution structure
2984
+ ! *
2985
+ ! * \remark Fortran interface:
2986
+ ! */
2987
+ INTERFACE
2988
+ SUBROUTINE MMGS_FREE_SOLUTIONS(mesh,sol)
2989
+ MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
2990
+ END SUBROUTINE
2991
+ END INTERFACE
2992
+ ! *
2993
+ ! */
2994
+
2995
+ ! LIBMMGS_EXPORT void MMGS_Free_solutions(MMG5_pMesh mesh,MMG5_pSol sol);
2996
+
2997
+ ! /**
2998
+ ! * \brief Clean data (triangles and edges) linked to isosurface.
2999
+ ! *
3000
+ ! * \param mesh pointer to mesh structure
3001
+ ! *
3002
+ ! * \return 1 if successful, 0 otherwise.
3003
+ ! *
3004
+ ! * \remark Fortran interface:
3005
+ ! */
3006
+ INTERFACE
3007
+ SUBROUTINE MMGS_CLEAN_ISOSURF(mesh,retval)
3008
+ MMG5_DATA_PTR_T, INTENT(IN) :: mesh
3009
+ INTEGER, INTENT(OUT) :: retval
3010
+ END SUBROUTINE
3011
+ END INTERFACE
3012
+ ! *
3013
+ ! */
3014
+
3015
+ ! LIBMMGS_EXPORT int MMGS_Clean_isoSurf(MMG5_pMesh mesh);
3016
+
3017
+ ! /**
3018
+ ! * \brief Set common function pointers between mmgs and mmg3d to the matching mmgs
3019
+ ! * functions.
3020
+ ! */
3021
+
3022
+ ! LIBMMGS_EXPORT void MMGS_Set_commonFunc(void);
3023
+
3024
+ ! #ifdef __cplusplus
3025
+ ! }
3026
+ ! #endif
3027
+
3028
+ #endif