Mmg
Simplicial remeshers (mesh adaptation, isovalue discretization, lagrangian movement)
libmmg2d.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 mmg2d 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
85#ifndef MMG2DLIB_H
86#define MMG2DLIB_H
87
88#ifdef __cplusplus
89extern "C" {
90#endif
91
92#include "mmg/common/libmmgtypes.h"
93#include "mmg/mmg2d/mmg2d_export.h"
94
98#define MMG2D_LMAX 1024
99
146 };
147
148/*----------------------------- function headers -----------------------------*/
149/* Initialization functions */
150/* init structures */
151
177 LIBMMG2D_EXPORT int MMG2D_Init_mesh(const int starter,...);
178
192
205
206/* init file names */
224
242
261
280
297 LIBMMG2D_EXPORT int MMG2D_Set_inputParamName(MMG5_pMesh mesh, const char* fparamin);
298
318 LIBMMG2D_EXPORT int MMG2D_Set_iparameter(MMG5_pMesh mesh, MMG5_pSol sol, int iparam, MMG5_int val);
319
339 LIBMMG2D_EXPORT int MMG2D_Set_dparameter(MMG5_pMesh mesh, MMG5_pSol sol, int dparam, double val);
340
369 MMG5_int ref,double hmin,double hmax,double hausd);
370
396 MMG5_int rmin, MMG5_int rplus);
397
420
421
422/* init structure datas */
445 LIBMMG2D_EXPORT int MMG2D_Set_meshSize(MMG5_pMesh mesh, MMG5_int np, MMG5_int nt, MMG5_int nquad, MMG5_int na);
446
473 MMG5_int np, int typSol);
474
502 MMG5_int nentities, int *typSol);
503
526 LIBMMG2D_EXPORT int MMG2D_Set_vertex(MMG5_pMesh mesh, double c0, double c1,
527 MMG5_int ref,MMG5_int pos);
528
548 LIBMMG2D_EXPORT int MMG2D_Set_vertices(MMG5_pMesh mesh, double *vertices,MMG5_int *refs);
549
570
591
611
630
654 LIBMMG2D_EXPORT int MMG2D_Set_triangle(MMG5_pMesh mesh, MMG5_int v0, MMG5_int v1,
655 MMG5_int v2, MMG5_int ref, MMG5_int pos);
656
678 LIBMMG2D_EXPORT int MMG2D_Set_triangles(MMG5_pMesh mesh, MMG5_int *tria, MMG5_int *refs);
679
696
713
737 LIBMMG2D_EXPORT int MMG2D_Set_quadrilateral(MMG5_pMesh mesh, MMG5_int v0, MMG5_int v1,
738 MMG5_int v2, MMG5_int v3, MMG5_int ref, MMG5_int pos);
739
761 MMG5_int *refs);
762
785 LIBMMG2D_EXPORT int MMG2D_Set_edge(MMG5_pMesh mesh, MMG5_int v0, MMG5_int v1, MMG5_int ref, MMG5_int pos);
786
804 LIBMMG2D_EXPORT int MMG2D_Set_edges(MMG5_pMesh mesh, MMG5_int *edges, MMG5_int* refs);
805
822
839
856
877 LIBMMG2D_EXPORT int MMG2D_Set_scalarSol(MMG5_pSol met, double s, MMG5_int pos);
878
896
918 LIBMMG2D_EXPORT int MMG2D_Set_vectorSol(MMG5_pSol met, double vx,double vy,
919 MMG5_int pos);
920
939 LIBMMG2D_EXPORT int MMG2D_Set_vectorSols(MMG5_pSol met, double *sols);
940
963 LIBMMG2D_EXPORT int MMG2D_Set_tensorSol(MMG5_pSol met, double m11, double m12, double m22,
964 MMG5_int pos);
965
985 LIBMMG2D_EXPORT int MMG2D_Set_tensorSols(MMG5_pSol met, double *sols);
986
1010 LIBMMG2D_EXPORT int MMG2D_Set_ithSol_inSolsAtVertices(MMG5_pSol sol,int i, double* s,MMG5_int pos);
1011
1036
1056 LIBMMG2D_EXPORT int MMG2D_Get_meshSize(MMG5_pMesh mesh, MMG5_int* np, MMG5_int* nt, MMG5_int* nquad, MMG5_int* na);
1057
1079 LIBMMG2D_EXPORT int MMG2D_Get_solSize(MMG5_pMesh mesh, MMG5_pSol sol, int* typEntity, MMG5_int* np,
1080 int* typSol);
1081
1104 MMG5_int* nentities,int* typSol);
1105
1133 LIBMMG2D_EXPORT int MMG2D_Get_vertex(MMG5_pMesh mesh, double* c0, double* c1, MMG5_int* ref,
1134 int* isCorner, int* isRequired);
1135
1161 LIBMMG2D_EXPORT int MMG2D_GetByIdx_vertex(MMG5_pMesh mesh, double* c0, double* c1, MMG5_int* ref,
1162 int* isCorner, int* isRequired,MMG5_int idx);
1163
1192 LIBMMG2D_EXPORT int MMG2D_Get_vertices(MMG5_pMesh mesh, double* vertices, MMG5_int* refs,
1193 int* areCorners, int* areRequired);
1194
1222 MMG5_int* v1, MMG5_int* v2, MMG5_int* ref
1223 ,int* isRequired);
1224
1249 LIBMMG2D_EXPORT int MMG2D_Get_triangles(MMG5_pMesh mesh, MMG5_int* tria, MMG5_int* refs,
1250 int* areRequired);
1251
1281 LIBMMG2D_EXPORT int MMG2D_Get_quadrilateral(MMG5_pMesh mesh, MMG5_int* v0, MMG5_int* v1, MMG5_int* v2,
1282 MMG5_int* v3,MMG5_int* ref, int* isRequired);
1283
1310 LIBMMG2D_EXPORT int MMG2D_Get_quadrilaterals(MMG5_pMesh mesh, MMG5_int* quadra,MMG5_int* refs,
1311 int* areRequired);
1312
1339 LIBMMG2D_EXPORT int MMG2D_Get_edge(MMG5_pMesh mesh, MMG5_int* e0, MMG5_int* e1, MMG5_int* ref,
1340 int* isRidge, int* isRequired);
1341
1366 LIBMMG2D_EXPORT int MMG2D_Get_edges(MMG5_pMesh mesh,MMG5_int *edges,MMG5_int* refs,
1367 int *areRidges,int *areRequired);
1368
1388
1408 LIBMMG2D_EXPORT int MMG2D_Get_scalarSol(MMG5_pSol met, double* s);
1409
1427
1449 LIBMMG2D_EXPORT int MMG2D_Get_vectorSol(MMG5_pSol met, double* vx, double* vy);
1450
1466 LIBMMG2D_EXPORT int MMG2D_Get_vectorSols(MMG5_pSol met, double* sols);
1467
1489 LIBMMG2D_EXPORT int MMG2D_Get_tensorSol(MMG5_pSol met, double *m11,double *m12,double *m22);
1490
1507 LIBMMG2D_EXPORT int MMG2D_Get_tensorSols(MMG5_pSol met, double *sols);
1508
1533 LIBMMG2D_EXPORT int MMG2D_Get_ithSol_inSolsAtVertices(MMG5_pSol sol,int i, double* s,MMG5_int pos);
1534
1559
1560
1579
1595
1596/* deallocations */
1628LIBMMG2D_EXPORT int MMG2D_Free_all(const int starter,...);
1629
1664
1698 LIBMMG2D_EXPORT int MMG2D_Free_names(const int starter,...);
1699
1719
1744
1768
1793
1817
1842
1866
1890
1915
1916 /* FIXME: why is it called medit format and is this really specific for metrics? */
1940
1962
1985
1986 /* FIXME: why is this here, neither implemented nor documented? */
1988
2005 LIBMMG2D_EXPORT int MMG2D_saveMesh(MMG5_pMesh ,const char *);
2006
2030
2053
2074
2095
2116
2137
2159
2181
2202
2220
2239
2258
2259 /* FIXME: why is this here? */
2261
2282
2302
2325
2345
2346/* Tools for the library */
2347
2362
2376 LIBMMG2D_EXPORT int MMG2D_parsar(int argc,char *argv[],MMG5_pMesh mesh,MMG5_pSol met,MMG5_pSol sol);
2377
2397
2412 LIBMMG2D_EXPORT int MMG2D_usage(char *prog);
2413
2430
2450
2464
2465 /* FIXME: is this description correct? */
2492
2519 LIBMMG2D_EXPORT int MMG2D_Get_nonBdyEdge(MMG5_pMesh mesh, MMG5_int* e0, MMG5_int* e1, MMG5_int* ref, MMG5_int idx);
2520
2543 LIBMMG2D_EXPORT int MMG2D_Get_adjaTri(MMG5_pMesh mesh, MMG5_int kel, MMG5_int listri[3]);
2544
2566 LIBMMG2D_EXPORT MMG5_int MMG2D_Get_adjaVertices(MMG5_pMesh mesh, MMG5_int ip, MMG5_int lispoi[MMG2D_LMAX]);
2567
2590 LIBMMG2D_EXPORT MMG5_int MMG2D_Get_adjaVerticesFast(MMG5_pMesh mesh, MMG5_int ip,MMG5_int start,
2591 MMG5_int lispoi[MMG2D_LMAX]);
2592
2616 LIBMMG2D_EXPORT int MMG2D_Get_triFromEdge(MMG5_pMesh mesh, MMG5_int ked, MMG5_int *ktri, int *ied);
2617
2643 LIBMMG2D_EXPORT int MMG2D_Get_trisFromEdge(MMG5_pMesh mesh, MMG5_int ked, MMG5_int ktri[2],int ied[2]);
2644
2671 LIBMMG2D_EXPORT int MMG2D_Compute_eigenv(double m[3],double lambda[2],double vp[2][2]);
2672
2687
2700
2713
2727
2728
2734
2756
2757#ifdef __cplusplus
2758}
2759#endif
2760
2761#endif
const int starter
MMG5_pMesh MMG5_pSol * sol
MMG5_pMesh char * meshin
MMG5_pMesh * mesh
MMG5_pMesh char * filename
LIBMMG2D_EXPORT int MMG2D_Set_vertices(MMG5_pMesh mesh, double *vertices, MMG5_int *refs)
Set the coordinates and references of all vertices in the mesh.
LIBMMG2D_EXPORT int MMG2D_Get_scalarSols(MMG5_pSol met, double *s)
Get all elements of a scalar sol structure.
LIBMMG2D_EXPORT void MMG2D_Free_triangles(MMG5_pMesh mesh)
Free the mesh elements (and the adjacency information).
LIBMMG2D_EXPORT int MMG2D_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 ref ref in LS discretization mode.
LIBMMG2D_EXPORT int MMG2D_Set_triangles(MMG5_pMesh mesh, MMG5_int *tria, MMG5_int *refs)
Set the vertices and references of all triangles in a mesh.
LIBMMG2D_EXPORT void MMG2D_Init_parameters(MMG5_pMesh mesh)
Initialize the input parameters (stored in the Info structure).
LIBMMG2D_EXPORT int MMG2D_Get_trisFromEdge(MMG5_pMesh mesh, MMG5_int ked, MMG5_int ktri[2], int ied[2])
Find two triangles given the edge that they share.
LIBMMG2D_EXPORT MMG5_int MMG2D_Get_adjaVertices(MMG5_pMesh mesh, MMG5_int ip, MMG5_int lispoi[MMG2D_LMAX])
Return adjacent vertices of a triangle.
LIBMMG2D_EXPORT int MMG2D_Get_scalarSol(MMG5_pSol met, double *s)
Get the scalar solution value s of next element of a solution.
LIBMMG2D_EXPORT int MMG2D_Get_adjaTri(MMG5_pMesh mesh, MMG5_int kel, MMG5_int listri[3])
Return adjacent elements of a triangle.
LIBMMG2D_EXPORT int MMG2D_Set_solSize(MMG5_pMesh mesh, MMG5_pSol sol, int typEntity, MMG5_int np, int typSol)
Set the size and type of a solution field.
LIBMMG2D_EXPORT int MMG2D_Unset_corner(MMG5_pMesh mesh, MMG5_int k)
Remove the "corner" attribute from a vertex.
LIBMMG2D_EXPORT int MMG2D_saveVect(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename, double lambda)
LIBMMG2D_EXPORT int MMG2D_Get_triangle(MMG5_pMesh mesh, MMG5_int *v0, MMG5_int *v1, MMG5_int *v2, MMG5_int *ref, int *isRequired)
Get the vertices and reference of the next triangle in the mesh.
LIBMMG2D_EXPORT int MMG2D_loadSol(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
Load a metric field (or other solution) in medit's .sol format.
Definition: inout_2d.c:905
LIBMMG2D_EXPORT int MMG2D_loadMshMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
Load a mesh and possibly a solution in .msh format from file.
Definition: inout_2d.c:706
LIBMMG2D_EXPORT int MMG2D_Set_tensorSol(MMG5_pSol met, double m11, double m12, double m22, MMG5_int pos)
Set a single element of a tensor sol structure.
LIBMMG2D_EXPORT int MMG2D_Unset_requiredEdge(MMG5_pMesh mesh, MMG5_int k)
Remove the "required" attribute from edge k.
LIBMMG2D_EXPORT int MMG2D_Set_solsAtVerticesSize(MMG5_pMesh mesh, MMG5_pSol *sol, int nsols, MMG5_int nentities, int *typSol)
Initialize an array of solutions field defined at vertices.
LIBMMG2D_EXPORT int MMG2D_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.
LIBMMG2D_EXPORT int MMG2D_Get_quadrilaterals(MMG5_pMesh mesh, MMG5_int *quadra, MMG5_int *refs, int *areRequired)
Get the vertices and references of all quadrangles of the mesh.
LIBMMG2D_EXPORT int MMG2D_saveMshMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
Save a mesh and optionally one data field in MSH format, ascii or binary depending on the filename ex...
Definition: inout_2d.c:1536
LIBMMG2D_EXPORT int MMG2D_saveVtpMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Save a mesh and multiple data fields in VTP format.
LIBMMG2D_EXPORT int MMG2D_parsop(MMG5_pMesh mesh, MMG5_pSol met)
Read a file containing Local parameters (.mmg2d extension)
LIBMMG2D_EXPORT int MMG2D_loadVtpMesh(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol sol, const char *filename)
Load a mesh and possibly a solution in VTP (VTK) format from file.
Definition: inoutcpp_2d.cpp:84
LIBMMG2D_EXPORT int MMG2D_Get_edges(MMG5_pMesh mesh, MMG5_int *edges, MMG5_int *refs, int *areRidges, int *areRequired)
Get the vertices and references of all edges in a mesh.
LIBMMG2D_EXPORT int MMG2D_loadVtkMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Load a mesh and multiple solutions in VTK format from file.
LIBMMG2D_EXPORT int MMG2D_Set_requiredEdge(MMG5_pMesh mesh, MMG5_int k)
Give edge k the "required" attribute.
LIBMMG2D_EXPORT int MMG2D_Get_tensorSols(MMG5_pSol met, double *sols)
Get all elements of a tensor sol structure.
LIBMMG2D_EXPORT int MMG2D_Get_vectorSols(MMG5_pSol met, double *sols)
Get all elements of a vector sol structure.
LIBMMG2D_EXPORT int MMG2D_Free_structures(const int starter,...)
Structure deallocations before return.
LIBMMG2D_EXPORT int MMG2D_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.
LIBMMG2D_EXPORT int MMG2D_Unset_requiredVertex(MMG5_pMesh mesh, MMG5_int k)
Remove the "required" attribute from a vertex.
LIBMMG2D_EXPORT int MMG2D_Free_names(const int starter,...)
Structure deallocations before return.
LIBMMG2D_EXPORT int MMG2D_loadVtkMesh(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol sol, const char *filename)
Load a mesh and possibly data in VTK format from file.
MMG2D_Param
Input parameters for mmg library.
Definition: libmmg2d.h:111
@ MMG2D_DPARAM_hgradreq
Definition: libmmg2d.h:140
@ MMG2D_IPARAM_numsubdomain
Definition: libmmg2d.h:128
@ MMG2D_IPARAM_iso
Definition: libmmg2d.h:116
@ MMG2D_IPARAM_optim
Definition: libmmg2d.h:121
@ MMG2D_IPARAM_numberOfLocalParam
Definition: libmmg2d.h:129
@ MMG2D_IPARAM_nosurf
Definition: libmmg2d.h:125
@ MMG2D_DPARAM_hgrad
Definition: libmmg2d.h:139
@ MMG2D_DPARAM_hmin
Definition: libmmg2d.h:135
@ MMG2D_IPARAM_mem
Definition: libmmg2d.h:113
@ MMG2D_DPARAM_xreg
Definition: libmmg2d.h:142
@ MMG2D_IPARAM_nofem
Definition: libmmg2d.h:144
@ MMG2D_IPARAM_nosizreq
Definition: libmmg2d.h:133
@ MMG2D_IPARAM_isoref
Definition: libmmg2d.h:145
@ MMG2D_DPARAM_rmc
Definition: libmmg2d.h:143
@ MMG2D_DPARAM_hausd
Definition: libmmg2d.h:138
@ MMG2D_IPARAM_angle
Definition: libmmg2d.h:115
@ MMG2D_DPARAM_hmax
Definition: libmmg2d.h:136
@ MMG2D_IPARAM_isosurf
Definition: libmmg2d.h:117
@ MMG2D_DPARAM_ls
Definition: libmmg2d.h:141
@ MMG2D_IPARAM_noinsert
Definition: libmmg2d.h:122
@ MMG2D_IPARAM_nreg
Definition: libmmg2d.h:126
@ MMG2D_IPARAM_noswap
Definition: libmmg2d.h:123
@ MMG2D_IPARAM_xreg
Definition: libmmg2d.h:127
@ MMG2D_IPARAM_nomove
Definition: libmmg2d.h:124
@ MMG2D_IPARAM_lag
Definition: libmmg2d.h:119
@ MMG2D_IPARAM_opnbdy
Definition: libmmg2d.h:118
@ MMG2D_IPARAM_verbose
Definition: libmmg2d.h:112
@ MMG2D_IPARAM_3dMedit
Definition: libmmg2d.h:120
@ MMG2D_IPARAM_anisosize
Definition: libmmg2d.h:132
@ MMG2D_IPARAM_numberOfLSBaseReferences
Definition: libmmg2d.h:130
@ MMG2D_IPARAM_numberOfMat
Definition: libmmg2d.h:131
@ MMG2D_DPARAM_angleDetection
Definition: libmmg2d.h:134
@ MMG2D_DPARAM_hsiz
Definition: libmmg2d.h:137
@ MMG2D_IPARAM_debug
Definition: libmmg2d.h:114
LIBMMG2D_EXPORT int MMG2D_Set_scalarSols(MMG5_pSol met, double *s)
Set all values of a scalar sol structure.
LIBMMG2D_EXPORT int MMG2D_Compute_eigenv(double m[3], double lambda[2], double vp[2][2])
Compute the real eigenvalues and eigenvectors of a symmetric matrix.
LIBMMG2D_EXPORT int MMG2D_saveVtpMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
Save a mesh and optionally one data field in VTP format.
LIBMMG2D_EXPORT int MMG2D_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_2d.c:1540
LIBMMG2D_EXPORT int MMG2D_usage(char *prog)
Print help for mmg2d options.
LIBMMG2D_EXPORT int MMG2D_Set_vectorSol(MMG5_pSol met, double vx, double vy, MMG5_int pos)
Set a single vector value in a sol structure.
LIBMMG2D_EXPORT int MMG2D_loadVect(MMG5_pMesh, char *)
LIBMMG2D_EXPORT void MMG2D_Free_solutions(MMG5_pMesh mesh, MMG5_pSol sol)
Free the solution.
LIBMMG2D_EXPORT int MMG2D_Set_scalarSol(MMG5_pSol met, double s, MMG5_int pos)
Set a single value of a sol structure.
LIBMMG2D_EXPORT int MMG2D_Set_requiredTriangle(MMG5_pMesh mesh, MMG5_int k)
Give triangle k the "required" attribute.
LIBMMG2D_EXPORT int MMG2D_Set_parallelEdge(MMG5_pMesh mesh, MMG5_int k)
Give edge k the "parallel" attribute.
LIBMMG2D_EXPORT int MMG2D_Get_edge(MMG5_pMesh mesh, MMG5_int *e0, MMG5_int *e1, MMG5_int *ref, int *isRidge, int *isRequired)
Get the vertices and reference of the next edge in the mesh.
LIBMMG2D_EXPORT int MMG2D_Chk_meshData(MMG5_pMesh mesh, MMG5_pSol met)
Check if the number of given entities match with mesh and sol size.
LIBMMG2D_EXPORT int MMG2D_Set_inputMeshName(MMG5_pMesh mesh, const char *meshin)
Set the name of the input mesh.
LIBMMG2D_EXPORT int MMG2D_Set_outputSolName(MMG5_pMesh mesh, MMG5_pSol sol, const char *solout)
Set the name of the output solution file.
LIBMMG2D_EXPORT int MMG2D_Unset_requiredTriangle(MMG5_pMesh mesh, MMG5_int k)
Remove the "required" attribute from triangle k.
LIBMMG2D_EXPORT int MMG2D_Get_numberOfNonBdyEdges(MMG5_pMesh mesh, MMG5_int *nb_edges)
Get the number of non-boundary edges.
LIBMMG2D_EXPORT int MMG2D_Get_ithSol_inSolsAtVertices(MMG5_pSol sol, int i, double *s, MMG5_int pos)
Get one out of several scalar solutions at a specific vertex.
LIBMMG2D_EXPORT int MMG2D_Get_meshSize(MMG5_pMesh mesh, MMG5_int *np, MMG5_int *nt, MMG5_int *nquad, MMG5_int *na)
Get the number of vertices, triangles and edges of the mesh.
LIBMMG2D_EXPORT int MMG2D_saveVtuMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
Save a mesh and optionally one data field in VTU format.
LIBMMG2D_EXPORT void MMG2D_Set_commonFunc(void)
Set common function pointers between mmgs and mmg2d to the matching mmg2d functions.
Definition: libmmg2d.c:52
LIBMMG2D_EXPORT int MMG2D_Set_requiredVertex(MMG5_pMesh mesh, MMG5_int k)
Assign the "required" attribute to a vertex.
LIBMMG2D_EXPORT int MMG2D_Set_inputParamName(MMG5_pMesh mesh, const char *fparamin)
Set the name of the input parameter file.
LIBMMG2D_EXPORT int MMG2D_Get_triangles(MMG5_pMesh mesh, MMG5_int *tria, MMG5_int *refs, int *areRequired)
Get the vertices and references of all triangles in the mesh.
LIBMMG2D_EXPORT int MMG2D_Set_quadrilateral(MMG5_pMesh mesh, MMG5_int v0, MMG5_int v1, MMG5_int v2, MMG5_int v3, MMG5_int ref, MMG5_int pos)
Set the vertices and reference of a single quadrangle in a mesh.
LIBMMG2D_EXPORT double MMG2D_Get_triangleQuality(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k)
Get the quality measure of a single triangle in the mesh.
LIBMMG2D_EXPORT int MMG2D_Get_vertices(MMG5_pMesh mesh, double *vertices, MMG5_int *refs, int *areCorners, int *areRequired)
Get the coordinates and references of all vertices in the mesh.
LIBMMG2D_EXPORT int MMG2D_defaultValues(MMG5_pMesh mesh)
Print the default parameters values.
LIBMMG2D_EXPORT int MMG2D_parsar(int argc, char *argv[], MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol sol)
Store command line arguments.
LIBMMG2D_EXPORT int MMG2D_saveVtuMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Save a mesh and multiple data fields in VTU format.
LIBMMG2D_EXPORT int MMG2D_mmg2dls(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_pSol met)
Main "program" for the level-set discretization library.
Definition: libmmg2d.c:524
LIBMMG2D_EXPORT int MMG2D_loadMesh(MMG5_pMesh mesh, const char *filename)
Load a mesh (in .mesh/.mesb format) from file.
Definition: inout_2d.c:28
LIBMMG2D_EXPORT void MMG2D_Reset_verticestags(MMG5_pMesh mesh)
Reset the vertex tags.
LIBMMG2D_EXPORT int MMG2D_Get_vertex(MMG5_pMesh mesh, double *c0, double *c1, MMG5_int *ref, int *isCorner, int *isRequired)
Get the coordinates and reference ref of the next vertex of a mesh.
LIBMMG2D_EXPORT int MMG2D_Get_quadrilateral(MMG5_pMesh mesh, MMG5_int *v0, MMG5_int *v1, MMG5_int *v2, MMG5_int *v3, MMG5_int *ref, int *isRequired)
Get the vertices and reference of the next quadrangle of the mesh.
LIBMMG2D_EXPORT int MMG2D_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.
LIBMMG2D_EXPORT int MMG2D_Free_all(const int starter,...)
Deallocations before return.
LIBMMG2D_EXPORT int MMG2D_Set_edge(MMG5_pMesh mesh, MMG5_int v0, MMG5_int v1, MMG5_int ref, MMG5_int pos)
Define a single edge.
LIBMMG2D_EXPORT int MMG2D_Set_corner(MMG5_pMesh mesh, MMG5_int k)
Assign the "corner" attribute to a vertex.
LIBMMG2D_EXPORT int MMG2D_Set_lsBaseReference(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_int br)
Set level-set base reference.
LIBMMG2D_EXPORT int(* MMG2D_doSol)(MMG5_pMesh mesh, MMG5_pSol met)
Compute unit tensor according to the lengths of the edges passing through a vertex.
Definition: mmg2dexterns.c:9
LIBMMG2D_EXPORT int MMG2D_mmg2dmesh(MMG5_pMesh mesh, MMG5_pSol sol)
Main "program" for the mesh generation library.
Definition: libmmg2d.c:305
LIBMMG2D_EXPORT int MMG2D_Get_triFromEdge(MMG5_pMesh mesh, MMG5_int ked, MMG5_int *ktri, int *ied)
Find a triangle given an adjacent triangle and an edge number.
LIBMMG2D_EXPORT int MMG2D_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_2d.c:1678
LIBMMG2D_EXPORT int MMG2D_saveTetgenMesh(MMG5_pMesh, const char *)
Save data in Tetgen's Triangle format.
Definition: inout_2d.c:2214
LIBMMG2D_EXPORT int MMG2D_Free_allSols(MMG5_pMesh mesh, MMG5_pSol *sol)
Deallocate an array of solution fields.
LIBMMG2D_EXPORT int MMG2D_Set_tensorSols(MMG5_pSol met, double *sols)
Set all elements of a tensor sol structure.
LIBMMG2D_EXPORT int MMG2D_Set_constantSize(MMG5_pMesh mesh, MMG5_pSol met)
Compute a constant size map according to the hsiz, hmin and hmax parameters.
LIBMMG2D_EXPORT int MMG2D_Get_ithSols_inSolsAtVertices(MMG5_pSol sol, int i, double *s)
Get one out of several scalar solutions at all vertices in the mesh.
LIBMMG2D_EXPORT int MMG2D_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_2d.c:2235
LIBMMG2D_EXPORT int MMG2D_saveSol(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
Save metric field in medit solution file format.
Definition: inout_2d.c:1617
LIBMMG2D_EXPORT int MMG2D_Get_vectorSol(MMG5_pSol met, double *vx, double *vy)
Get the next element of a vector sol structure.
LIBMMG2D_EXPORT int MMG2D_Get_solSize(MMG5_pMesh mesh, MMG5_pSol sol, int *typEntity, MMG5_int *np, int *typSol)
Get the number of solutions, their dimension and their type.
LIBMMG2D_EXPORT int MMG2D_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_2d.c:996
#define MMG2D_LMAX
Definition: libmmg2d.h:98
LIBMMG2D_EXPORT int MMG2D_Set_triangle(MMG5_pMesh mesh, MMG5_int v0, MMG5_int v1, MMG5_int v2, MMG5_int ref, MMG5_int pos)
Set the vertices and reference of a single triangle in a mesh.
LIBMMG2D_EXPORT int MMG2D_Set_vertex(MMG5_pMesh mesh, double c0, double c1, MMG5_int ref, MMG5_int pos)
Set the coordinates and reference of a single vertex.
LIBMMG2D_EXPORT MMG5_int MMG2D_Get_adjaVerticesFast(MMG5_pMesh mesh, MMG5_int ip, MMG5_int start, MMG5_int lispoi[MMG2D_LMAX])
Return adjacent vertices of a triangle.
LIBMMG2D_EXPORT int MMG2D_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_2d.c:772
LIBMMG2D_EXPORT int MMG2D_saveMesh(MMG5_pMesh, const char *)
Save a mesh in .mesh/.meshb format.
Definition: inout_2d.c:1101
LIBMMG2D_EXPORT int MMG2D_Set_edges(MMG5_pMesh mesh, MMG5_int *edges, MMG5_int *refs)
Set the vertices and references of all edges in a mesh.
LIBMMG2D_EXPORT int MMG2D_saveVtkMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Save a mesh and multiple data fields in VTK format.
LIBMMG2D_EXPORT int MMG2D_Set_outputMeshName(MMG5_pMesh mesh, const char *meshout)
Set the name of the output mesh file.
LIBMMG2D_EXPORT int MMG2D_GetByIdx_vertex(MMG5_pMesh mesh, double *c0, double *c1, MMG5_int *ref, int *isCorner, int *isRequired, MMG5_int idx)
Get the coordinates and reference of a specific vertex in the mesh.
LIBMMG2D_EXPORT int MMG2D_mmg2dlib(MMG5_pMesh mesh, MMG5_pSol sol)
Main "program" for the mesh adaptation library.
Definition: libmmg2d.c:63
LIBMMG2D_EXPORT int MMG2D_Set_localParameter(MMG5_pMesh mesh, MMG5_pSol sol, int typ, MMG5_int ref, double hmin, double hmax, double hausd)
Set local parameters.
LIBMMG2D_EXPORT int MMG2D_scaleMesh(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol ls)
Normalize the mesh and size information.
LIBMMG2D_EXPORT int MMG2D_Set_inputSolName(MMG5_pMesh mesh, MMG5_pSol sol, const char *solin)
Set the name of the input solution file.
LIBMMG2D_EXPORT void MMG2D_Init_fileNames(MMG5_pMesh mesh, MMG5_pSol sol)
Initialize file names to their default values.
LIBMMG2D_EXPORT int MMG2D_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.
LIBMMG2D_EXPORT int MMG2D_loadGenericMesh(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol sol, const char *filename)
Read mesh data in a format determined by the filename extension.
Definition: inout_2d.c:597
LIBMMG2D_EXPORT int MMG2D_Get_solsAtVerticesSize(MMG5_pMesh mesh, MMG5_pSol *sol, int *nsols, MMG5_int *nentities, int *typSol)
Get the number of elements and dimension of a solution defined on vertices.
LIBMMG2D_EXPORT void MMG2D_Free_edges(MMG5_pMesh mesh)
Free the mesh edges (and the associated xpoints).
LIBMMG2D_EXPORT int MMG2D_saveVtkMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
Save a mesh and optionally one solution in VTK format.
LIBMMG2D_EXPORT int MMG2D_Set_dparameter(MMG5_pMesh mesh, MMG5_pSol sol, int dparam, double val)
Set double parameter dparam to value val.
LIBMMG2D_EXPORT void MMG2D_setfunc(MMG5_pMesh mesh, MMG5_pSol met)
Set function pointers for length, caltri... depending if case is iso or aniso.
LIBMMG2D_EXPORT int MMG2D_mmg2dmov(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol disp)
Main "program" for the rigid-body movement library.
Definition: libmmg2d.c:820
LIBMMG2D_EXPORT int MMG2D_Set_vectorSols(MMG5_pSol met, double *sols)
Set all values in a vector sol structure.
LIBMMG2D_EXPORT int MMG2D_Set_quadrilaterals(MMG5_pMesh mesh, MMG5_int *quadra, MMG5_int *refs)
Set the vertices and references of all quadrangles in a mesh.
LIBMMG2D_EXPORT int MMG2D_Get_tensorSol(MMG5_pSol met, double *m11, double *m12, double *m22)
Get the next element of a tensor sol structure.
LIBMMG2D_EXPORT int MMG2D_Set_iparameter(MMG5_pMesh mesh, MMG5_pSol sol, int iparam, MMG5_int val)
Set integer parameter iparam to value val.
LIBMMG2D_EXPORT int MMG2D_Set_meshSize(MMG5_pMesh mesh, MMG5_int np, MMG5_int nt, MMG5_int nquad, MMG5_int na)
Set the numbers of entities in the mesh.
LIBMMG2D_EXPORT int MMG2D_loadVtpMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Load a mesh and multiple solutions in VTP (VTK) format from file.
LIBMMG2D_EXPORT int MMG2D_Init_mesh(const int starter,...)
Initialize a mesh structure and optionally the associated solution and metric structures.
LIBMMG2D_EXPORT int MMG2D_loadVtuMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Load a mesh and multiple solutions in VTU (VTK) format from file.
#define LIBMMG2D_EXPORT
Definition: mmg2d_export.h:31
MMG mesh structure.
Definition: libmmgtypes.h:613