Mmg
Simplicial remeshers (mesh adaptation, isovalue discretization, lagrangian movement)
libmmgs.h
Go to the documentation of this file.
1/* =============================================================================
2** This file is part of the mmg software package for the tetrahedral
3** mesh modification.
4** Copyright (c) Bx INP/CNRS/Inria/UBordeaux/UPMC, 2004-
5**
6** mmg is free software: you can redistribute it and/or modify it
7** under the terms of the GNU Lesser General Public License as published
8** by the Free Software Foundation, either version 3 of the License, or
9** (at your option) any later version.
10**
11** mmg is distributed in the hope that it will be useful, but WITHOUT
12** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13** FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14** License for more details.
15**
16** You should have received a copy of the GNU Lesser General Public
17** License and of the GNU General Public License along with mmg (in
18** files COPYING.LESSER and COPYING). If not, see
19** <http://www.gnu.org/licenses/>. Please read their terms carefully and
20** use this copy of the mmg distribution only if you accept them.
21** =============================================================================
22*/
23
24/*
25 * This file defines the C and Fortran headers of the mmgs API, and
26 * their Doxygen documentation.
27 *
28 * NOTES FOR DEVELOPERS:
29 *
30 * - The Fortran headers are generated from comment lines that start with '* >'.
31 * They must match the C declarations.
32 *
33 * - We cannot handle enum types in the Fortran version so enums are replaced
34 * by ints in both versions.
35 *
36 * - To keep the genheader program working, don't break line between an enum
37 * name and the opening brace (it creates errors under windows)
38 *
39 * - Since Mmg version 5,
40 * -- data structures and parameters that are common between mmg3d, mmg2d
41 * and mmgs use the MMG5_ prefix;
42 * -- API functions should have an MMG3D_, MMG2D_, or MMGS_ prefix,
43 * depending on the library; and
44 * -- some MMG5_ API functions exists but they are common to the
45 * three libraries.
46 *
47 */
48
84#ifndef MMGSLIB_H
85#define MMGSLIB_H
86
87
88#ifdef __cplusplus
89extern "C" {
90#endif
91
92#include "mmg/mmgs/mmgs_export.h"
93#include "mmg/common/libmmgtypes.h"
94
98#define MMGS_LMAX 1024
99
142};
143
144/*----------------------------- function headers -----------------------------*/
145/* Initialization functions */
146/* init structures */
172LIBMMGS_EXPORT int MMGS_Init_mesh(const int starter,...);
173
187
202
203/* init file names */
221
238LIBMMGS_EXPORT int MMGS_Set_outputMeshName(MMG5_pMesh mesh, const char* meshout);
239
258
277
294LIBMMGS_EXPORT int MMGS_Set_inputParamName(MMG5_pMesh mesh, const char* fparamin);
295
296/* init structure sizes */
320 LIBMMGS_EXPORT int MMGS_Set_solSize(MMG5_pMesh mesh, MMG5_pSol sol, int typEntity, MMG5_int np, int typSol);
321
347 MMG5_int nentities, int *typSol);
348
370LIBMMGS_EXPORT int MMGS_Set_meshSize(MMG5_pMesh mesh, MMG5_int np, MMG5_int nt, MMG5_int na);
371
372/* init structure data */
397LIBMMGS_EXPORT int MMGS_Set_vertex(MMG5_pMesh mesh, double c0, double c1,
398 double c2, MMG5_int ref, MMG5_int pos);
399
420 LIBMMGS_EXPORT int MMGS_Set_vertices(MMG5_pMesh mesh, double *vertices,MMG5_int *refs);
421
445LIBMMGS_EXPORT int MMGS_Set_triangle(MMG5_pMesh mesh, MMG5_int v0, MMG5_int v1,
446 MMG5_int v2, MMG5_int ref,MMG5_int pos);
447
467 LIBMMGS_EXPORT int MMGS_Set_triangles(MMG5_pMesh mesh, MMG5_int *tria, MMG5_int *refs);
468
490LIBMMGS_EXPORT int MMGS_Set_edge(MMG5_pMesh mesh, MMG5_int v0, MMG5_int v1, MMG5_int ref,MMG5_int pos);
491
511
532
552
571
590
609
629
648
668
687
707 LIBMMGS_EXPORT int MMGS_Set_edges(MMG5_pMesh mesh, MMG5_int *edges, MMG5_int* refs);
708
729 LIBMMGS_EXPORT int MMGS_Get_edges(MMG5_pMesh mesh,MMG5_int *edges,MMG5_int* refs,
730 int *areRidges,int *areRequired);
731
754LIBMMGS_EXPORT int MMGS_Set_normalAtVertex(MMG5_pMesh mesh, MMG5_int k, double n0, double n1, double n2) ;
755
772 double MMGS_Get_triangleQuality(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k);
773
794LIBMMGS_EXPORT int MMGS_Set_scalarSol(MMG5_pSol met, double s, MMG5_int pos);
795
813
837LIBMMGS_EXPORT int MMGS_Set_vectorSol(MMG5_pSol met, double vx,double vy, double vz, MMG5_int pos);
838
858LIBMMGS_EXPORT int MMGS_Set_vectorSols(MMG5_pSol met, double *sols);
859
885LIBMMGS_EXPORT int MMGS_Set_tensorSol(MMG5_pSol met, double m11,double m12, double m13,
886 double m22,double m23, double m33, MMG5_int pos);
887
904LIBMMGS_EXPORT int MMGS_Set_tensorSols(MMG5_pSol met, double *sols);
905
930 LIBMMGS_EXPORT int MMGS_Set_ithSol_inSolsAtVertices(MMG5_pSol sol, int i, double* s, MMG5_int pos);
931
956
957/* check init */
978
1002LIBMMGS_EXPORT int MMGS_Set_iparameter(MMG5_pMesh mesh,MMG5_pSol sol, int iparam, MMG5_int val);
1003
1026LIBMMGS_EXPORT int MMGS_Set_dparameter(MMG5_pMesh mesh,MMG5_pSol sol, int dparam, double val);
1027
1055 double hmin, double hmax, double hausd);
1056
1084 int split,MMG5_int rmin, MMG5_int rplus);
1085
1108
1127LIBMMGS_EXPORT int MMGS_Get_meshSize(MMG5_pMesh mesh, MMG5_int* np, MMG5_int* nt, MMG5_int* na);
1128
1150LIBMMGS_EXPORT int MMGS_Get_solSize(MMG5_pMesh mesh, MMG5_pSol sol, int* typEntity, MMG5_int* np,
1151 int* typSol);
1152
1176 MMG5_int* nentities,int* typSol);
1177
1207LIBMMGS_EXPORT int MMGS_Get_vertex(MMG5_pMesh mesh, double* c0, double* c1, double* c2, MMG5_int* ref,
1208 int* isCorner, int* isRequired);
1209
1236 LIBMMGS_EXPORT int MMGS_GetByIdx_vertex(MMG5_pMesh mesh, double* c0, double* c1, double* c2, MMG5_int* ref,
1237 int* isCorner, int* isRequired,MMG5_int idx);
1238
1267LIBMMGS_EXPORT int MMGS_Get_vertices(MMG5_pMesh mesh, double* vertices, MMG5_int* refs,
1268 int* areCorners, int* areRequired);
1269
1296LIBMMGS_EXPORT int MMGS_Get_triangle(MMG5_pMesh mesh, MMG5_int* v0, MMG5_int* v1, MMG5_int* v2,
1297 MMG5_int* ref, int* isRequired);
1298
1324LIBMMGS_EXPORT int MMGS_Get_triangles(MMG5_pMesh mesh, MMG5_int* tria, MMG5_int* refs,
1325 int* areRequired);
1352LIBMMGS_EXPORT int MMGS_Get_edge(MMG5_pMesh mesh, MMG5_int* e0, MMG5_int* e1, MMG5_int* ref,
1353 int* isRidge, int* isRequired);
1354
1377LIBMMGS_EXPORT int MMGS_Get_normalAtVertex(MMG5_pMesh mesh, MMG5_int k, double *n0, double *n1, double *n2) ;
1378
1399LIBMMGS_EXPORT int MMGS_Get_scalarSol(MMG5_pSol met, double* s);
1400
1417LIBMMGS_EXPORT int MMGS_Get_scalarSols(MMG5_pSol met, double* s);
1418
1441LIBMMGS_EXPORT int MMGS_Get_vectorSol(MMG5_pSol met, double* vx, double* vy, double* vz);
1442
1461LIBMMGS_EXPORT int MMGS_Get_vectorSols(MMG5_pSol met, double* sols);
1462
1489LIBMMGS_EXPORT int MMGS_Get_tensorSol(MMG5_pSol met, double *m11, double *m12, double *m13,
1490 double *m22, double *m23, double *m33);
1491
1508LIBMMGS_EXPORT int MMGS_Get_tensorSols(MMG5_pSol met, double *sols);
1509
1536 LIBMMGS_EXPORT int MMGS_Get_ithSol_inSolsAtVertices(MMG5_pSol sol, int i, double* s, MMG5_int pos);
1537
1563
1584
1585/* input/output functions */
1609
1633 const char *filename);
1634
1656 const char *filename);
1657
1681
1703 const char *filename);
1704
1727 const char *filename);
1728
1750 const char *filename);
1751
1773
1795
1815 const char *filename);
1816
1837
1859
1884
1903
1924
1943
1962 const char *filename);
1963
1985 const char *filename);
1986
2008 const char *filename);
2009
2027 const char *filename);
2028
2050
2069 const char* filename);
2070
2089 const char *filename);
2090
2109 const char *filename);
2110
2126
2127/* deallocations */
2155LIBMMGS_EXPORT int MMGS_Free_all(const int starter,...);
2156
2185
2213LIBMMGS_EXPORT int MMGS_Free_names(const int starter,...);
2214
2215/* library */
2234
2256
2271
2297
2323 LIBMMGS_EXPORT int MMGS_Get_nonBdyEdge(MMG5_pMesh mesh, MMG5_int* e0, MMG5_int* e1,
2324 MMG5_int* ref, MMG5_int idx);
2325
2326
2327/* Tools for the library */
2344
2364
2378LIBMMGS_EXPORT int MMGS_usage(char *prog);
2379
2394LIBMMGS_EXPORT int MMGS_parsar(int argc,char *argv[],MMG5_pMesh mesh,MMG5_pSol met,MMG5_pSol sol);
2395
2410
2426
2440
2463LIBMMGS_EXPORT int MMGS_Get_adjaTri(MMG5_pMesh mesh, MMG5_int kel, MMG5_int listri[3]);
2464
2487LIBMMGS_EXPORT int MMGS_Get_adjaVerticesFast(MMG5_pMesh mesh, MMG5_int ip,MMG5_int start, MMG5_int lispoi[MMGS_LMAX]);
2488
2518LIBMMGS_EXPORT int MMGS_Compute_eigenv(double m[6],double lambda[3],double vp[3][3]);
2519
2533
2549
2555
2556#ifdef __cplusplus
2557}
2558#endif
2559
2560#endif
const int starter
MMG5_pMesh MMG5_pSol * sol
MMG5_pMesh char * meshin
MMG5_pMesh * mesh
MMG5_pMesh char * filename
MMG5_Info info
LIBMMGS_EXPORT int MMGS_loadMesh(MMG5_pMesh mesh, const char *filename)
Load a mesh (in .mesh/.mesb format) from file.
Definition: inout_s.c:41
LIBMMGS_EXPORT int MMGS_saveVtuMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
Write mesh and optionally one data field vtu Vtk file format (.vtu extension).
Definition: inoutcpp_s.cpp:315
LIBMMGS_EXPORT int MMGS_Get_adjaVerticesFast(MMG5_pMesh mesh, MMG5_int ip, MMG5_int start, MMG5_int lispoi[MMGS_LMAX])
Find adjacent vertices of a triangle.
LIBMMGS_EXPORT int MMGS_saveVtkMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Save a mesh and multiple data fields in VTK format.
Definition: inoutcpp_s.cpp:365
LIBMMGS_EXPORT int MMGS_Set_outputSolName(MMG5_pMesh mesh, MMG5_pSol sol, const char *solout)
Set the name of the output solution file.
LIBMMGS_EXPORT int MMGS_mmgslib(MMG5_pMesh mesh, MMG5_pSol met)
Main "program" for mesh adaptation.
Definition: libmmgs.c:545
LIBMMGS_EXPORT int MMGS_Get_adjaTri(MMG5_pMesh mesh, MMG5_int kel, MMG5_int listri[3])
Return adjacent triangles of a triangle.
LIBMMGS_EXPORT int MMGS_Set_vertices(MMG5_pMesh mesh, double *vertices, MMG5_int *refs)
Set the coordinates and references of all vertices in a mesh.
LIBMMGS_EXPORT int MMGS_Set_outputMeshName(MMG5_pMesh mesh, const char *meshout)
Set the name of the output mesh file.
LIBMMGS_EXPORT int MMGS_loadVtuMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Load a mesh and multiple solutions in VTU (VTK) format from file.
Definition: inoutcpp_s.cpp:279
LIBMMGS_EXPORT int MMGS_Set_requiredVertex(MMG5_pMesh mesh, MMG5_int k)
Assign the "required" attribute to a vertex.
LIBMMGS_EXPORT int MMGS_saveVtpMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Save a mesh and multiple data fields in VTP format.
Definition: inoutcpp_s.cpp:400
LIBMMGS_EXPORT int MMGS_Unset_ridge(MMG5_pMesh mesh, MMG5_int k)
Remove the "ridge" attribute from an edge.
LIBMMGS_EXPORT int MMGS_Unset_requiredEdge(MMG5_pMesh mesh, MMG5_int k)
Remove the "required" attribute from an edge.
LIBMMGS_EXPORT int MMGS_Get_scalarSol(MMG5_pSol met, double *s)
Get the next element of a scalar solution structure.
LIBMMGS_EXPORT int MMGS_mmgsls(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_pSol met)
Main "program" for level-set discretization.
Definition: libmmgs.c:298
LIBMMGS_EXPORT int MMGS_Get_nonBdyEdge(MMG5_pMesh mesh, MMG5_int *e0, MMG5_int *e1, MMG5_int *ref, MMG5_int idx)
Get vertices and reference of a non-boundary edge.
LIBMMGS_EXPORT int MMGS_Set_ithSols_inSolsAtVertices(MMG5_pSol sol, int i, double *s)
Set all elements of one out of multiple solution fields that are defined on vertices.
LIBMMGS_EXPORT int MMGS_Set_ridge(MMG5_pMesh mesh, MMG5_int k)
Assign the "ridge" attribute to an edge.
LIBMMGS_EXPORT int MMGS_Get_scalarSols(MMG5_pSol met, double *s)
Get all elements of a scalar solution structure.
LIBMMGS_EXPORT int MMGS_Set_edges(MMG5_pMesh mesh, MMG5_int *edges, MMG5_int *refs)
Set the vertices and references of all edges in a mesh.
LIBMMGS_EXPORT int MMGS_saveSol(MMG5_pMesh mesh, MMG5_pSol met, const char *filename)
Write an isotropic or anisotropic metric in medit file format.
Definition: inout_s.c:1483
LIBMMGS_EXPORT int MMGS_Get_edges(MMG5_pMesh mesh, MMG5_int *edges, MMG5_int *refs, int *areRidges, int *areRequired)
Get vertices, references and attributes of all edges in the mesh.
LIBMMGS_EXPORT int MMGS_loadVtpMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Load a mesh and multiple solutions in VTP (VTK) format from file.
Definition: inoutcpp_s.cpp:119
LIBMMGS_EXPORT int MMGS_Get_triangles(MMG5_pMesh mesh, MMG5_int *tria, MMG5_int *refs, int *areRequired)
Get the vertices, references, and required attributes of all triangles in the mesh.
LIBMMGS_EXPORT int MMGS_Clean_isoSurf(MMG5_pMesh mesh)
Clean data (triangles and edges) linked to isosurface.
LIBMMGS_EXPORT int MMGS_loadAllSols(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Load one or more solutions in a solution file in medit file format.
Definition: inout_s.c:1387
LIBMMGS_EXPORT int MMGS_Set_scalarSol(MMG5_pSol met, double s, MMG5_int pos)
Set a single element of a scalar solution structure.
LIBMMGS_EXPORT int MMGS_loadMshMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Load a mesh and all data from a file in MSH format.
Definition: inout_s.c:706
LIBMMGS_EXPORT int MMGS_saveMshMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Save a mesh and multiple data fields in MSH format, ascii or binary depending on the filename extensi...
Definition: inout_s.c:1307
LIBMMGS_EXPORT int MMGS_Set_requiredEdge(MMG5_pMesh mesh, MMG5_int k)
Assign the "required" attribute to an edge.
LIBMMGS_EXPORT int MMGS_Get_vertices(MMG5_pMesh mesh, double *vertices, MMG5_int *refs, int *areCorners, int *areRequired)
Get the coordinates, references and attributes of all vertices in the mesh.
LIBMMGS_EXPORT int MMGS_Unset_requiredTriangle(MMG5_pMesh mesh, MMG5_int k)
Remove the "required" attribute from a vertex.
LIBMMGS_EXPORT int MMGS_Set_normalAtVertex(MMG5_pMesh mesh, MMG5_int k, double n0, double n1, double n2)
Set the normal orientation at a single vertex.
LIBMMGS_EXPORT int MMGS_Set_solSize(MMG5_pMesh mesh, MMG5_pSol sol, int typEntity, MMG5_int np, int typSol)
Initialize an array of solution fields: set dimension, types and number of fields.
LIBMMGS_EXPORT int MMGS_Get_tensorSols(MMG5_pSol met, double *sols)
Get all elements of a tensor solution field.
LIBMMGS_EXPORT int MMGS_parsar(int argc, char *argv[], MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol sol)
Store command line arguments.
LIBMMGS_EXPORT int MMGS_loadVtkMesh(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol sol, const char *filename)
Load a mesh and possibly data in VTK format from file.
Definition: inoutcpp_s.cpp:155
LIBMMGS_EXPORT int MMGS_Set_solsAtVerticesSize(MMG5_pMesh mesh, MMG5_pSol *sol, int nsols, MMG5_int nentities, int *typSol)
Initialize an array of solution fields defined at vertices: set dimension, types and number of fields...
LIBMMGS_EXPORT int MMGS_Set_scalarSols(MMG5_pSol met, double *s)
Set the values of all elements of a scalar solution structure.
LIBMMGS_EXPORT void MMGS_destockOptions(MMG5_pMesh mesh, MMG5_Info *info)
Recover the info structure stored in the mesh structure.
LIBMMGS_EXPORT int MMGS_saveVtkMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
Write mesh and optionally one data field in Vtk file format (.vtk extension).
Definition: inoutcpp_s.cpp:350
LIBMMGS_EXPORT int MMGS_Set_requiredTriangle(MMG5_pMesh mesh, MMG5_int k)
Assign the "required" attribute to a triangle.
LIBMMGS_EXPORT int(* MMGS_doSol)(MMG5_pMesh mesh, MMG5_pSol met)
Compute an isotropic size map according to the mean of the length of the edges passing through a vert...
Definition: mmgsexterns.c:9
LIBMMGS_EXPORT int MMGS_Set_inputParamName(MMG5_pMesh mesh, const char *fparamin)
Set the name of the input parameter file.
LIBMMGS_EXPORT int MMGS_saveAllSols(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Save one or more solutions in a solution file in medit file format.
Definition: inout_s.c:1520
LIBMMGS_EXPORT int MMGS_Get_solSize(MMG5_pMesh mesh, MMG5_pSol sol, int *typEntity, MMG5_int *np, int *typSol)
Get the number of elements, dimension, and type of a solution.
LIBMMGS_EXPORT int MMGS_Set_tensorSols(MMG5_pSol met, double *sols)
Set all elements of a tensor solution structure.
LIBMMGS_EXPORT void MMGS_setfunc(MMG5_pMesh mesh, MMG5_pSol met)
Set function pointers for caltet, lenedg, defsiz and gradsiz.
Definition: libmmgs_tools.c:43
LIBMMGS_EXPORT void MMGS_Set_commonFunc(void)
Set common function pointers between mmgs and mmg3d to the matching mmgs functions.
Definition: libmmgs.c:732
LIBMMGS_EXPORT int MMGS_Get_ithSols_inSolsAtVertices(MMG5_pSol sol, int i, double *s)
Get one out of several solutions at all vertices in the mesh.
LIBMMGS_EXPORT int MMGS_stockOptions(MMG5_pMesh mesh, MMG5_Info *info)
Store the info structure in the mesh structure.
LIBMMGS_EXPORT int MMGS_saveMshMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
Write mesh and optionally one data field in MSH file format (.msh extension).
Definition: inout_s.c:1302
LIBMMGS_EXPORT int MMGS_Get_meshSize(MMG5_pMesh mesh, MMG5_int *np, MMG5_int *nt, MMG5_int *na)
Get the number of vertices, triangles, and edges of the mesh.
LIBMMGS_EXPORT int MMGS_Get_triangle(MMG5_pMesh mesh, MMG5_int *v0, MMG5_int *v1, MMG5_int *v2, MMG5_int *ref, int *isRequired)
Get the vertices, reference, and required attribute of the next triangle in the mesh.
LIBMMGS_EXPORT int MMGS_Set_edge(MMG5_pMesh mesh, MMG5_int v0, MMG5_int v1, MMG5_int ref, MMG5_int pos)
Set the vertices and reference of one edge in the mesh.
LIBMMGS_EXPORT int MMGS_Set_iparameter(MMG5_pMesh mesh, MMG5_pSol sol, int iparam, MMG5_int val)
set an integer parameter of the remesher
LIBMMGS_EXPORT void MMGS_Free_solutions(MMG5_pMesh mesh, MMG5_pSol sol)
Free a solution.
LIBMMGS_EXPORT int MMGS_saveVtuMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Write a mesh and multiple data fields in vtu Vtk file format (.vtu extension).
Definition: inoutcpp_s.cpp:330
LIBMMGS_EXPORT int MMGS_loadSol(MMG5_pMesh mesh, MMG5_pSol met, const char *filename)
Load a metric field (or other solution) in medit's .sol format.
Definition: inout_s.c:1312
LIBMMGS_EXPORT int MMGS_Get_solsAtVerticesSize(MMG5_pMesh mesh, MMG5_pSol *sol, int *nsols, MMG5_int *nentities, int *typSol)
Get the number of elements, type, and dimensions of several solutions defined on vertices.
LIBMMGS_EXPORT int MMGS_Get_tensorSol(MMG5_pSol met, double *m11, double *m12, double *m13, double *m22, double *m23, double *m33)
Get the next element of a tensor solution structure.
LIBMMGS_EXPORT int MMGS_Init_mesh(const int starter,...)
Initialize a mesh structure and optionally the associated solution and metric structures.
LIBMMGS_EXPORT int MMGS_Set_tensorSol(MMG5_pSol met, double m11, double m12, double m13, double m22, double m23, double m33, MMG5_int pos)
Set a single element of a tensor solution structure.
LIBMMGS_EXPORT int MMGS_Set_lsBaseReference(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_int br)
Set a new level-set base reference.
LIBMMGS_EXPORT int MMGS_Set_triangle(MMG5_pMesh mesh, MMG5_int v0, MMG5_int v1, MMG5_int v2, MMG5_int ref, MMG5_int pos)
Set the coordinates and reference of a single triangle.
LIBMMGS_EXPORT int MMGS_loadVtuMesh(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol sol, const char *filename)
Load a mesh and possibly data in VTU (VTK) format from file.
Definition: inoutcpp_s.cpp:235
LIBMMGS_EXPORT int MMGS_Set_vectorSol(MMG5_pSol met, double vx, double vy, double vz, MMG5_int pos)
Set a single element of a vector solution structure.
LIBMMGS_EXPORT int MMGS_Set_ithSol_inSolsAtVertices(MMG5_pSol sol, int i, double *s, MMG5_int pos)
Set a single element of one out of multiple solution fields that are defined on vertices.
LIBMMGS_EXPORT void MMGS_Init_fileNames(MMG5_pMesh mesh, MMG5_pSol sol)
Initialize file names to their default values.
LIBMMGS_EXPORT int MMGS_Get_ithSol_inSolsAtVertices(MMG5_pSol sol, int i, double *s, MMG5_int pos)
Get one out of several solutions at a specific vertex.
LIBMMGS_EXPORT int MMGS_GetByIdx_vertex(MMG5_pMesh mesh, double *c0, double *c1, double *c2, MMG5_int *ref, int *isCorner, int *isRequired, MMG5_int idx)
Get the coordinates and reference of a specific vertex in the mesh.
LIBMMGS_EXPORT int MMGS_Set_inputMeshName(MMG5_pMesh mesh, const char *meshin)
Set the name of the input mesh.
LIBMMGS_EXPORT int MMGS_Get_vectorSol(MMG5_pSol met, double *vx, double *vy, double *vz)
Get the next element of a vector solution structure.
LIBMMGS_EXPORT int MMGS_defaultValues(MMG5_pMesh mesh)
Print the default parameter values.
LIBMMGS_EXPORT int MMGS_Chk_meshData(MMG5_pMesh mesh, MMG5_pSol met)
Check if the numbers of given entities match with mesh and solution size and check mesh data.
LIBMMGS_EXPORT int MMGS_loadVtpMesh(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol sol, const char *filename)
Load a mesh and optionally a solution in VTP (VTK) format from file.
Definition: inoutcpp_s.cpp:75
LIBMMGS_EXPORT int MMGS_loadGenericMesh(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol sol, const char *filename)
Load a mesh and all data from a file. The format will be guessed from the filename extension.
Definition: inout_s.c:764
LIBMMGS_EXPORT int MMGS_Unset_requiredVertex(MMG5_pMesh mesh, MMG5_int k)
Remove the "required" attribute from a vertex.
LIBMMGS_EXPORT int MMGS_loadVtkMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Load a mesh and multiple solutions in VTK format from file.
Definition: inoutcpp_s.cpp:199
LIBMMGS_EXPORT int MMGS_Set_dparameter(MMG5_pMesh mesh, MMG5_pSol sol, int dparam, double val)
set a real-valued parameter of the remesher
LIBMMGS_EXPORT int MMGS_Get_iparameter(MMG5_pMesh mesh, MMG5_int iparam)
Get the value of an integer parameter of the remesher.
LIBMMGS_EXPORT int MMGS_Get_vectorSols(MMG5_pSol met, double *sols)
Get all elements of a vector solution structure.
LIBMMGS_EXPORT int MMGS_Set_corner(MMG5_pMesh mesh, MMG5_int k)
Assign the "corner" attribute to a vertex.
LIBMMGS_EXPORT int MMGS_Free_all(const int starter,...)
Deallocations before return.
LIBMMGS_EXPORT int MMGS_Set_multiMat(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_int ref, int split, MMG5_int rmin, MMG5_int rplus)
Set the reference mapping for the elements of reference ref in level-set discretization mode.
LIBMMGS_EXPORT int MMGS_saveVtpMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
Save a mesh and optionally one data field in VTP format.
Definition: inoutcpp_s.cpp:385
#define MMGS_LMAX
Definition: libmmgs.h:98
LIBMMGS_EXPORT int MMGS_saveMesh(MMG5_pMesh mesh, const char *filename)
Save a mesh in .mesh or .meshb format.
Definition: inout_s.c:842
double MMGS_Get_triangleQuality(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k)
Get the quality measure of a triangle.
LIBMMGS_EXPORT int MMGS_Get_edge(MMG5_pMesh mesh, MMG5_int *e0, MMG5_int *e1, MMG5_int *ref, int *isRidge, int *isRequired)
Get the vertices, reference, and attributes of the next edge in the mesh.
LIBMMGS_EXPORT int MMGS_Free_structures(const int starter,...)
Structure deallocations before return.
LIBMMGS_EXPORT int MMGS_Free_allSols(MMG5_pMesh mesh, MMG5_pSol *sol)
Deallocate an array of solution fields.
LIBMMGS_EXPORT int MMGS_Set_vertex(MMG5_pMesh mesh, double c0, double c1, double c2, MMG5_int ref, MMG5_int pos)
Set the coordinates of a single vertex.
LIBMMGS_EXPORT int MMGS_Set_vectorSols(MMG5_pSol met, double *sols)
Set all elements of a vector solution structure.
LIBMMGS_EXPORT int MMGS_Get_numberOfNonBdyEdges(MMG5_pMesh mesh, MMG5_int *nb_edges)
Get the number of non-boundary edges.
LIBMMGS_EXPORT int MMGS_Free_names(const int starter,...)
Structure deallocations before return.
LIBMMGS_EXPORT int MMGS_Set_localParameter(MMG5_pMesh mesh, MMG5_pSol sol, int typ, MMG5_int ref, double hmin, double hmax, double hausd)
set a local parameter
LIBMMGS_EXPORT int MMGS_Get_vertex(MMG5_pMesh mesh, double *c0, double *c1, double *c2, MMG5_int *ref, int *isCorner, int *isRequired)
Get the coordinates c0, c1,c2 and reference ref of the next vertex of mesh.
LIBMMGS_EXPORT int MMGS_loadMshMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
Load a mesh and possibly a solution in .msh format from file.
Definition: inout_s.c:645
LIBMMGS_EXPORT int MMGS_usage(char *prog)
Print help for mmgs options.
Definition: libmmgs_tools.c:83
LIBMMGS_EXPORT int MMGS_Set_triangles(MMG5_pMesh mesh, MMG5_int *tria, MMG5_int *refs)
Set the vertices and references of all triangles in the mesh.
LIBMMGS_EXPORT int MMGS_Set_constantSize(MMG5_pMesh mesh, MMG5_pSol met)
Compute a constant size map.
LIBMMGS_EXPORT int MMGS_Get_normalAtVertex(MMG5_pMesh mesh, MMG5_int k, double *n0, double *n1, double *n2)
Get the normal orientation at an edge.
MMGS_Param
Input parameters for mmg library.
Definition: libmmgs.h:109
@ MMGS_IPARAM_keepRef
Definition: libmmgs.h:117
@ MMGS_IPARAM_nreg
Definition: libmmgs.h:122
@ MMGS_IPARAM_optim
Definition: libmmgs.h:118
@ MMGS_IPARAM_numberOfLocalParam
Definition: libmmgs.h:124
@ MMGS_IPARAM_xreg
Definition: libmmgs.h:123
@ MMGS_DPARAM_hgrad
Definition: libmmgs.h:136
@ MMGS_IPARAM_nomove
Definition: libmmgs.h:121
@ MMGS_IPARAM_renum
Definition: libmmgs.h:128
@ MMGS_IPARAM_numsubdomain
Definition: libmmgs.h:127
@ MMGS_IPARAM_anisosize
Definition: libmmgs.h:129
@ MMGS_DPARAM_xreg
Definition: libmmgs.h:139
@ MMGS_IPARAM_nosizreq
Definition: libmmgs.h:130
@ MMGS_DPARAM_angleDetection
Definition: libmmgs.h:131
@ MMGS_IPARAM_verbose
Definition: libmmgs.h:110
@ MMGS_IPARAM_numberOfLSBaseReferences
Definition: libmmgs.h:125
@ MMGS_IPARAM_angle
Definition: libmmgs.h:113
@ MMGS_IPARAM_isoref
Definition: libmmgs.h:116
@ MMGS_DPARAM_hsiz
Definition: libmmgs.h:134
@ MMGS_IPARAM_debug
Definition: libmmgs.h:112
@ MMGS_IPARAM_noswap
Definition: libmmgs.h:120
@ MMGS_DPARAM_ls
Definition: libmmgs.h:138
@ MMGS_PARAM_size
Definition: libmmgs.h:141
@ MMGS_DPARAM_hmin
Definition: libmmgs.h:132
@ MMGS_IPARAM_numberOfMat
Definition: libmmgs.h:126
@ MMGS_IPARAM_iso
Definition: libmmgs.h:114
@ MMGS_DPARAM_hausd
Definition: libmmgs.h:135
@ MMGS_IPARAM_mem
Definition: libmmgs.h:111
@ MMGS_DPARAM_rmc
Definition: libmmgs.h:140
@ MMGS_IPARAM_isosurf
Definition: libmmgs.h:115
@ MMGS_DPARAM_hgradreq
Definition: libmmgs.h:137
@ MMGS_DPARAM_hmax
Definition: libmmgs.h:133
@ MMGS_IPARAM_noinsert
Definition: libmmgs.h:119
LIBMMGS_EXPORT int MMGS_Compute_eigenv(double m[6], double lambda[3], double vp[3][3])
Compute the real eigenvalues and eigenvectors of a symmetric matrix.
LIBMMGS_EXPORT int MMGS_Set_inputSolName(MMG5_pMesh mesh, MMG5_pSol sol, const char *solin)
Set the name of the input solution file.
LIBMMGS_EXPORT int MMGS_Unset_corner(MMG5_pMesh mesh, MMG5_int k)
Remove the "corner" attribute from a vertex.
LIBMMGS_EXPORT int MMGS_saveGenericMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
Save mesh data in a file whose format depends on the filename extension.
Definition: inout_s.c:1609
LIBMMGS_EXPORT int MMGS_Set_meshSize(MMG5_pMesh mesh, MMG5_int np, MMG5_int nt, MMG5_int na)
Set the number of vertices, triangles and edges of the mesh and allocate the associated tables.
LIBMMGS_EXPORT void MMGS_Init_parameters(MMG5_pMesh mesh)
Initialize the input parameters.
#define LIBMMGS_EXPORT
Definition: mmgs_export.h:31
Structure to store input parameters of the job.
Definition: libmmgtypes.h:523
MMG mesh structure.
Definition: libmmgtypes.h:613