Mmg
Simplicial remeshers (mesh adaptation, isovalue discretization, lagrangian movement)
Macros | Enumerations | Functions | Variables
libmmg2d.h File Reference

API headers and documentation for the mmg2d library. More...

#include "mmg/common/libmmgtypes.h"
#include "mmg/mmg2d/mmg2d_export.h"
Include dependency graph for libmmg2d.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MMG2D_LMAX   1024
 

Enumerations

enum  MMG2D_Param {
  MMG2D_IPARAM_verbose , MMG2D_IPARAM_mem , MMG2D_IPARAM_debug , MMG2D_IPARAM_angle ,
  MMG2D_IPARAM_iso , MMG2D_IPARAM_isosurf , MMG2D_IPARAM_opnbdy , MMG2D_IPARAM_lag ,
  MMG2D_IPARAM_3dMedit , MMG2D_IPARAM_optim , MMG2D_IPARAM_noinsert , MMG2D_IPARAM_noswap ,
  MMG2D_IPARAM_nomove , MMG2D_IPARAM_nosurf , MMG2D_IPARAM_nreg , MMG2D_IPARAM_xreg ,
  MMG2D_IPARAM_numsubdomain , MMG2D_IPARAM_numberOfLocalParam , MMG2D_IPARAM_numberOfLSBaseReferences , MMG2D_IPARAM_numberOfMat ,
  MMG2D_IPARAM_anisosize , MMG2D_IPARAM_nosizreq , MMG2D_DPARAM_angleDetection , MMG2D_DPARAM_hmin ,
  MMG2D_DPARAM_hmax , MMG2D_DPARAM_hsiz , MMG2D_DPARAM_hausd , MMG2D_DPARAM_hgrad ,
  MMG2D_DPARAM_hgradreq , MMG2D_DPARAM_ls , MMG2D_DPARAM_xreg , MMG2D_DPARAM_rmc ,
  MMG2D_IPARAM_nofem , MMG2D_IPARAM_isoref
}
 Input parameters for mmg library. More...
 

Functions

LIBMMG2D_EXPORT int MMG2D_Init_mesh (const int starter,...)
 Initialize a mesh structure and optionally the associated solution and metric structures.
 
LIBMMG2D_EXPORT void MMG2D_Init_fileNames (MMG5_pMesh mesh, MMG5_pSol sol)
 Initialize file names to their default values.
 
LIBMMG2D_EXPORT void MMG2D_Init_parameters (MMG5_pMesh mesh)
 Initialize the input parameters (stored in the Info structure).
 
LIBMMG2D_EXPORT int MMG2D_Set_inputMeshName (MMG5_pMesh mesh, const char *meshin)
 Set the name of the input mesh.
 
LIBMMG2D_EXPORT int MMG2D_Set_outputMeshName (MMG5_pMesh mesh, const char *meshout)
 Set the name of the output mesh file.
 
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 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_Set_inputParamName (MMG5_pMesh mesh, const char *fparamin)
 Set the name of the input parameter file.
 
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_dparameter (MMG5_pMesh mesh, MMG5_pSol sol, int dparam, double val)
 Set double parameter dparam to value val.
 
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_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_lsBaseReference (MMG5_pMesh mesh, MMG5_pSol sol, MMG5_int br)
 Set level-set base reference.
 
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_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_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_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 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_Set_corner (MMG5_pMesh mesh, MMG5_int k)
 Assign the "corner" attribute to a vertex.
 
LIBMMG2D_EXPORT int MMG2D_Unset_corner (MMG5_pMesh mesh, MMG5_int k)
 Remove the "corner" attribute from a vertex.
 
LIBMMG2D_EXPORT int MMG2D_Set_requiredVertex (MMG5_pMesh mesh, MMG5_int k)
 Assign the "required" attribute to a vertex.
 
LIBMMG2D_EXPORT int MMG2D_Unset_requiredVertex (MMG5_pMesh mesh, MMG5_int k)
 Remove the "required" attribute from a vertex.
 
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_triangles (MMG5_pMesh mesh, MMG5_int *tria, MMG5_int *refs)
 Set the vertices and references of all triangles in a mesh.
 
LIBMMG2D_EXPORT int MMG2D_Set_requiredTriangle (MMG5_pMesh mesh, MMG5_int k)
 Give triangle k the "required" attribute.
 
LIBMMG2D_EXPORT int MMG2D_Unset_requiredTriangle (MMG5_pMesh mesh, MMG5_int k)
 Remove the "required" attribute from triangle k.
 
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 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_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_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_Set_requiredEdge (MMG5_pMesh mesh, MMG5_int k)
 Give edge k the "required" attribute.
 
LIBMMG2D_EXPORT int MMG2D_Unset_requiredEdge (MMG5_pMesh mesh, MMG5_int k)
 Remove the "required" attribute from edge k.
 
LIBMMG2D_EXPORT int MMG2D_Set_parallelEdge (MMG5_pMesh mesh, MMG5_int k)
 Give edge k the "parallel" attribute.
 
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_scalarSols (MMG5_pSol met, double *s)
 Set all values of a scalar sol structure.
 
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_Set_vectorSols (MMG5_pSol met, double *sols)
 Set all values in a vector sol structure.
 
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_Set_tensorSols (MMG5_pSol met, double *sols)
 Set all elements of a tensor sol structure.
 
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_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_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_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_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 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_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_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_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_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_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_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_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_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 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_scalarSol (MMG5_pSol met, double *s)
 Get the scalar solution value s of next element of a solution.
 
LIBMMG2D_EXPORT int MMG2D_Get_scalarSols (MMG5_pSol met, double *s)
 Get all elements of a scalar sol structure.
 
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_vectorSols (MMG5_pSol met, double *sols)
 Get all elements of a vector sol structure.
 
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_Get_tensorSols (MMG5_pSol met, double *sols)
 Get all elements of a tensor sol structure.
 
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_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_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_Free_allSols (MMG5_pMesh mesh, MMG5_pSol *sol)
 Deallocate an array of solution fields.
 
LIBMMG2D_EXPORT int MMG2D_Free_all (const int starter,...)
 Deallocations before return.
 
LIBMMG2D_EXPORT int MMG2D_Free_structures (const int starter,...)
 Structure deallocations before return.
 
LIBMMG2D_EXPORT int MMG2D_Free_names (const int starter,...)
 Structure deallocations before return.
 
LIBMMG2D_EXPORT int MMG2D_loadMesh (MMG5_pMesh mesh, const char *filename)
 Load a mesh (in .mesh/.mesb format) from file.
 
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.
 
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_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_loadVtuMesh_and_allData (MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
 Load a mesh and multiple solutions in VTU (VTK) format from file.
 
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.
 
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_loadMshMesh (MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
 Load a mesh and possibly a solution in .msh format from file.
 
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.
 
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.
 
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.
 
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.
 
LIBMMG2D_EXPORT int MMG2D_loadVect (MMG5_pMesh, char *)
 
LIBMMG2D_EXPORT int MMG2D_saveMesh (MMG5_pMesh, const char *)
 Save a mesh in .mesh/.meshb format.
 
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 extension.
 
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 extension.
 
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_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_saveVtuMesh (MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
 Save a mesh and optionally one data field in VTU format.
 
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_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_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_saveTetgenMesh (MMG5_pMesh, const char *)
 Save data in Tetgen's Triangle format.
 
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.
 
LIBMMG2D_EXPORT int MMG2D_saveSol (MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
 Save metric field in medit solution file format.
 
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.
 
LIBMMG2D_EXPORT int MMG2D_saveVect (MMG5_pMesh mesh, MMG5_pSol sol, const char *filename, double lambda)
 
LIBMMG2D_EXPORT int MMG2D_mmg2dlib (MMG5_pMesh mesh, MMG5_pSol sol)
 Main "program" for the mesh adaptation library.
 
LIBMMG2D_EXPORT int MMG2D_mmg2dmesh (MMG5_pMesh mesh, MMG5_pSol sol)
 Main "program" for the mesh generation library.
 
LIBMMG2D_EXPORT int MMG2D_mmg2dls (MMG5_pMesh mesh, MMG5_pSol sol, MMG5_pSol met)
 Main "program" for the level-set discretization library.
 
LIBMMG2D_EXPORT int MMG2D_mmg2dmov (MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol disp)
 Main "program" for the rigid-body movement library.
 
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_parsop (MMG5_pMesh mesh, MMG5_pSol met)
 Read a file containing Local parameters (.mmg2d extension)
 
LIBMMG2D_EXPORT int MMG2D_usage (char *prog)
 Print help for mmg2d options.
 
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 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_Get_numberOfNonBdyEdges (MMG5_pMesh mesh, MMG5_int *nb_edges)
 Get the number of non-boundary edges.
 
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_Get_adjaTri (MMG5_pMesh mesh, MMG5_int kel, MMG5_int listri[3])
 Return adjacent elements of a triangle.
 
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 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_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_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 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 void MMG2D_Reset_verticestags (MMG5_pMesh mesh)
 Reset the vertex tags.
 
LIBMMG2D_EXPORT void MMG2D_Free_triangles (MMG5_pMesh mesh)
 Free the mesh elements (and the adjacency information).
 
LIBMMG2D_EXPORT void MMG2D_Free_edges (MMG5_pMesh mesh)
 Free the mesh edges (and the associated xpoints).
 
LIBMMG2D_EXPORT void MMG2D_Free_solutions (MMG5_pMesh mesh, MMG5_pSol sol)
 Free the solution.
 
LIBMMG2D_EXPORT void MMG2D_Set_commonFunc (void)
 Set common function pointers between mmgs and mmg2d to the matching mmg2d functions.
 
LIBMMG2D_EXPORT int MMG2D_scaleMesh (MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol ls)
 Normalize the mesh and size information.
 

Variables

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.
 

Detailed Description

API headers and documentation for the mmg2d library.

Author
Cecile Dobrzynski and Algiane Froehly (Bx INP/Inria/UBordeaux)
Version
5
Date
01 2014

These are the API functions for the mmg2d library. These functions allow to load and save meshes and data defined on meshes; add, extract, or modify mesh data; and to call the library functions that perform meshing, remeshing, level-set discretization, and Lagrangian motion.

Meshes are here defined in terms of vertices and two-dimensional objects: triangles and quadrangles. Edges can also be represented. All of these entities can have a reference: an integer value that can serve as a group identifier. In addition mesh entities can have attributes such as "required" or "corner".

Data defined on meshes can be for example functions that are meant for level-set discretization, metric tensors that will govern edge lengths, and vector fields governing lagrangian motion. These data can be scalar, vector, or (symmetric) tensor-valued; and there can be more than one data item associated with a mesh entity. These data are often referred to as solutions.

Four of the functions here are referred to as "programs", because they perform the tasks for which Mmg is meant: (re)meshing, level-set discretization and Lagrangian motion. The other functions merely serve to load and save data and to perform pre- and post-processing. These programs actually behave much like independent programs: they send diagnostic output to stdout and in rare cases they may call the exit() function.

Definition in file libmmg2d.h.

Macro Definition Documentation

◆ MMG2D_LMAX

#define MMG2D_LMAX   1024

Maximum array size when storing adjacent vertices (or ball) of a vertex.

Definition at line 98 of file libmmg2d.h.

Enumeration Type Documentation

◆ MMG2D_Param

Input parameters for mmg library.

These are the input parameters for mmg2d library functions. Options prefixed by MMG2D_IPARAM require integer values and options prefixed by MMG2D_DPARAM require real values. They can be set with the MMG2D_Set_iparameter and MMG2D_Set_dparameter functions, respectively.

Enumerator
MMG2D_IPARAM_verbose 

[-1..10], Level of verbosity

MMG2D_IPARAM_mem 

[n/-1], Max memory size in Mbytes or keep the default value

MMG2D_IPARAM_debug 

[1/0], Turn on/off debug mode

MMG2D_IPARAM_angle 

[1/0], Turn on/off angle detection

MMG2D_IPARAM_iso 

[1/0], Enable level-set discretization

MMG2D_IPARAM_isosurf 

[1/0], Enable level-set discretization on the surface part only

MMG2D_IPARAM_opnbdy 

[1/0], Preserve edges at the interface of 2 domains with same reference

MMG2D_IPARAM_lag 

[-1/0/1/2], Enable Lagrangian motion

MMG2D_IPARAM_3dMedit 

[0/1/2], Read/write 2D mesh in 3D (Medit only). out if val=1 in/out if val=2

MMG2D_IPARAM_optim 

[1/0], Optimize mesh keeping its initial edge sizes

MMG2D_IPARAM_noinsert 

[1/0], Avoid/allow vertex insertion

MMG2D_IPARAM_noswap 

[1/0], Avoid/allow edge or face flipping

MMG2D_IPARAM_nomove 

[1/0], Avoid/allow vertex relocation

MMG2D_IPARAM_nosurf 

[1/0], Avoid/allow surface modifications

MMG2D_IPARAM_nreg 

[0/1], Enable normal regularization

MMG2D_IPARAM_xreg 

[0/1], Enable regularization by moving vertices

MMG2D_IPARAM_numsubdomain 

[0/n], Save only the subdomain n (0==all subdomains)

MMG2D_IPARAM_numberOfLocalParam 

[n], Number of local parameters

MMG2D_IPARAM_numberOfLSBaseReferences 

[n], Number of base references for bubble removal

MMG2D_IPARAM_numberOfMat 

[n], Number of materials in level-set mode

MMG2D_IPARAM_anisosize 

[1/0], Turn on/off anisotropic metric creation when no metric is provided

MMG2D_IPARAM_nosizreq 

[0/1], Allow/avoid overwriting of sizes at required vertices (advanced usage)

MMG2D_DPARAM_angleDetection 

[val], Threshold for angle detection

MMG2D_DPARAM_hmin 

[val], Minimal edge length

MMG2D_DPARAM_hmax 

[val], Maximal edge length

MMG2D_DPARAM_hsiz 

[val], Constant edge length

MMG2D_DPARAM_hausd 

[val], Global Hausdorff distance (on all the boundary surfaces of the mesh)

MMG2D_DPARAM_hgrad 

[val], Global gradation

MMG2D_DPARAM_hgradreq 

[val], Global gradation on required entites (advanced usage)

MMG2D_DPARAM_ls 

[val], Function value where the level set is to be discretized

MMG2D_DPARAM_xreg 

[val], Relaxation parameter for coordinate regularization (0<val<1)

MMG2D_DPARAM_rmc 

[-1/val], Remove small disconnected components in level-set mode

MMG2D_IPARAM_nofem 

[1/0], Do not attempt to make the mesh suitable for finite-element computations

MMG2D_IPARAM_isoref 

[0/n], Iso-surface boundary material reference

Definition at line 111 of file libmmg2d.h.

Function Documentation

◆ MMG2D_Chk_meshData()

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.

Parameters
meshpointer to the mesh structure.
metpointer to the sol structure.
Returns
0 on failure, 1 otherwise.

Check if the number of given entities match with mesh and sol size (not mandatory) and check mesh datas.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_Chk_meshData(mesh,met,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,met
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1860 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Compute_eigenv()

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.

Parameters
mupper part of a symMetric matrix diagonalizable in |R
lambdaarray of the metric eigenvalues
vparray of the metric eigenvectors
Returns
the order of the eigenvalues

This function computes the real eigenvalues and eigenvectors of a symmetric matrix m whose upper part is provided (m11, m12, m22, in this order).

lambda[0] is the eigenvalue associated to the eigenvector ( v[0][0], v[0,1] ) in C and to the eigenvector v(1,:) in fortran

lambda[1] is the eigenvalue associated to the eigenvector ( v[1][0], v[1,1] ) in C and to the eigenvector v(2,:) in fortran

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_COMPUTE_EIGENV(m,lambda,vp,retval)
REAL(KIND=8), INTENT(IN) :: m(*)
REAL(KIND=8), INTENT(OUT) :: lambda(*),vp(*)
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1022 of file libmmg2d_tools.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_defaultValues()

LIBMMG2D_EXPORT int MMG2D_defaultValues ( MMG5_pMesh  mesh)

Print the default parameters values.

Parameters
meshpointer to the mesh structure.
Returns
0 on failure, 1 on success.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_DEFAULTVALUES(mesh,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Parameters
meshpointer to the mesh structure.
Returns
0 if fail, 1 if success.

Print the default parameters values.

Definition at line 530 of file libmmg2d_tools.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Free_all()

LIBMMG2D_EXPORT int MMG2D_Free_all ( const int  starter,
  ... 
)

Deallocations before return.

Parameters
starterdummy argument used to initialize the variadic argument list.
...variadic arguments that depend to the library function that you have call.

For the MMG2D_mmg2dlib function, you need to call the MMG2D_Init_mesh function with the following arguments : MMG2D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppMet,&your_metric,MMG5_ARG_end).

For the MMG2D_mmg2dls function, you need to call the MMG2D_Init_mesh function with the following arguments : MMG2D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppLs, &your_level_set,MMG5_ARG_end).

For the MMG2D_mmg2dmov function, you must call : MMG2D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppMet,&empty_metric,MMG5_ARG_ppDisp, &your_displacement, MMG5_ARG_end).

Returns
0 on failure, 1 on success
Remarks
we pass the structures by reference in order to have argument compatibility between the library call from a Fortran code and a C code.
no Fortran interface to allow variadic args.

Definition at line 1911 of file API_functions_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Free_allSols()

LIBMMG2D_EXPORT int MMG2D_Free_allSols ( MMG5_pMesh  mesh,
MMG5_pSol sol 
)

Deallocate an array of solution fields.

Parameters
meshpointer to the mesh structure.
solpointer to an array of solution structure (that stores solution fields).
Returns
1
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_Free_allSols(mesh,sol,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1905 of file API_functions_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Free_edges()

LIBMMG2D_EXPORT void MMG2D_Free_edges ( MMG5_pMesh  mesh)

Free the mesh edges (and the associated xpoints).

Parameters
meshpointer to the mesh structure
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_FREE_EDGES(mesh)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
END SUBROUTINE

Definition at line 1053 of file libmmg2d_tools.c.

Here is the caller graph for this function:

◆ MMG2D_Free_names()

LIBMMG2D_EXPORT int MMG2D_Free_names ( const int  starter,
  ... 
)

Structure deallocations before return.

Parameters
starterdummy argument used to initialize the variadic argument list.
...variadic arguments that depend to the library function that you have call.

For the MMG2D_mmg2dlib function, you need to call the MMG2D_Init_mesh function with the following arguments : MMG2D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppMet,&your_metric,MMG5_ARG_end).

For the MMG2D_mmg2dls function, you need to call the MMG2D_Init_mesh function with the following arguments : MMG2D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppLs, &your_level_set,MMG5_ARG_end).

For the MMG2D_mmg2dmov function, you must call : MMG2D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppMet,&empty_metric,MMG5_ARG_ppDisp, &your_displacement, MMG5_ARG_end).

Returns
0 on failure, 1 otherwise
Remarks
we pass the structures by reference in order to have argument compatibility between the library call from a Fortran code and a C code.
No fortran interface to allow variadic arguments.
no Fortran interface to allow variadic args.

Definition at line 1940 of file API_functions_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Free_solutions()

LIBMMG2D_EXPORT void MMG2D_Free_solutions ( MMG5_pMesh  mesh,
MMG5_pSol  sol 
)

Free the solution.

Parameters
meshpointer to the mesh structure
solpointer to the solution structure
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_FREE_SOLUTIONS(mesh,sol)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
END SUBROUTINE

Definition at line 1070 of file libmmg2d_tools.c.

Here is the caller graph for this function:

◆ MMG2D_Free_structures()

LIBMMG2D_EXPORT int MMG2D_Free_structures ( const int  starter,
  ... 
)

Structure deallocations before return.

Parameters
starterdummy argument used to initialize the variadic argument list.
...variadic arguments that depend to the library function that you have call.

For the MMG2D_mmg2dlib function, you need to call the MMG2D_Init_mesh function with the following arguments : MMG2D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppMet,&your_metric,MMG5_ARG_end).

For the MMG2D_mmg2dls function, you need to call the MMG2D_Init_mesh function with the following arguments : MMG2D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppLs, &your_level_set,MMG5_ARG_end).

For the MMG2D_mmg2dmov function, you must call : MMG2D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppMet,&empty_metric,MMG5_ARG_ppDisp, &your_displacement, MMG5_ARG_end).

Returns
0 on failure, 1 on success
Remarks
we pass the structures by reference in order to have argument compatibility between the library call from a Fortran code and a C code.
No fortran interface to allow variadic arguments.
no Fortran interface to allow variadic args.

Definition at line 1925 of file API_functions_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Free_triangles()

LIBMMG2D_EXPORT void MMG2D_Free_triangles ( MMG5_pMesh  mesh)

Free the mesh elements (and the adjacency information).

Parameters
meshpointer to the mesh structure
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_FREE_TRIANGLES(mesh)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
END SUBROUTINE

Definition at line 1038 of file libmmg2d_tools.c.

Here is the caller graph for this function:

◆ MMG2D_Get_adjaTri()

LIBMMG2D_EXPORT int MMG2D_Get_adjaTri ( MMG5_pMesh  mesh,
MMG5_int  kel,
MMG5_int  listri[3] 
)

Return adjacent elements of a triangle.

Parameters
meshpointer to the mesh structure.
keltriangle index.
listripointer to the array of indices of the three adjacent triangles of the elt kel (the index is 0 if there is no adjacent).
Returns
1.

Find the indices of the 3 adjacent elements of triangle kel. \(v_i = 0\) if the \(i^{th}\) face has no adjacent element (so we are on a boundary face).

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_GET_ADJATRI(mesh,kel,listri,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
INTEGER, INTENT(IN) :: kel
INTEGER, DIMENSION(3), INTENT(OUT) :: listri
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 836 of file libmmg2d_tools.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Get_adjaVertices()

LIBMMG2D_EXPORT MMG5_int MMG2D_Get_adjaVertices ( MMG5_pMesh  mesh,
MMG5_int  ip,
MMG5_int  lispoi[MMG2D_LMAX] 
)

Return adjacent vertices of a triangle.

Parameters
meshpointer to the mesh structure.
ipvertex index.
lispoipointer to an array of size MMG2D_LMAX that will contain the indices of adjacent vertices to the vertex ip.
Returns
nbpoi the number of adjacent vertices if success, 0 on failure.

Find the indices of the adjacent vertices of the vertex ip.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_GET_ADJAVERTICES(mesh,ip,lispoi,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(IN) :: ip
INTEGER(MMG5F_INT), DIMENSION(MMG2D_LMAX), INTENT(OUT) :: lispoi
INTEGER(MMG5F_INT), INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 850 of file libmmg2d_tools.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Get_adjaVerticesFast()

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.

Parameters
meshpointer to the mesh structure.
ipvertex index.
startindex of a triangle holding ip.
lispoipointer to an array of size MMG2D_LMAX that will contain the indices of adjacent vertices to the vertex ip.
Returns
nbpoi the number of adjacent vertices if success, 0 on failure.

Find the indices of the adjacent vertices of the vertex ip of the triangle start.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_GET_ADJAVERTICESFAST(mesh,ip,start,lispoi,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(IN) :: ip,start
INTEGER(MMG5F_INT), DIMENSION(MMG2D_LMAX), INTENT(OUT) :: lispoi
INTEGER(MMG5F_INT), INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 862 of file libmmg2d_tools.c.

Here is the caller graph for this function:

◆ MMG2D_Get_edge()

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.

Parameters
meshpointer to the mesh structure.
e0pointer to the first extremity of the edge.
e1pointer to the second extremity of the edge.
refpointer to the edge reference.
isRidgepointer to the flag saying if the edge is ridge.
isRequiredpointer to the flag saying if the edge is required.
Returns
0 on failure, 1 otherwise.

This function retrieves the extremities e0, e1 and reference ref of next edge of mesh. It is meant to be called in a loop over all edges. When it has been called as many times as there are edges in the mesh, the internal edge counter will be reset.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_GET_EDGE(mesh,e0,e1,ref,isRidge,isRequired,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(OUT):: e0,e1
INTEGER(MMG5F_INT) :: ref
INTEGER :: isRidge,isRequired
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1313 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Get_edges()

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.

Parameters
meshpointer to the mesh structure.
edgespointer to the array of edges. Vertices of the \(i^{th}\) edge are stored in edge[(i-1)*2]@2.
refsedges references. refs[i-1] is the ref of the \(i^{th}\) edge.
areRidges1 if the edge is a ridge, 0 otherwise.
areRequired1 if the edge is required, 0 otherwise.
Returns
0 on failure, 1 otherwise.
Remarks
Fortran interface: (commentated in order to allow to pass %val(0) instead of the refs, areRidges or areRequired arrays)
Fortran interface:

‍! SUBROUTINE MMG2D_GET_EDGES(mesh,edges,refs,areRidges,areRequired,retval)
! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
! INTEGER(MMG5F_INT), INTENT(IN) :: edges(*)
! INTEGER(MMG5F_INT), INTENT(OUT):: refs(*)
! INTEGER, INTENT(OUT) :: areRequired(*),areRidges(*)
! INTEGER, INTENT(OUT) :: retval
! END SUBROUTINE

Definition at line 1389 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Get_ithSol_inSolsAtVertices()

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.

Parameters
solpointer to the array of solutions
iposition of the solution field that we want to set.
ssolution(s) at mesh vertex pos.
posindex of the vertex on which we get the solution.
Returns
0 on failure, 1 otherwise.

Get values of the ith field of the solution array at vertex pos. (pos from 1 to the number of vertices included and i from 1 to the number of solutions).

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_GET_ITHSOL_INSOLSATVERTICES(sol,i,s,pos,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: sol
INTEGER, INTENT(IN) :: i
INTEGER(MMG5F_INT), INTENT(IN) :: pos
REAL(KIND=8), DIMENSION(*),INTENT(OUT) :: s
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1830 of file API_functions_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Get_ithSols_inSolsAtVertices()

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.

Parameters
solpointer to the array of solutions
iposition of the solution field that we want to get.
sarray of solutions at mesh vertices. The solution at vertex k is given by s[k-1] for a scalar sol, s[2*(k-1)]@2 for a vectorial solution and s[3*(k-1)]@3 for a tensor solution.
Returns
0 on failure, 1 otherwise.

Get values of the solution at the ith field of the solution array. (i from 1 to nb_sols)

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_GET_ITHSOLS_INSOLSATVERTICES(sol,i,s,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: sol
INTEGER, INTENT(IN) :: i
REAL(KIND=8), DIMENSION(*),INTENT(OUT) :: s
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1775 of file API_functions_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Get_meshSize()

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.

recover datas

Parameters
meshpointer to the mesh structure.
nppointer to the number of vertices.
ntpointer to the number of triangles.
nquadpointer to the number of quads.
napointer to the number of edges.
Returns
1.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_GET_MESHSIZE(mesh,np,nt,nquad,na,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT) :: np,nt,nquad,na
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 663 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Get_nonBdyEdge()

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.

Parameters
meshpointer to the mesh structure.
e0pointer to the first extremity of the edge.
e1pointer to the second extremity of the edge.
refpointer to the edge reference.
idxindex of the non boundary edge to get (between 1 and nb_edges)
Returns
0 on failure, 1 otherwise.

This function returns the extremities e0, e1 and reference ref of the idx^th non boundary edge (for DG methods for example). An edge is boundary if it is located at the interface of 2 domains with different references, if it belongs to one triangle only or if it is a singular edge (ridge or required).

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_GET_NONBDYEDGE(mesh,e0,e1,ref,idx,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(OUT):: e0,e1
INTEGER(MMG5F_INT) :: ref
INTEGER(MMG5F_INT), INTENT(IN) :: idx
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 792 of file libmmg2d_tools.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Get_numberOfNonBdyEdges()

LIBMMG2D_EXPORT int MMG2D_Get_numberOfNonBdyEdges ( MMG5_pMesh  mesh,
MMG5_int *  nb_edges 
)

Get the number of non-boundary edges.

Parameters
meshpointer to the mesh structure.
nb_edgespointer to the number of non boundary edges.
Returns
0 on failure, 1 otherwise.

This function extracts the number of non boundary edges (for DG methods for example). An edge is boundary if it is located at the interface of two domains with different references, if it belongs to one triangle only or if it is a singular edge (ridge or required).

Append these edges to the list of edges.

Warning
reallocate the edge array and append the internal edges. This may modify the behaviour of other functions.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_GET_NUMBEROFNONBDYEDGES(mesh,nb_edges,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(OUT):: nb_edges
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 699 of file libmmg2d_tools.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Get_quadrilateral()

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.

Parameters
meshpointer to the mesh structure.
v0pointer to the first vertex of quadrangle.
v1pointer to the second vertex of quadrangle.
v2pointer to the third vertex of quadrangle.
v3pointer to the fourth vertex of quadrangle.
refpointer to the quadrangle reference.
isRequiredpointer to the flag saying if quadrangle is required.
Returns
0 on failure, 1 otherwise.

Get the vertices v0,v1,v2,v3 and reference ref of the next quadrangle of mesh. This function is meant to be called in a loop over all quadrangles. When it has been called as many times as there are quadrangles, the internal loop counter will be reset.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_GET_QUADRILATERAL(mesh,v0,v1,v2,v3,ref,isRequired,&
retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(OUT):: v0,v1,v2,v3
INTEGER(MMG5F_INT) :: ref
INTEGER :: isRequired
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1139 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Get_quadrilaterals()

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.

Parameters
meshpointer to the mesh structure.
quadrapointer to the array of quadrangles vertices. Vertices of the \(i^{th}\) quadrangle are stored in quadra[(i-1)*4]@4.
refspointer to the array of quadrlaterals references. References of the \(i^{th}\) quad is stored in refs[i-1].
areRequiredpointer to the array of flags saying if the quadrangles are required. areRequired[i-1]=1 if the \(i^{th}\) quad is required.
Returns
0 on failure, 1 otherwise.
Remarks
Fortran interface: (commentated in order to allow to pass %val(0) instead of the refs, areCorners or areRequired arrays)

‍! SUBROUTINE MMG2D_GET_QUADRILATERALS(mesh,quadra,refs,areRequired,&
! retval)
! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
! INTEGER(MMG5F_INT), DIMENSION(*),INTENT(OUT) :: quadra
! INTEGER(MMG5F_INT), DIMENSION(*) :: refs
! INTEGER, DIMENSION(*) :: areRequired
! INTEGER, INTENT(OUT) :: retval
! END SUBROUTINE

Definition at line 1210 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Get_scalarSol()

LIBMMG2D_EXPORT int MMG2D_Get_scalarSol ( MMG5_pSol  met,
double *  s 
)

Get the scalar solution value s of next element of a solution.

Parameters
metpointer to the sol structure.
spointer to the scalar solution value.
Returns
0 on failure, 1 otherwise.

This function is meant to be called in a loop over all elements. When it has been called as many times as there are elements in the solution, the internal counter will be reset.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_GET_SCALARSOL(met,s,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8), INTENT(OUT) :: s
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1473 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Get_scalarSols()

LIBMMG2D_EXPORT int MMG2D_Get_scalarSols ( MMG5_pSol  met,
double *  s 
)

Get all elements of a scalar sol structure.

Parameters
metpointer to the sol structure.
sarray of scalar solutions at mesh vertices. s[i-1] is the solution at vertex i.
Returns
0 on failure, 1 otherwise.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_GET_SCALARSOLS(met,s,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8), DIMENSION(*),INTENT(OUT) :: s
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1521 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Get_solsAtVerticesSize()

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.

Parameters
meshpointer to the mesh structure.
solpointer to an array of sol structure.
nentitiespointer to the number of entities.
typSolarray of size MMG5_NSOL_MAX to store type of each solution (scalar, vectorial, ..., see MMG5_type for possible values).
Returns
1.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_GET_SOLSATVERTICESSIZE(mesh,sol,nsols,nentities,typSol,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
INTEGER :: nsols
INTEGER(MMG5F_INT) :: nentities
INTEGER :: typSol(*)
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 634 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Get_solSize()

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.

Parameters
meshpointer to the mesh structure.
solpointer to the sol structure.
typEntitypointer to the type of entities to which solutions are applied (see MMG5_entities for possible values).
nppointer to the number of solutions.
typSolpointer to the type of the solutions (scalar, vectorial, ..., see MMG5_type for possible values)
Returns
1.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_GET_SOLSIZE(mesh,sol,typEntity,np,typSol,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
INTEGER :: typEntity,typSol
INTEGER(MMG5F_INT) :: np
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 609 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Get_tensorSol()

LIBMMG2D_EXPORT int MMG2D_Get_tensorSol ( MMG5_pSol  met,
double *  m11,
double *  m12,
double *  m22 
)

Get the next element of a tensor sol structure.

Parameters
metpointer to the sol structure.
m11pointer to the position (1,1) in the solution tensor.
m12pointer to the position (1,2) in the solution tensor.
m22pointer to the position (2,2) in the solution tensor.
Returns
0 on failure, 1 otherwise.

This function is meant to be called in a loop over all elements. When it has been called as many times as there are elements in the solution, the internal counter will be reset.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_GET_TENSORSOL(met,m11,m12,m22,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8), INTENT(OUT) :: m11,m12,m22
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1674 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Get_tensorSols()

LIBMMG2D_EXPORT int MMG2D_Get_tensorSols ( MMG5_pSol  met,
double *  sols 
)

Get all elements of a tensor sol structure.

Parameters
metpointer to the sol structure.
solsarray of solutions at mesh vertices. sols[3*(i-1)]@3 is the solution at vertex i.
Returns
0 on failure, 1 otherwise.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_GET_TENSORSOLS(met,sols,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8), DIMENSION(*), INTENT(OUT) :: sols
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1731 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Get_triangle()

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.

Parameters
meshpointer to the mesh structure.
v0pointer to the first vertex of triangle.
v1pointer to the second vertex of triangle.
v2pointer to the third vertex of triangle.
refpointer to the triangle reference.
isRequiredpointer to the flag saying if triangle is required.
Returns
0 on failure, 1 otherwise.

This function retrieves the vertices v0, v1, v2, and reference ref of the next triangle of mesh. It is meant to be called in a loop over all triangles. When it has been called as many times as there are triangles, the internal loop counter will be reset.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_GET_TRIANGLE(mesh,v0,v1,v2,ref,isRequired,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(OUT):: v0,v1,v2
INTEGER(MMG5F_INT) :: ref
INTEGER :: isRequired
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 976 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Get_triangleQuality()

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.

Parameters
meshpointer to the mesh structure.
metpointer to the metric structure.
kindex of the triangle for which we want to get the quality.
Returns
the computed quality, or 0 on failure

Get quality of triangle k.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_GET_TRIANGLEQUALITY(mesh,met,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,met
INTEGER(MMG5F_INT), INTENT(IN):: k
REAL(KIND=8), INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1419 of file API_functions_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Get_triangles()

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.

Parameters
meshpointer to the mesh structure.
triapointer to the array of triangles vertices Vertices of the \(i^{th}\) tria are stored in tria[(i-1)*3]@3.
refspointer to the array of triangles references. refs[i-1] is the ref of the \(i^{th}\) tria.
areRequiredpointer to array of flags saying if triangles are required. areRequired[i-1]=1 if the \(i^{th}\) tria is required.
Returns
0 on failure, 1 otherwise.
Remarks
Fortran interface: (commentated in order to allow to pass %val(0) instead of the refs and areRequired arrays)

‍! SUBROUTINE MMG2D_GET_TRIANGLES(mesh,tria,refs,areRequired,retval)
! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
! INTEGER(MMG5F_INT), DIMENSION(*),INTENT(OUT) :: tria
! INTEGER(MMG5F_INT), DIMENSION(*) :: refs
! INTEGER, DIMENSION(*) :: areRequired
! INTEGER, INTENT(OUT) :: retval
! END SUBROUTINE

Definition at line 1079 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Get_triFromEdge()

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.

Parameters
meshpointer to the mesh structure.
kedindex of the boundary edge.
ktripointer to the index of the tri (filled by the function).
iedpointer to the index of the edge of the triangle ktri that correspond to the boundary edge ked.
Returns
0 on failure, 1 otherwise

Fill ktri by the index of the triangle to which belong a boundary edge and ied by the index of the edge of the triangle that correspond to the edge.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_GET_TRIFROMEDGE(mesh,ked,ktri,ied,retval)
MMG5_DATA_PTR_T, INTENT(IN) :: mesh
INTEGER(MMG5F_INT), INTENT(IN) :: ked
INTEGER(MMG5F_INT), INTENT(OUT) :: ktri
INTEGER, INTENT(OUT) :: retval,ied
END SUBROUTINE

Definition at line 937 of file libmmg2d_tools.c.

Here is the caller graph for this function:

◆ MMG2D_Get_trisFromEdge()

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.

Parameters
meshpointer to the mesh structure.
kedindex of the boundary edge.
ktripointer to an array of size 2 to fill by the indices of the triangles that share the edge ked (filled by the function).
iedpointer to an array of size two to fill by the indices of the edge in each triangle.
Returns
0 on failure, 1 otherwise

Fill ktri by the indices of the triangles to which belong a boundary edge and ied by the indices of the matching edge in each triangle. If ked belongs to one triangle only, ktri[1] = ied[1] = 0.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_GET_TRISFROMEDGE(mesh,ked,ktri,ied,retval)
MMG5_DATA_PTR_T, INTENT(IN) :: mesh
INTEGER(MMG5F_INT), INTENT(IN) :: ked
INTEGER(MMG5F_INT), DIMENSION(2),INTENT(OUT) :: ktri
INTEGER, INTENT(OUT) :: retval,ied
END SUBROUTINE

Definition at line 956 of file libmmg2d_tools.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Get_vectorSol()

LIBMMG2D_EXPORT int MMG2D_Get_vectorSol ( MMG5_pSol  met,
double *  vx,
double *  vy 
)

Get the next element of a vector sol structure.

Parameters
metpointer to the sol structure.
vxx value of the vectorial solution.
vyy value of the vectorial solution.
Returns
0 on failure, 1 otherwise.

This function retrieves vectorial solution \((v_x,v_y)\) of the next element of met. It is meant to be called in a loop over all elements. When it has been called as many times as there are elements in the solution, the internal counter will be reset.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_GET_VECTORSOL(met,vx,vy,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8), INTENT(OUT) :: vx,vy
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1571 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Get_vectorSols()

LIBMMG2D_EXPORT int MMG2D_Get_vectorSols ( MMG5_pSol  met,
double *  sols 
)

Get all elements of a vector sol structure.

Parameters
metpointer to the sol structure.
solsarray to store the data in the order \([x_1, y_1, x_2, \ldots, y_N]\)
Returns
0 on failure, 1 otherwise.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_GET_VECTORSOLS(met,sols,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8), DIMENSION(*),INTENT(OUT) :: sols
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1624 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Get_vertex()

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.

Parameters
meshpointer to the mesh structure.
c0pointer to the coordinate of the vertex along the first dimension.
c1pointer to the coordinate of the vertex along the second dimension.
refpointer to the vertex reference.
isCornerpointer to the flag saying if vertex is corner.
isRequiredpointer to the flag saying if vertex is required.
Returns
1.

This function retrieves the coordinates c0 and c1, and reference ref of the next vertex of a mesh. It is meant to be used in a loop over all vertices. When this function has been called as many times as there are vertices, the internal loop counter will be reset. To obtain data for a specific vertex, the MMG2D_GetByIdx_vertex function can be used instead.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_GET_VERTEX(mesh,c0,c1,ref,isCorner,isRequired,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
REAL(KIND=8), INTENT(OUT) :: c0,c1
INTEGER(MMG5F_INT) :: ref
INTEGER :: isCorner,isRequired
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 752 of file API_functions_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Get_vertices()

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.

Parameters
meshpointer to the mesh structure.
verticespointer to the array of vertex coordinates. The coordinates of the \(i^{th}\) vertex are stored in vertices[(i-1)*2]@2.
refspointer to the array of references. The ref of the \(i^th\) vertex is stored in refs[i-1].
areCornerspointer to the array of flags saying if vertices are corners. areCorners[i-1]=1 if the \(i^{th}\) vertex is corner.
areRequiredpointer to the array of flags saying if vertices are required. areRequired[i-1]=1 if the \(i^{th}\) vertex is required.
Returns
1.
Remarks
Fortran interface: (commentated in order to allow to pass %val(0) instead of the refs, areCorners and areRequired arrays)

‍! SUBROUTINE MMG2D_GET_VERTICES(mesh,vertices,refs,areCorners,&
! areRequired,retval)
! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
! REAL(KIND=8),DIMENSION(*), INTENT(OUT) :: vertices
! INTEGER(MMG5F_INT), DIMENSION(*) :: refs
! INTEGER, DIMENSION(*) :: areCorners,areRequired
! INTEGER, INTENT(OUT) :: retval
! END SUBROUTINE

Definition at line 839 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_GetByIdx_vertex()

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.

Parameters
meshpointer to the mesh structure.
c0pointer to the coordinate of the vertex along the first dimension.
c1pointer to the coordinate of the vertex along the second dimension.
refpointer to the vertex reference.
isCornerpointer to the flag saying if vertex is corner.
isRequiredpointer to the flag saying if vertex is required.
idxindex of vertex to get.
Returns
1.

Get coordinates c0, c1 and reference ref of vertex idx of mesh.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_GETBYIDX_VERTEX(mesh,c0,c1,ref,isCorner,isRequired,idx,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
REAL(KIND=8), INTENT(OUT) :: c0,c1
INTEGER :: isCorner,isRequired
INTEGER(MMG5F_INT) :: ref,idx
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 779 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Init_fileNames()

LIBMMG2D_EXPORT void MMG2D_Init_fileNames ( MMG5_pMesh  mesh,
MMG5_pSol  sol 
)

Initialize file names to their default values.

Parameters
meshpointer to the mesh structure.
solpointer to the sol structure.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_INIT_FILENAMES(mesh,sol)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
END SUBROUTINE

Definition at line 56 of file API_functions_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Init_mesh()

LIBMMG2D_EXPORT int MMG2D_Init_mesh ( const int  starter,
  ... 
)

Initialize a mesh structure and optionally the associated solution and metric structures.

Parameters
starterdummy argument used to initialize the variadic argument list
...variadic arguments.
Returns
1 on success, 0 on failure

For the MMG2D_mmgslib function, you need to call the MMG2D_Init_mesh function with the following arguments : MMG2D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppMet, &your_metric,MMG5_ARG_end).

For the MMG2D_mmgsls function, you need to call the MMG2D_Init_mesh function with the following arguments : MMG2D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppLs, &your_level_set,MMG5_ARG_end).

Here, your_mesh is a MMG5_pMesh, your_metric and your_level_set are MMG5_pSol.

Remarks
No fortran interface, to allow variadic arguments.

Definition at line 43 of file API_functions_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Init_parameters()

LIBMMG2D_EXPORT void MMG2D_Init_parameters ( MMG5_pMesh  mesh)

Initialize the input parameters (stored in the Info structure).

Parameters
meshpointer to the mesh structure.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_INIT_PARAMETERS(mesh)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
END SUBROUTINE

Definition at line 84 of file API_functions_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_loadAllSols()

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.

Parameters
meshpointer to the mesh structure.
solpointer to the solutions array
filenamename of the file to load.
Returns
0 if the file is not found, -1 if failing for another reason (insufficient memory, file format...), 1 on success.

Load 1 or more solutions in a solution file in medit file format

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_LOADALLSOLS(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Parameters
meshpointer to the mesh structure.
solpointer to an allocatable sol structure.
filenamename of file.
Returns
-1 data invalid or we fail, 0 no file, 1 ok.

Load a medit solution file containing 1 or more solutions.

Read the file header

Sol tab allocation

Definition at line 996 of file inout_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_loadGenericMesh()

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.

Parameters
meshpointer to the mesh structure.
metpointer to the metric structure or the NULL pointer.
solpointer to the level-set structure or the NULL pointer.
filenamename of the file to load.
Returns
0 if the file is not found, -1 if failing for another reason (insufficient memory, file format...), 1 on success.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_LOADGENERICMESH(mesh,met,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 597 of file inout_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_loadMesh()

LIBMMG2D_EXPORT int MMG2D_loadMesh ( MMG5_pMesh  mesh,
const char *  filename 
)

Load a mesh (in .mesh/.mesb format) from file.

Parameters
meshpointer to the mesh structure.
filenamename of the readed file.
Returns
0 if the file is not found, -1 in case of failure for another reason (insufficient memory, file format...), 1 on success.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_LOADMESH(mesh,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 28 of file inout_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_loadMshMesh()

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.

Parameters
meshpointer to the mesh structure.
solpointer to the solution structure.
filenamename of the file to load.
Returns
0 if the file is not found, -1 if failing for another reason (lack of memory, file format...), 1 on success.

This function reads a mesh and 0 or 1 data fields in MSH file format (.msh extension). We read only low-order vertices, edges, triangles, and quadrangles.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_LOADMSHMESH(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 706 of file inout_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_loadMshMesh_and_allData()

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.

Parameters
meshpointer to the mesh structure.
solpointer to a list of solution structures.
filenamename of the file to load.
Returns
0 if the file is not found, -1 if failing for another reason (lack of memory, file format...), 1 on success.

This function reads a mesh and all data fields from a file in MSH file format (.msh extension). We read only low-order vertices, edges, triangles, quadrangles, tetrahedra and prisms.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_LOADMSHMESH_AND_ALLDATA(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 772 of file inout_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_loadSol()

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.

Parameters
meshpointer to the mesh structure.
solpointer to the solution structure..
filenamename of the solution file.
Returns
0 if the file is not found, -1 if failing for another reason (insufficient memory, file format...), 1 on success.

This function loads a metric field. The file in medit format must contain 1 solution: the metric.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_LOADSOL(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Parameters
meshpointer to the mesh structure.
metpointer to the sol structure.
filenamename of file.
Returns
-1 data invalid or we fail, 0 no file, 1 ok.

Load metric field.

Read the file header

Definition at line 905 of file inout_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_loadVect()

LIBMMG2D_EXPORT int MMG2D_loadVect ( MMG5_pMesh  ,
char *   
)

◆ MMG2D_loadVtkMesh()

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.

Parameters
meshpointer to the mesh structure.
metpointer to the metric structure or the NULL pointer.
solpointer to the level-set structure or the NULL pointer.
filenamename of the file to load.
Returns
0 if the file is not found, -1 if failing for another reason (insufficient memory, file format...), 1 on success.

Read mesh and 0 or 1 data fields in VTK file format (.vtk extension). We read only low-order vertices, edges, triangles and quadrangles.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_LOADVTKMESH(mesh,met,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 165 of file inoutcpp_2d.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_loadVtkMesh_and_allData()

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.

Parameters
meshpointer to the mesh structure.
solpointer to the solution structure.
filenamename of the file to load.
Returns
0 if the file is not found, -1 if failing for another reason (insufficient memory, file format...), 1 on success.

This function reads a mesh and a list of data fields in VTK file format (.vtk extension). We read only low-order vertices, edges, triangles and quadrangles.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_LOADVTKMESH_AND_ALLDATA(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 211 of file inoutcpp_2d.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_loadVtpMesh()

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.

Parameters
meshpointer to the mesh structure.
metpointer to the metric structure or the NULL pointer.
solpointer to the level-set structure or the NULL pointer.
filenamename of the file to load.
Returns
0 if the file is not found, -1 if failing for another reason (insufficient memory, file format...), 1 on success.

Read a mesh and 0 or 1 data fields in VTK vtp file format (.vtp extension). We read only low-order vertices, edges, triangles and quadrangles.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_LOADVTPMESH(mesh,met,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 84 of file inoutcpp_2d.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_loadVtpMesh_and_allData()

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.

Parameters
meshpointer to the mesh structure.
solpointer to the solution structure.
filenamename of the file to load.
Returns
0 if the file is not found, -1 if failing for another reason (insufficient memory, file format...), 1 on success.

Read a mesh and a list of data fields in VTK vtp file format (.vtp extension). We read only low-order vertices, edges, triangles and quadrangles.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_LOADVTPMESH_AND_ALLDATA(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 130 of file inoutcpp_2d.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_loadVtuMesh()

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.

Parameters
meshpointer to the mesh structure.
metpointer to the metric structure or the NULL pointer.
solpointer to the level-set structure or the NULL pointer.
filenamename of the file to load.
Returns
0 if the file is not found, -1 if failing for another reason (insufficient memory, file format...), 1 on success.

Read a mesh and 0 or 1 data fields in VTK vtu file format (.vtu extension). We read only low-order vertices, edges, triangles and quadrangles.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_LOADVTUMESH(mesh,met,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 246 of file inoutcpp_2d.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_loadVtuMesh_and_allData()

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.

Parameters
meshpointer to the mesh structure.
solpointer to the solution structure.
filenamename of the file to load.
Returns
0 if the file is not found, -1 if failing for another reason (insufficient memory, file format...), 1 on success.

Read a mesh and a list of data fields in VTK vtu file format (.vtu extension). We read only low-order vertices, edges, triangles and quadrangles.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_LOADVTUMESH_AND_ALLDATA(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 292 of file inoutcpp_2d.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_mmg2dlib()

LIBMMG2D_EXPORT int MMG2D_mmg2dlib ( MMG5_pMesh  mesh,
MMG5_pSol  sol 
)

Main "program" for the mesh adaptation library.

Parameters
meshpointer to the mesh structure.
solpointer to a sol structure (metric).
Returns
MMG5_SUCCESS if successful, MMG5_LOWFAILURE in case there is a failure but a conform mesh is returned and MMG5_STRONGFAILURE if there is a failure and we can't save the mesh.

This function adapts a given mesh, trying to improve the quality, under the given metric and parameters.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_MMG2DLIB(mesh,sol,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 63 of file libmmg2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_mmg2dls()

LIBMMG2D_EXPORT int MMG2D_mmg2dls ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
MMG5_pSol  met 
)

Main "program" for the level-set discretization library.

Parameters
meshpointer to the mesh structure.
solpointer to a sol structure (level-set function).
metpointer to a sol structure (metric).
Returns
MMG5_SUCCESS if successful, MMG5_LOWFAILURE if there is a failure but a conform mesh is saved and MMG5_STRONGFAILURE if there is a failure and we can't save the mesh.

This is the main program for the level-set discretization library. If a metric met is provided, it is used to adapt the mesh.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_MMG2DLS(mesh,sol,met,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
MMG5_DATA_PTR_T :: met
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 524 of file libmmg2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_mmg2dmesh()

LIBMMG2D_EXPORT int MMG2D_mmg2dmesh ( MMG5_pMesh  mesh,
MMG5_pSol  sol 
)

Main "program" for the mesh generation library.

Parameters
meshpointer to the mesh structure.
solpointer to a sol structure (metric).
Returns
MMG5_SUCCESS if successful, MMG5_LOWFAILURE if there is a failure but a conform mesh is returned and MMG5_STRONGFAILURE if there is a failure and we can't save the mesh.

FIXME: This function creates a triangular mesh from a given polygon, right?

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_MMG2DMESH(mesh,sol,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 305 of file libmmg2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_mmg2dmov()

LIBMMG2D_EXPORT int MMG2D_mmg2dmov ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_pSol  disp 
)

Main "program" for the rigid-body movement library.

Parameters
meshpointer to the mesh structure.
solpointer to a sol structure (displacement).
disppointer to a sol (displacement for the lagrangian motion mode) structure.
Returns
MMG5_SUCCESS if success, MMG5_LOWFAILURE if there is a failure but a conform mesh is saved and MMG5_STRONGFAILURE if there is a failure and we can't save the mesh.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_MMG2DMOV(mesh,sol,disp,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol,disp
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 820 of file libmmg2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_parsar()

LIBMMG2D_EXPORT int MMG2D_parsar ( int  argc,
char *  argv[],
MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_pSol  sol 
)

Store command line arguments.

Parameters
argcnumber of command line arguments.
argvcommand line arguments.
meshpointer to the mesh structure.
metpointer to a metric
solpointer to a level-set or displacement function
Returns
1 if we want to run Mmg after, 0 if not or in case of failure
Remarks
no matching fortran function.

check file names

Definition at line 102 of file libmmg2d_tools.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_parsop()

LIBMMG2D_EXPORT int MMG2D_parsop ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)

Read a file containing Local parameters (.mmg2d extension)

Parameters
meshpointer to the mesh structure.
metpointer to the sol structure.
Returns
1.

This function reads a local parameters file. This file must have the same name as the mesh with the .mmg2d extension or must be named DEFAULT.mmg2d.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_PARSOP(mesh,met,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Parameters
meshpointer to the mesh
metpointer to the metric
Returns
1 if success, 0 if fail

Read parameter file DEFAULT.mmg2d

Definition at line 548 of file libmmg2d_tools.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Reset_verticestags()

LIBMMG2D_EXPORT void MMG2D_Reset_verticestags ( MMG5_pMesh  mesh)

Reset the vertex tags.

Parameters
meshpointer to the mesh structure

This function resets the tags of all vertices. Be careful: all the tags are deleted.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_RESET_VERTICESTAGS(mesh)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
END SUBROUTINE

Definition at line 1029 of file libmmg2d_tools.c.

Here is the caller graph for this function:

◆ MMG2D_saveAllSols()

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.

Parameters
meshpointer to the mesh structure.
solpointer to the solutions array
filenamename of the solution file.
Returns
0 or -1 on failure, 1 otherwise.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SAVEALLSOLS(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Parameters
meshpointer to the mesh structure.
solpointer to the solutions array.
filenamename of file.
Returns
0 if failed, 1 otherwise.

Write 1 or more solutions.

Definition at line 1678 of file inout_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_saveGenericMesh()

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.

Parameters
meshpointer to the mesh structure.
filenamename of the file to write
Returns
0 on failure, 1 otherwise.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SAVEGENERICMESH(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 2235 of file inout_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_saveMesh()

LIBMMG2D_EXPORT int MMG2D_saveMesh ( MMG5_pMesh  mesh,
const char *  filename 
)

Save a mesh in .mesh/.meshb format.

Parameters
meshpointer to the mesh structure.
filenamename of the readed file.
Returns
0 or -1 on failure, 1 otherwise.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SAVEMESH(mesh,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1101 of file inout_2d.c.

Here is the caller graph for this function:

◆ MMG2D_saveMshMesh()

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 extension.

Parameters
meshpointer to the mesh structure.
solpointer to the solution structure.
filenamename of the file to write.
Returns
0 on failure, 1 otherwise.

This function writes a mesh and optionally one data field in MSH file format (.msh extension). It uses ASCII format for .msh extension, binary format for .msb extension.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SAVEMSHMESH(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1536 of file inout_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_saveMshMesh_and_allData()

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 extension.

Parameters
meshpointer to the mesh structure.
solpointer to the solution structure.
filenamename of the file to write.
Returns
0 on failure, 1 otherwise.

This function writes a mesh and a list of data fields in MSH file format (.msh extension). It uses ASCII format for .msh extension, binary format for .mshb extension.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SAVEMSHMESH_AND_ALLDATA(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1540 of file inout_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_saveSol()

LIBMMG2D_EXPORT int MMG2D_saveSol ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
const char *  filename 
)

Save metric field in medit solution file format.

Parameters
meshpointer to the mesh structure.
solpointer to the solution structure.
filenamename of the solution file to write.
Returns
0 or -1 on failure, 1 otherwise.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SAVESOL(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Parameters
meshpointer to the mesh structure.
metpointer to the sol structure.
filenamename of file.
Returns
0 if failed, 1 otherwise.

Write isotropic or anisotropic metric.

Definition at line 1617 of file inout_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_saveTetgenMesh()

LIBMMG2D_EXPORT int MMG2D_saveTetgenMesh ( MMG5_pMesh  mesh,
const char *  filename 
)

Save data in Tetgen's Triangle format.

Parameters
meshpointer to the mesh structure.
filenamename of the file to write
Returns
0 or -1 on failure, 1 otherwise.

This function saves mesh data in Triangle (or equivalent to Tetgen in 2D) file format.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SAVETETGENMESH(mesh,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 2214 of file inout_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_saveVect()

LIBMMG2D_EXPORT int MMG2D_saveVect ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
const char *  filename,
double  lambda 
)

◆ MMG2D_saveVtkMesh()

LIBMMG2D_EXPORT int MMG2D_saveVtkMesh ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
const char *  filename 
)

Save a mesh and optionally one solution in VTK format.

Parameters
meshpointer to the mesh structure.
solpointer to the solution structure.
filenamename of the file to write.
Returns
0 on failure, 1 otherwise.

This function writes a mesh and 0 or 1 data fields in Vtk file format (.vtk extension).

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SAVEVTKMESH(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 369 of file inoutcpp_2d.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_saveVtkMesh_and_allData()

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.

Parameters
meshpointer to the mesh structure.
solpointer to the solution structure.
filenamename of the file to write.
Returns
0 on failure, 1 otherwise.

This function writes a mesh and a list of data fields in Vtk file format (.vtk extension).

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SAVEVTKMESH_AND_ALLDATA(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 384 of file inoutcpp_2d.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_saveVtpMesh()

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.

Parameters
meshpointer to the mesh structure.
solpointer to the solution structure.
filenamename of the file to write.
Returns
0 on failure, 1 otherwise.

This function writes a mesh and optionally one data field in polydata Vtk file format (.vtp extension).

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SAVEVTPMESH(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 404 of file inoutcpp_2d.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_saveVtpMesh_and_allData()

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.

Parameters
meshpointer to the mesh structure.
solpointer to the solution structure.
filenamename of the file to write.
Returns
0 on failure, 1 otherwise.

This function writes a mesh and a list of data fields in polydata Vtk file format (.vtp extension).

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SAVEVTPMESH_AND_ALLDATA(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 420 of file inoutcpp_2d.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_saveVtuMesh()

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.

Parameters
meshpointer to the mesh structure.
solpointer to the solution structure.
filenamename of the file to write.
Returns
0 on failure, 1 otherwise.

This function writes a mesh and 0 or 1 data fields in vtu Vtk file format (.vtu extension).

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SAVEVTUMESH(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 334 of file inoutcpp_2d.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_saveVtuMesh_and_allData()

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.

Parameters
meshpointer to the mesh structure.
solpointer to the solution structure.
filenamename of the file to write.
Returns
0 on failure, 1 otherwise.

This function writes a mesh and a list of data fields in vtu Vtk file format (.vtu extension).

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SAVEVTUMESH_AND_ALLDATA(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 349 of file inoutcpp_2d.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_scaleMesh()

LIBMMG2D_EXPORT int MMG2D_scaleMesh ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_pSol  ls 
)

Normalize the mesh and size information.

Parameters
meshpointer to the mesh structure.
metpointer to the metric structure.
lspointer to a solution structure (level-set or displacement).
Returns
1 on success, 0 in case of failure (computed bounding box too small or one af the anisotropic input metric is not valid).

This function scales the mesh and the size information between 0 and 1. Compute a default value for the hmin/hmax parameters if needed.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SCALEMESH(mesh,met,ls,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met,ls
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

◆ MMG2D_Set_commonFunc()

LIBMMG2D_EXPORT void MMG2D_Set_commonFunc ( void  )

Set common function pointers between mmgs and mmg2d to the matching mmg2d functions.

Set common pointer functions between mmgs and mmg2d to the matching mmg2d functions.

Definition at line 52 of file libmmg2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Set_constantSize()

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.

Parameters
meshpointer to the mesh structure
metpointer to the sol structure
Returns
1 on success

This function computes a constant size map according to mesh->info.hsiz, mesh->info.hmin and mesh->info.hmax. It updates these 3 values if not compatible.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_CONSTANTSIZE(mesh,met,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 997 of file libmmg2d_tools.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Set_corner()

LIBMMG2D_EXPORT int MMG2D_Set_corner ( MMG5_pMesh  mesh,
MMG5_int  k 
)

Assign the "corner" attribute to a vertex.

Parameters
meshpointer to the mesh structure.
kvertex index.
Returns
1.

Set the "corner" attribute at vertex k. This affects how the vertex is treated during remeshing.

Remarks
Fortran interface

‍ SUBROUTINE MMG2D_SET_CORNER(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(IN):: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 727 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Set_dparameter()

LIBMMG2D_EXPORT int MMG2D_Set_dparameter ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
int  dparam,
double  val 
)

Set double parameter dparam to value val.

Parameters
meshpointer to the mesh structure.
solpointer to the sol structure.
dparamdouble parameter to set (see MMG2D_Param structure).
valvalue of the parameter.
Returns
0 on failure, 1 otherwise.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_DPARAMETER(mesh,sol,dparam,val,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
MMG5_DATA_PTR_T :: sol
INTEGER, INTENT(IN) :: dparam
REAL(KIND=8), INTENT(IN) :: val
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 283 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Set_edge()

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.

Parameters
meshpointer to the mesh structure.
v0first vertex of edge.
v1second vertex of edge.
refedge reference.
posedge position in the mesh.
Returns
0 on failure, 1 otherwise.

Define an edge with vertices v0, v1 and reference ref at position pos in the mesh structure (pos from 1 to the number of edges included).

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_EDGE(mesh,v0,v1,ref,pos,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(IN):: v0,v1
INTEGER(MMG5F_INT), INTENT(IN):: pos,ref
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1240 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Set_edges()

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.

Parameters
meshpointer to the mesh structure.
edgespointer to the array of edges. Vertices of the \(i^{th}\) edge are stored in edge[(i-1)*2]@2.
refsedges references. refs[i-1] is the ref of the \(i^{th}\) edge.
Returns
0 on failure, 1 otherwise.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_EDGES(mesh,edges,refs,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(IN):: edges(*),refs(*)
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1369 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Set_inputMeshName()

LIBMMG2D_EXPORT int MMG2D_Set_inputMeshName ( MMG5_pMesh  mesh,
const char *  meshin 
)

Set the name of the input mesh.

Parameters
meshpointer to the mesh structure.
meshininput mesh name.
Returns
1.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_INPUTMESHNAME(mesh,meshin,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
CHARACTER(LEN=*), INTENT(IN) :: meshin
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 62 of file API_functions_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Set_inputParamName()

LIBMMG2D_EXPORT int MMG2D_Set_inputParamName ( MMG5_pMesh  mesh,
const char *  fparamin 
)

Set the name of the input parameter file.

Parameters
meshpointer to the mesh structure.
fparaminname of the input parameter file.
Returns
1.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_INPUTPARAMNAME(mesh,fparamin,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
CHARACTER(LEN=*), INTENT(IN) :: fparamin
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 71 of file API_functions_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Set_inputSolName()

LIBMMG2D_EXPORT int MMG2D_Set_inputSolName ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
const char *  solin 
)

Set the name of the input solution file.

Parameters
meshpointer to the mesh structure.
solpointer to the sol structure.
solinname of the input solution file.
Returns
1.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_INPUTSOLNAME(mesh,sol,solin,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: solin
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 67 of file API_functions_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Set_iparameter()

LIBMMG2D_EXPORT int MMG2D_Set_iparameter ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
int  iparam,
MMG5_int  val 
)

Set integer parameter iparam to value val.

Parameters
meshpointer to the mesh structure.
solpointer to the sol structure (unused).
iparaminteger parameter to set (see MMG2D_Param structure).
valvalue for the parameter.
Returns
0 on failure, 1 otherwise.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_IPARAMETER(mesh,sol,iparam,val,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
MMG5_DATA_PTR_T :: sol
INTEGER, INTENT(IN) :: iparam
INTEGER(MMG5F_INT), INTENT(IN):: val
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 112 of file API_functions_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Set_ithSol_inSolsAtVertices()

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.

Parameters
solpointer to the array of solutions
iposition of the solution field that we want to set.
ssolution(s) at mesh vertex pos.
posindex of the vertex on which we set the solution.
Returns
0 on failure, 1 otherwise.

Set values of the solution at the ith field of the solution array. (pos from 1 to nb_vertices included and i from 1 to nb_sols).

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_ITHSOL_INSOLSATVERTICES(sol,i,s,pos,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: sol
INTEGER, INTENT(IN) :: i
INTEGER(MMG5F_INT), INTENT(IN) :: pos
REAL(KIND=8), DIMENSION(*),INTENT(OUT) :: s
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1803 of file API_functions_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Set_ithSols_inSolsAtVertices()

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.

Parameters
solpointer to the array of solutions
iposition of the solution field that we want to set.
sarray of solutions at mesh vertices. The solution at vertex k is given by s[k-1] for a scalar sol, s[2*(k-1)]@2 for a vectorial solution and s[3*(k-1)]@3 for a tensor solution.
Returns
0 on failure, 1 otherwise.

Set scalar values of the solution at the ith field of the solution array. (i from 1 to nb_sols)

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_ITHSOLS_INSOLSATVERTICES(sol,i,s,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: sol
INTEGER, INTENT(IN) :: i
REAL(KIND=8), DIMENSION(*),INTENT(OUT) :: s
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1747 of file API_functions_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Set_localParameter()

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.

Parameters
meshpointer to the mesh structure.
solpointer to the sol structure.
typtype of entity (triangle, edge,...).
refreference of the entity.
hminminimal edge size.
hmaxmaximal edge size.
hausdvalue of the Hausdorff number.
Returns
0 on failure, 1 otherwise.

Set local parameters: set the Hausdorff distance, minimal desired edge length, and maximal desired edge length for all entities of type typ and reference ref.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_LOCALPARAMETER(mesh,sol,typ,ref,&
hmin,hmax,hausd,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
INTEGER, INTENT(IN) :: typ
INTEGER(MMG5F_INT), INTENT(IN):: ref
REAL(KIND=8), INTENT(IN) :: hmin,hmax,hausd
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 380 of file API_functions_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Set_lsBaseReference()

LIBMMG2D_EXPORT int MMG2D_Set_lsBaseReference ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
MMG5_int  br 
)

Set level-set base reference.

Parameters
meshpointer to the mesh structure.
solpointer to the sol structure.
brnew level-set base reference.
Returns
0 on failure, 1 otherwise.

Set a new level-set base reference of ref br in ls discretization mode. Based references are boundary conditions to which implicit domain can be attached. All implicit volumes that are not attached to listed base references are deleted as spurious volumes by the rmc option.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_LSBASEREFERENCE(mesh,sol,br,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
INTEGER(MMG5F_INT), INTENT(IN):: br
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 473 of file API_functions_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Set_meshSize()

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.

Parameters
meshpointer to the mesh structure.
npnumber of vertices.
ntnumber of triangles.
nquadnumber of quads.
nanumber of edges.
Returns
0 on failure, 1 otherwise.

Set the number of vertices, triangles, quadrangles and edges of the mesh and allocate the associated tables. If call twice, reset the whole mesh to realloc it at the new size

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_MESHSIZE(mesh,np,nt,nquad,na,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT) :: np,nt,nquad,na
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 478 of file API_functions_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Set_multiMat()

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.

Parameters
meshpointer to the mesh structure.
solpointer to the sol structure.
refinput tetra reference.
splitMMG5_MMAT_NoSplit if the entity must not be split, MMG5_MMAT_Split otherwise
rminreference for the negative side after LS discretization
rplusreference for the positive side after LS discretization
Returns
0 on failure, 1 otherwise.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_MULTIMAT(mesh,sol,ref,split,rmin,rplus,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
INTEGER(MMG5F_INT), INTENT(IN):: ref,rmin,rplus
INTEGER, INTENT(IN) :: split
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

With this function you can determine which references will be given to the triangles on both sides of the level set, after discretization. Negative and positive here refer to areas where the function is smaller or larger, respectively, than the isovalue of the level set.

Definition at line 468 of file API_functions_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Set_outputMeshName()

LIBMMG2D_EXPORT int MMG2D_Set_outputMeshName ( MMG5_pMesh  mesh,
const char *  meshout 
)

Set the name of the output mesh file.

Parameters
meshpointer to the mesh structure.
meshoutname of the output mesh file.
Returns
1.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_OUTPUTMESHNAME(mesh,meshout,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
CHARACTER(LEN=*), INTENT(IN) :: meshout
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 75 of file API_functions_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Set_outputSolName()

LIBMMG2D_EXPORT int MMG2D_Set_outputSolName ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
const char *  solout 
)

Set the name of the output solution file.

Parameters
meshpointer to the mesh structure.
solpointer to the sol structure.
soloutname of the output solution file.
Returns
0 on failure, 1 otherwise.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_OUTPUTSOLNAME(mesh,sol,solout,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: solout
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 80 of file API_functions_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Set_parallelEdge()

LIBMMG2D_EXPORT int MMG2D_Set_parallelEdge ( MMG5_pMesh  mesh,
MMG5_int  k 
)

Give edge k the "parallel" attribute.

Parameters
meshpointer to the mesh structure.
kedge index.
Returns
1.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_PARALLELEDGE(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(IN):: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1295 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Set_quadrilateral()

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.

Parameters
meshpointer to the mesh structure.
v0first vertex of quadrangle.
v1second vertex of quadrangle.
v2third vertex of quadrangle.
v3fourth vertex of quadrangle.
refquadrangle reference.
posquadrangle position in the mesh.
Returns
0 on failure, 1 otherwise.

Define a quadrangle with vertices v0, v1,v2,v3 and reference ref at position pos in mesh structure (from 1 to nb_quad included).

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_QUADRILATERAL(mesh,v0,v1,v2,v3,ref,pos,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(IN):: v0,v1,v2,v3,ref,pos
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1105 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Set_quadrilaterals()

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.

Parameters
meshpointer to the mesh structure.
quadravertices of the quadrangles of the mesh Vertices of the \(i^{th}\) quadrangle are stored in quadra[(i-1)*4]@4.
refsarray of references. The reference of the \(i^{th}\) quadrangle is stored in refs[i-1].
Returns
0 on failure, 1 otherwise.
Remarks
Fortran interface: (commentated in order to allow to pass %val(0) instead of the refs array)

‍! SUBROUTINE MMG2D_SET_QUADRILATERALS(mesh,quadra,refs,retval)
! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
! INTEGER(MMG5F_INT), DIMENSION(*), INTENT(IN) :: quadra,refs
! INTEGER, INTENT(OUT) :: retval
! END SUBROUTINE

Definition at line 1185 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Set_requiredEdge()

LIBMMG2D_EXPORT int MMG2D_Set_requiredEdge ( MMG5_pMesh  mesh,
MMG5_int  k 
)

Give edge k the "required" attribute.

Parameters
meshpointer to the mesh structure.
kedge index.
Returns
1.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_REQUIREDEDGE(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(IN):: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1271 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Set_requiredTriangle()

LIBMMG2D_EXPORT int MMG2D_Set_requiredTriangle ( MMG5_pMesh  mesh,
MMG5_int  k 
)

Give triangle k the "required" attribute.

Parameters
meshpointer to the mesh structure.
ktriangle index.
Returns
1.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_REQUIREDTRIANGLE(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(IN):: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 950 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Set_requiredVertex()

LIBMMG2D_EXPORT int MMG2D_Set_requiredVertex ( MMG5_pMesh  mesh,
MMG5_int  k 
)

Assign the "required" attribute to a vertex.

Parameters
meshpointer to the mesh structure.
kvertex index.
Returns
1.

Set vertex k as required (k from 1 to the number of vertices included). This prevents the remesher from moving the vertex.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_REQUIREDVERTEX(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(IN):: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 739 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Set_scalarSol()

LIBMMG2D_EXPORT int MMG2D_Set_scalarSol ( MMG5_pSol  met,
double  s,
MMG5_int  pos 
)

Set a single value of a sol structure.

Parameters
metpointer to the sol structure.
ssolution scalar value.
posposition of the solution in the mesh.
Returns
0 on failure, 1 otherwise.

Set scalar value s at position pos in solution structure. (pos from 1 to nb_vertices included).

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_SCALARSOL(met,s,pos,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8), INTENT(IN) :: s
INTEGER(MMG5F_INT), INTENT(IN):: pos
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1443 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Set_scalarSols()

LIBMMG2D_EXPORT int MMG2D_Set_scalarSols ( MMG5_pSol  met,
double *  s 
)

Set all values of a scalar sol structure.

Parameters
metpointer to the sol structure.
sarray of scalar solutions values. s[i-1] is the solution at vertex i.
Returns
0 on failure, 1 otherwise.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_SCALARSOLS(met,s,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8),DIMENSION(*), INTENT(IN) :: s
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1504 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Set_solsAtVerticesSize()

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.

Parameters
meshpointer to the mesh structure.
solpointer to an allocatable sol structure.
nsolsnumber of solutions per entity
nentitiesnumber of entities
typSolArray of size nsol listing the type of the solutions (scalar, vectorial, ..., see MMG5_type for possible values).
Returns
0 on failure, 1 otherwise.

Initialize an array of solutions field defined at vertices: set dimension, types and number of data. To use to initialize an array of solution fields (not used by Mmg itself).

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_SOLSATVERTICESSIZE(mesh,sol,nsols,nentities,typSol,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
INTEGER, INTENT(IN) :: nsols
INTEGER(MMG5F_INT), INTENT(IN):: nentities
INTEGER, INTENT(IN) :: typSol(*)
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Sol tab allocation

Definition at line 564 of file API_functions_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Set_solSize()

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.

Parameters
meshpointer to the mesh structure.
solpointer to the sol structure.
typEntitytype of solutions entities (vertices, triangles, ..., see MMG5_entities for possible values).
npnumber of solutions.
typSoltype of solution (scalar, vectorial, ..., see MMG5_type for possible values).
Returns
0 on failure, 1 otherwise.

Initialize an array of solution field: set dimension, types and number of data. To use to initialize an array of solution fields (not used by Mmg itself).

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_SOLSIZE(mesh,sol,typEntity,np,typSol,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
INTEGER, INTENT(IN) :: typEntity
INTEGER(MMG5F_INT), INTENT(IN):: np
INTEGER, INTENT(IN) :: typSol
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 520 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Set_tensorSol()

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.

Parameters
metpointer to the sol structure.
m11value at position (1,1) in the solution tensor.
m12value at position (1,2) in the solution tensor.
m22value at position (2,2) in the solution tensor.
posposition of the solution in the mesh.
Returns
0 on failure, 1 otherwise.

Set tensor value s at position pos in solution structure (pos from 1 to nb_vertices included).

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_TENSORSOL(met,m11,m12,m22,pos,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8), INTENT(IN) :: m11,m12,m22
INTEGER(MMG5F_INT), INTENT(IN):: pos
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1640 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Set_tensorSols()

LIBMMG2D_EXPORT int MMG2D_Set_tensorSols ( MMG5_pSol  met,
double *  sols 
)

Set all elements of a tensor sol structure.

Parameters
metpointer to the sol structure.
solsarray of tensorial solutions. sols[3*(i-1)]@3 is the solution at vertex i
Returns
0 on failure, 1 otherwise.

Set tensorial values at position pos in solution structure.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_TENSORSOLS(met,sols,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8),DIMENSION(*), INTENT(IN) :: sols
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1708 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Set_triangle()

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.

Parameters
meshpointer to the mesh structure.
v0first vertex of triangle.
v1second vertex of triangle.
v2third vertex of triangle.
reftriangle reference.
postriangle position in the mesh.
Returns
0 on failure, 1 otherwise.

This function defines a triangle with vertices v0, v1, v2 and reference ref at position pos in mesh structure (from 1 to the number of triangles included).

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_TRIANGLE(mesh,v0,v1,v2,ref,pos,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(IN):: v0,v1,v2,ref,pos
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 874 of file API_functions_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Set_triangles()

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.

Parameters
meshpointer to the mesh structure.
triapointer to the array of the triangle's vertices. The vertices of the \(i^{th}\) tria are stored in tria[(i-1)*3]@3.
refspointer to the array of the triangle references. refs[i-1] is the ref of the \(i^{th}\) tria.
Returns
0 on failure, 1 otherwise.

This function sets the vertices and references of all triangles in a mesh.

Remarks
Fortran interface: (commentated in order to allow to pass %val(0) instead of the refs array)

‍! SUBROUTINE MMG2D_SET_TRIANGLES(mesh,tria,refs,retval)
! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
! INTEGER(MMG5F_INT),DIMENSION(*), INTENT(IN) :: tria,refs
! INTEGER, INTENT(OUT) :: retval
! END SUBROUTINE

Definition at line 1021 of file API_functions_2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Set_vectorSol()

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.

Parameters
metpointer to the sol structure.
vxx value of the vectorial solution.
vyy value of the vectorial solution.
posposition of the solution in the mesh (begins at 1).
Returns
0 on failure, 1 otherwise.

Set vectorial value \((v_x,v_y)\) at position pos in solution structure. ( pos from 1 to nb_vertices included).

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_VECTORSOL(met,vx,vy,pos,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8), INTENT(IN) :: vx,vy
INTEGER(MMG5F_INT), INTENT(IN):: pos
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1530 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Set_vectorSols()

LIBMMG2D_EXPORT int MMG2D_Set_vectorSols ( MMG5_pSol  met,
double *  sols 
)

Set all values in a vector sol structure.

Parameters
metpointer to the sol structure.
solsarray of vectorial solutions sols[2*(i-1)]@2 is the solution at vertex i
Returns
0 on failure, 1 otherwise.

Set vectorial solutions at mesh vertices

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_VECTORSOLS(met,sols,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8),DIMENSION(*), INTENT(IN):: sols
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1602 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Set_vertex()

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.

Parameters
meshpointer to the mesh structure.
c0coordinate of the vertex along the first dimension.
c1coordinate of the vertex along the second dimension.
refvertex reference.
posposition of the vertex in the mesh.
Returns
1 on success, 0 in case of failure

Set vertex of coordinates c0, c1 and reference ref at position pos in mesh structure (from 1 to nb_vertices included).

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SET_VERTEX(mesh,c0,c1,ref,pos,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
REAL(KIND=8), INTENT(IN) :: c0,c1
INTEGER(MMG5F_INT), INTENT(IN):: ref,pos
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 687 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Set_vertices()

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.

Parameters
meshpointer to the mesh structure.
verticesarray of vertex coordinates in the order \([x_1, y_1, x_2, \ldots, y_N]\)
refsarray of vertex references \([r_1, r_2, \ldots, r_N]\)
Returns
1.
Remarks
Fortran interface: (commentated in order to allow to pass %val(0) instead of the refs array)

‍! SUBROUTINE MMG2D_SET_VERTICES(mesh,vertices,refs,retval)
! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
! REAL(KIND=8), DIMENSION(*),INTENT(IN) :: vertices
! INTEGER(MMG5F_INT),DIMENSION(*), INTENT(IN):: refs
! INTEGER, INTENT(OUT) :: retval
! END SUBROUTINE

Definition at line 811 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_setfunc()

LIBMMG2D_EXPORT void MMG2D_setfunc ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)

Set function pointers for length, caltri... depending if case is iso or aniso.

Parameters
meshpointer to the mesh structure.
metpointer to a sol structure.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_SETFUNC(mesh,met)
MMG5_DATA_PTR_T, INTENT(IN) :: mesh,met
END SUBROUTINE

Definition at line 38 of file libmmg2d_tools.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_Unset_corner()

LIBMMG2D_EXPORT int MMG2D_Unset_corner ( MMG5_pMesh  mesh,
MMG5_int  k 
)

Remove the "corner" attribute from a vertex.

Parameters
meshpointer to the mesh structure.
kvertex index.
Returns
1.

Remove corner attribute from vertex k (from 1 to the number of vertices included).

Remarks
Fortran interface

‍ SUBROUTINE MMG2D_UNSET_CORNER(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(IN):: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 733 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Unset_requiredEdge()

LIBMMG2D_EXPORT int MMG2D_Unset_requiredEdge ( MMG5_pMesh  mesh,
MMG5_int  k 
)

Remove the "required" attribute from edge k.

Parameters
meshpointer to the mesh structure.
kedge index.
Returns
1.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_UNSET_REQUIREDEDGE(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(IN):: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1283 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Unset_requiredTriangle()

LIBMMG2D_EXPORT int MMG2D_Unset_requiredTriangle ( MMG5_pMesh  mesh,
MMG5_int  k 
)

Remove the "required" attribute from triangle k.

Parameters
meshpointer to the mesh structure.
ktriangle index.
Returns
1.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_UNSET_REQUIREDTRIANGLE(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(IN):: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 963 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_Unset_requiredVertex()

LIBMMG2D_EXPORT int MMG2D_Unset_requiredVertex ( MMG5_pMesh  mesh,
MMG5_int  k 
)

Remove the "required" attribute from a vertex.

Parameters
meshpointer to the mesh structure.
kvertex index.
Returns
1.

This function removes the "required" attribute from vertex k.

Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_UNSET_REQUIREDVERTEX(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(IN):: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 746 of file API_functions_2d.c.

Here is the caller graph for this function:

◆ MMG2D_usage()

LIBMMG2D_EXPORT int MMG2D_usage ( char *  prog)

Print help for mmg2d options.

Parameters
progpointer to the program name.
return1 on success, 0 on failure.
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_USAGE(prog,strlen0,retval)
CHARACTER(LEN=*), INTENT(IN) :: prog
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 68 of file libmmg2d_tools.c.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ MMG2D_doSol

LIBMMG2D_EXPORT int(* MMG2D_doSol) (MMG5_pMesh mesh,MMG5_pSol met) ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
extern

Compute unit tensor according to the lengths of the edges passing through a vertex.

Parameters
meshpointer to the mesh structure
metpointer to the sol structure
Returns
1 on success
Remarks
Fortran interface:

‍ SUBROUTINE MMG2D_DOSOL(mesh,met,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 9 of file mmg2dexterns.c.