Mmg
Simplicial remeshers (mesh adaptation, isovalue discretization, lagrangian movement)
Functions
API_functions_3d.c File Reference

C API functions definitions for MMG3D library. More...

#include "libmmg3d.h"
#include "libmmg3d_private.h"
#include "inlined_functions_3d_private.h"
#include "PRoctree_3d_private.h"
Include dependency graph for API_functions_3d.c:

Go to the source code of this file.

Functions

int MMG3D_Init_mesh (const int starter,...)
 Initialize a mesh structure and optionally the associated solution and metric structures.
 
void MMG3D_Init_fileNames (MMG5_pMesh mesh, MMG5_pSol sol)
 Initialize file names to their default values.
 
int MMG3D_Set_inputMeshName (MMG5_pMesh mesh, const char *meshin)
 Set the name of input mesh.
 
int MMG3D_Set_inputSolName (MMG5_pMesh mesh, MMG5_pSol sol, const char *solin)
 Set the name of input solution file.
 
int MMG3D_Set_inputParamName (MMG5_pMesh mesh, const char *fparamin)
 Set the name of the input parameter file.
 
int MMG3D_Set_outputMeshName (MMG5_pMesh mesh, const char *meshout)
 Set the name of output mesh file.
 
int MMG3D_Set_outputSolName (MMG5_pMesh mesh, MMG5_pSol sol, const char *solout)
 Set the name of the output solution file.
 
void MMG3D_Init_parameters (MMG5_pMesh mesh)
 Initialize parameters to their default values.
 
int MMG3D_Set_solSize (MMG5_pMesh mesh, MMG5_pSol sol, int typEntity, MMG5_int np, int typSol)
 Initialize a solution field.
 
int MMG3D_Set_solsAtVerticesSize (MMG5_pMesh mesh, MMG5_pSol *sol, int nsols, MMG5_int nentities, int *typSol)
 Initialize an array of solution values defined at vertices.
 
int MMG3D_setMeshSize_initData (MMG5_pMesh mesh, MMG5_int np, MMG5_int ne, MMG5_int nprism, MMG5_int nt, MMG5_int nquad, MMG5_int na)
 
int MMG3D_Set_meshSize (MMG5_pMesh mesh, MMG5_int np, MMG5_int ne, MMG5_int nprism, MMG5_int nt, MMG5_int nquad, MMG5_int na)
 Set the number of vertices, tetrahedra, prisms, triangles, quadrilaterals, and edges of a mesh.
 
int MMG3D_Get_solSize (MMG5_pMesh mesh, MMG5_pSol sol, int *typEntity, MMG5_int *np, int *typSol)
 Get the number of elements, dimension, and type of a solution structure.
 
int MMG3D_Get_solsAtVerticesSize (MMG5_pMesh mesh, MMG5_pSol *sol, int *nsols, MMG5_int *np, int *typSol)
 Get the number of elements, type, and dimensions of several solutions defined on vertices.
 
int MMG3D_Get_meshSize (MMG5_pMesh mesh, MMG5_int *np, MMG5_int *ne, MMG5_int *nprism, MMG5_int *nt, MMG5_int *nquad, MMG5_int *na)
 Get the number of vertices, tetrahedra, prisms, triangles, quadrilaterals and edges of the mesh.
 
int MMG3D_Set_vertex (MMG5_pMesh mesh, double c0, double c1, double c2, MMG5_int ref, MMG5_int pos)
 Set the coordinates of a single vertex.
 
int MMG3D_Get_vertex (MMG5_pMesh mesh, double *c0, double *c1, double *c2, MMG5_int *ref, int *isCorner, int *isRequired)
 Get the coordinates c0, c1,c2 and reference ref of the next vertex of mesh.
 
int MMG3D_GetByIdx_vertex (MMG5_pMesh mesh, double *c0, double *c1, double *c2, MMG5_int *ref, int *isCorner, int *isRequired, MMG5_int idx)
 Get the coordinates and reference of a specific vertex in the mesh.
 
int MMG3D_Set_vertices (MMG5_pMesh mesh, double *vertices, MMG5_int *refs)
 Set all vertex coordinates and references in a mesh structure.
 
int MMG3D_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.
 
int MMG3D_Set_tetrahedron (MMG5_pMesh mesh, MMG5_int v0, MMG5_int v1, MMG5_int v2, MMG5_int v3, MMG5_int ref, MMG5_int pos)
 set a single tetrahedron's vertices
 
int MMG3D_Get_tetrahedron (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 tetrahedron in the mesh.
 
int MMG3D_Set_tetrahedra (MMG5_pMesh mesh, MMG5_int *tetra, MMG5_int *refs)
 Set the vertices and references of all tetrahedra in a mesh structure.
 
int MMG3D_Get_tetrahedra (MMG5_pMesh mesh, MMG5_int *tetra, MMG5_int *refs, int *areRequired)
 Get the vertices and reference of all tetrahedra in the mesh.
 
int MMG3D_Set_prism (MMG5_pMesh mesh, MMG5_int v0, MMG5_int v1, MMG5_int v2, MMG5_int v3, MMG5_int v4, MMG5_int v5, MMG5_int ref, MMG5_int pos)
 Set the vertices and reference of a single prism in a mesh.
 
int MMG3D_Get_prism (MMG5_pMesh mesh, MMG5_int *v0, MMG5_int *v1, MMG5_int *v2, MMG5_int *v3, MMG5_int *v4, MMG5_int *v5, MMG5_int *ref, int *isRequired)
 Get the vertices and reference of the next prism in the mesh.
 
int MMG3D_Set_prisms (MMG5_pMesh mesh, MMG5_int *prisms, MMG5_int *refs)
 Set the vertices and references of all prisms in a mesh.
 
int MMG3D_Get_prisms (MMG5_pMesh mesh, MMG5_int *prisms, MMG5_int *refs, int *areRequired)
 Get the vertices and references of all prisms in the mesh.
 
int MMG3D_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.
 
int MMG3D_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.
 
int MMG3D_Set_triangles (MMG5_pMesh mesh, MMG5_int *tria, MMG5_int *refs)
 Set the vertices and references of all triangles in a mesh.
 
int MMG3D_Get_triangles (MMG5_pMesh mesh, MMG5_int *tria, MMG5_int *refs, int *areRequired)
 Get the vertices and references of all triangles in the mesh.
 
int MMG3D_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 quadrilateral in a mesh.
 
int MMG3D_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 quadrilateral of the mesh.
 
int MMG3D_Set_quadrilaterals (MMG5_pMesh mesh, MMG5_int *quads, MMG5_int *refs)
 Set the vertices and references of all quadrilaterals in a mesh.
 
int MMG3D_Get_quadrilaterals (MMG5_pMesh mesh, MMG5_int *quads, MMG5_int *refs, int *areRequired)
 Get the vertices and references of all quadrilaterals of the mesh.
 
int MMG3D_Set_edge (MMG5_pMesh mesh, MMG5_int v0, MMG5_int v1, MMG5_int ref, MMG5_int pos)
 Set the vertices and reference of a single edge in a mesh.
 
int MMG3D_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.
 
int MMG3D_Set_edges (MMG5_pMesh mesh, MMG5_int *edges, MMG5_int *refs)
 Set the vertices and references of all edges in a mesh.
 
int MMG3D_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.
 
int MMG3D_Set_corner (MMG5_pMesh mesh, MMG5_int k)
 Assign the "corner" attribute to a vertex.
 
int MMG3D_Unset_corner (MMG5_pMesh mesh, MMG5_int k)
 Remove the "corner" attribute from a vertex.
 
int MMG3D_Set_requiredVertex (MMG5_pMesh mesh, MMG5_int k)
 Assign the "required" attribute to a vertex.
 
int MMG3D_Unset_requiredVertex (MMG5_pMesh mesh, MMG5_int k)
 Remove required attribute from a vertex.
 
int MMG3D_Set_requiredTetrahedron (MMG5_pMesh mesh, MMG5_int k)
 Assign the "required" attribute to a tetrahedron.
 
int MMG3D_Unset_requiredTetrahedron (MMG5_pMesh mesh, MMG5_int k)
 Remove the "required" attribute from a tetrahedron.
 
int MMG3D_Set_requiredTetrahedra (MMG5_pMesh mesh, MMG5_int *reqIdx, MMG5_int nreq)
 Assign the "required" attribute to multiple tetrahedra.
 
int MMG3D_Unset_requiredTetrahedra (MMG5_pMesh mesh, MMG5_int *reqIdx, MMG5_int nreq)
 Remove the "required" attribute from multiple tetrahedra.
 
int MMG3D_Set_requiredTriangle (MMG5_pMesh mesh, MMG5_int k)
 Assign the "required" attribute to a single triangle.
 
int MMG3D_Unset_requiredTriangle (MMG5_pMesh mesh, MMG5_int k)
 Remove the "required" attribute from a single triangle.
 
int MMG3D_Set_requiredTriangles (MMG5_pMesh mesh, MMG5_int *reqIdx, MMG5_int nreq)
 Assign the "required" attribute to multiple triangles.
 
int MMG3D_Unset_requiredTriangles (MMG5_pMesh mesh, MMG5_int *reqIdx, MMG5_int nreq)
 Remove the "required" attribute from multiple triangles.
 
int MMG3D_Set_parallelTriangle (MMG5_pMesh mesh, MMG5_int k)
 Assign the "parallel" attribute to a single triangle.
 
int MMG3D_Unset_parallelTriangle (MMG5_pMesh mesh, MMG5_int k)
 Remove the "parallel" attribute from a single triangle.
 
int MMG3D_Set_parallelTriangles (MMG5_pMesh mesh, MMG5_int *parIdx, MMG5_int npar)
 Assign the "parallel" attribute to multiple triangles.
 
int MMG3D_Unset_parallelTriangles (MMG5_pMesh mesh, MMG5_int *parIdx, MMG5_int npar)
 Remove the "parallel" attribute from multiple triangles.
 
int MMG3D_Set_ridge (MMG5_pMesh mesh, MMG5_int k)
 Assign the "ridge" attribute to a single edge.
 
int MMG3D_Unset_ridge (MMG5_pMesh mesh, MMG5_int k)
 Remove the "ridge" attribute from a single edge.
 
int MMG3D_Set_requiredEdge (MMG5_pMesh mesh, MMG5_int k)
 Assign the "required" attribute to a single edge.
 
int MMG3D_Unset_requiredEdge (MMG5_pMesh mesh, MMG5_int k)
 Remove the "required" attribute from a single edge.
 
int MMG3D_Set_normalAtVertex (MMG5_pMesh mesh, MMG5_int k, double n0, double n1, double n2)
 Set the normal orientation at a single vertex.
 
int MMG3D_Get_normalAtVertex (MMG5_pMesh mesh, MMG5_int k, double *n0, double *n1, double *n2)
 Get the normal orientation at a single mesh vertex.
 
double MMG3D_Get_tetrahedronQuality (MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k)
 Get the quality measure of a single tetrahedron in the mesh.
 
int MMG3D_Set_scalarSol (MMG5_pSol met, double s, MMG5_int pos)
 Set a single element of a scalar solution structure.
 
int MMG3D_Get_scalarSol (MMG5_pSol met, double *s)
 Get the next element of a scalar solution structure defined at vertices.
 
int MMG3D_Set_scalarSols (MMG5_pSol met, double *s)
 Set the values of all elements of a scalar solution structure.
 
int MMG3D_Get_scalarSols (MMG5_pSol met, double *s)
 Get all elements of a scalar solution structure defined at vertices.
 
int MMG3D_Set_vectorSol (MMG5_pSol met, double vx, double vy, double vz, MMG5_int pos)
 Set a single element of a vector solution structure.
 
int MMG3D_Get_vectorSol (MMG5_pSol met, double *vx, double *vy, double *vz)
 Get the next element of a vector solution structure.
 
int MMG3D_Set_vectorSols (MMG5_pSol met, double *sols)
 Set all elements of a vector solution structure.
 
int MMG3D_Get_vectorSols (MMG5_pSol met, double *sols)
 Get all elements of a vector solution structure.
 
int MMG3D_Set_tensorSol (MMG5_pSol met, double m11, double m12, double m13, double m22, double m23, double m33, MMG5_int pos)
 Set a single element of a tensor solution structure.
 
int MMG3D_Get_tensorSol (MMG5_pSol met, double *m11, double *m12, double *m13, double *m22, double *m23, double *m33)
 Get the next element of a tensor solution structure.
 
int MMG3D_Set_tensorSols (MMG5_pSol met, double *sols)
 Set all elements of a tensor solution structure.
 
int MMG3D_Get_tensorSols (MMG5_pSol met, double *sols)
 Get all elements of a tensor solution field.
 
int MMG3D_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.
 
int MMG3D_Get_ithSol_inSolsAtVertices (MMG5_pSol sol, int i, double *s, MMG5_int pos)
 Get one out of several solutions at a specific vertex.
 
int MMG3D_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.
 
int MMG3D_Get_ithSols_inSolsAtVertices (MMG5_pSol sol, int i, double *s)
 Get one out of several solutions at all vertices in the mesh.
 
void MMG3D_Set_handGivenMesh (MMG5_pMesh mesh)
 Finish providing mesh data without using the API functions.
 
int MMG3D_Chk_meshData (MMG5_pMesh mesh, MMG5_pSol met)
 Check if the number of given entities match with mesh and sol size.
 
static int MMG3D_skipIso (MMG5_pMesh mesh)
 
int MMG3D_Add_tetrahedron (MMG5_pMesh mesh, MMG5_int v0, MMG5_int v1, MMG5_int v2, MMG5_int v3, MMG5_int ref)
 Add a tetrahedron to the mesh.
 
MMG5_int MMG3D_Add_vertex (MMG5_pMesh mesh, double c0, double c1, double c2, MMG5_int ref)
 Add a vertex to the mesh.
 
int MMG3D_Set_iparameter (MMG5_pMesh mesh, MMG5_pSol sol, int iparam, MMG5_int val)
 set an integer parameter of the remesher
 
int MMG3D_Get_iparameter (MMG5_pMesh mesh, MMG5_int iparam)
 Get the value of an integer parameter of the remesher.
 
int MMG3D_Set_dparameter (MMG5_pMesh mesh, MMG5_pSol sol, int dparam, double val)
 set a real-valued parameter of the remesher
 
int MMG3D_Set_localParameter (MMG5_pMesh mesh, MMG5_pSol sol, int typ, MMG5_int ref, double hmin, double hmax, double hausd)
 set a local parameter
 
int MMG3D_Set_multiMat (MMG5_pMesh mesh, MMG5_pSol sol, MMG5_int ref, int split, MMG5_int rmin, MMG5_int rplus)
 Set the reference mapping for the elements of reference ref in level-set discretization mode.
 
int MMG3D_Set_lsBaseReference (MMG5_pMesh mesh, MMG5_pSol sol, MMG5_int br)
 Set a new level-set base reference.
 
int MMG3D_Free_allSols (MMG5_pMesh mesh, MMG5_pSol *sol)
 Deallocate an array of solution fields.
 
int MMG3D_Free_all (const int starter,...)
 Deallocations before return.
 
int MMG3D_Free_structures (const int starter,...)
 Structure deallocations before return.
 
int MMG3D_Free_names (const int starter,...)
 Structure deallocations before return.
 

Detailed Description

C API functions definitions for MMG3D library.

Author
Algiane Froehly (Inria/UBordeaux)
Version
5
Date
01 2014
Warning
Use the MMG3D_ prefix: MMG5_ prefix will became obsolete soon...
Note
This file contains some internal functions for the API, see the mmg3d/libmmg3d.h header file for the documentation of all the usefull user's API functions.

C API for MMG3D library.

Definition in file API_functions_3d.c.

Function Documentation

◆ MMG3D_Add_tetrahedron()

int MMG3D_Add_tetrahedron ( MMG5_pMesh  mesh,
MMG5_int  v0,
MMG5_int  v1,
MMG5_int  v2,
MMG5_int  v3,
MMG5_int  ref 
)

Add a tetrahedron to the mesh.

Parameters
meshpointer to the mesh structure.
v0first vertex of tetrahedron.
v1second vertex of tetrahedron.
v2third vertex of tetrahedron.
v3fourth vertex of tetrahedron.
reftetrahedron reference.

This function adds a tetrahedron with vertices v0, v1, v2, v3 and reference ref at the first available position of the mesh.

Returns
0 if unable to create the tetrahedron, the unit-offset index of the new tet if it has strictly positive volume, a negative index if it has a zero or negative volume.
Remarks
Fortran interface:

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

Definition at line 2007 of file API_functions_3d.c.

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

◆ MMG3D_Add_vertex()

MMG5_int MMG3D_Add_vertex ( MMG5_pMesh  mesh,
double  c0,
double  c1,
double  c2,
MMG5_int  ref 
)

Add a vertex to the mesh.

Parameters
meshpointer to the mesh structure.
c0x coor of the new vertex
c1y coor of the new vertex
c2z coor of the new vertex
refvertex reference.
Returns
0 if unable to create the vertex, the index of the new vertex otherwise.

This function adds a vertex with coordinates c0 c1 c2 and reference ref at the first available position of the mesh.

Remarks
Fortran interface:

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

Definition at line 2081 of file API_functions_3d.c.

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

◆ MMG3D_Chk_meshData()

int MMG3D_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 if failed, 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 MMG3D_CHK_MESHDATA(mesh,met,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,met
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1883 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Free_all()

int MMG3D_Free_all ( const int  starter,
  ... 
)

Deallocations before return.

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

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

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

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

Returns
1 if success, 0 if fail
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 2547 of file API_functions_3d.c.

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

◆ MMG3D_Free_allSols()

int MMG3D_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 MMG3D_Free_allSols(mesh,sol,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 2542 of file API_functions_3d.c.

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

◆ MMG3D_Free_names()

int MMG3D_Free_names ( const int  starter,
  ... 
)

Structure deallocations before return.

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

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

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

For the MMG3D_mmg3dmov function, you must call : MMG3D_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 if fail, 1 if 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.

Definition at line 2575 of file API_functions_3d.c.

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

◆ MMG3D_Free_structures()

int MMG3D_Free_structures ( const int  starter,
  ... 
)

Structure deallocations before return.

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

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

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

For the MMG3D_mmg3dmov function, you must call : MMG3D_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 if fail, 1 if 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 2561 of file API_functions_3d.c.

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

◆ MMG3D_Get_edge()

int MMG3D_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 if failed, 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 MMG3D_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 1130 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_edges()

int MMG3D_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. The vertices of the \(i^{th}\) edge are stored in edges[(i-1)*2] and edges[(i-1)*2+1].
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 if failed, 1 otherwise.
Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_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 1193 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_iparameter()

int MMG3D_Get_iparameter ( MMG5_pMesh  mesh,
MMG5_int  iparam 
)

Get the value of an integer parameter of the remesher.

Parameters
meshpointer to the mesh structure.
iparaminteger parameter to get (see MMG3D_Param for a list of parameters that can be set).
Returns
The value of integer parameter.

Get the value of integer parameter iparam.

Remarks
Fortran interface:

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

Definition at line 2297 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_ithSol_inSolsAtVertices()

int MMG3D_Get_ithSol_inSolsAtVertices ( MMG5_pSol  sol,
int  i,
double *  s,
MMG5_int  pos 
)

Get one out of several solutions at a specific vertex.

Parameters
solpointer to the array of solutions
iposition of the solution field that we want to get.
ssolution(s) at mesh vertex pos. The required size of this array depends on the type of solution.
posindex of the vertex on which we get the solution.
Returns
0 if failed, 1 otherwise.

Get values of the ith field of the solution array at vertex pos. (pos from 1 to nb_vertices included and i from 1 to nb_sols). The type of solution is inferred from sol.

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_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 1781 of file API_functions_3d.c.

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

◆ MMG3D_Get_ithSols_inSolsAtVertices()

int MMG3D_Get_ithSols_inSolsAtVertices ( MMG5_pSol  sol,
int  i,
double *  s 
)

Get one out of several 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 the solutions at mesh vertices. The solution at vertex k is given by s[k-1] for a scalar sol, s[3*(k-1)]@3 for a vectorial solution and s[6*(k-1)]@6 for a tensor solution.
Returns
0 if failed, 1 otherwise.

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

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_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 1839 of file API_functions_3d.c.

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

◆ MMG3D_Get_meshSize()

int MMG3D_Get_meshSize ( MMG5_pMesh  mesh,
MMG5_int *  np,
MMG5_int *  ne,
MMG5_int *  nprism,
MMG5_int *  nt,
MMG5_int *  nquad,
MMG5_int *  na 
)

Get the number of vertices, tetrahedra, prisms, triangles, quadrilaterals and edges of the mesh.

recover data

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

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

Definition at line 343 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_normalAtVertex()

int MMG3D_Get_normalAtVertex ( MMG5_pMesh  mesh,
MMG5_int  k,
double *  n0,
double *  n1,
double *  n2 
)

Get the normal orientation at a single mesh vertex.

Parameters
meshpointer to the mesh structure.
kvertex index
n0x componant of the normal at vertex k.
n1y componant of the normal at vertex k.
n2z componant of the normal at vertex k.
Returns
1 if success.

This function retrieves the normal (n0,n1,n2) at vertex k.

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_GET_NORMALATVERTEX(mesh,k,n0,n1,n2,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(IN):: k
REAL(KIND=8) :: n0,n1,n2
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1392 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_prism()

int MMG3D_Get_prism ( MMG5_pMesh  mesh,
MMG5_int *  v0,
MMG5_int *  v1,
MMG5_int *  v2,
MMG5_int *  v3,
MMG5_int *  v4,
MMG5_int *  v5,
MMG5_int *  ref,
int *  isRequired 
)

Get the vertices and reference of the next prism in the mesh.

Parameters
meshpointer to the mesh structure.
v0pointer to the first vertex of prism.
v1pointer to the second vertex of prism.
v2pointer to the third vertex of prism.
v3pointer to the fourth vertex of prism.
v4pointer to the fifth vertex of prism.
v5pointer to the sixth vertex of prism.
refpointer to the prism reference.
isRequiredpointer to the flag saying if prism is required.
Returns
0 if failed, 1 otherwise.

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

Remarks
Fortran interface:

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

Definition at line 757 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_prisms()

int MMG3D_Get_prisms ( MMG5_pMesh  mesh,
MMG5_int *  prisms,
MMG5_int *  refs,
int *  areRequired 
)

Get the vertices and references of all prisms in the mesh.

Parameters
meshpointer to the mesh structure.
prismspointer to the array where the vertices are to be stored Vertices of the \(i^{th}\) prism are stored in prisms[(i-1)*6] to prisms[(i-1)*6+5].
refspointer to the array of the prism references. The reference of the \(i^{th}\) prism is stored in refs[i-1].
areRequiredpointer to the array of the flags saying if the prisms are required. areRequired[i-1]=1 if the \(i^{th}\) prism is required.
Returns
0 if failed, 1 otherwise.
Remarks
Fortran interface: (commentated in order to allow to pass %val(0) instead of the refs, areCorners or areRequired arrays)

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

Definition at line 833 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_quadrilateral()

int MMG3D_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 quadrilateral of the mesh.

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

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

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_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,ref
INTEGER :: isRequired
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1009 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_quadrilaterals()

int MMG3D_Get_quadrilaterals ( MMG5_pMesh  mesh,
MMG5_int *  quads,
MMG5_int *  refs,
int *  areRequired 
)

Get the vertices and references of all quadrilaterals of the mesh.

Parameters
meshpointer to the mesh structure.
quadspointer to the array where the vertices will be stored. Vertices of the \(i^{th}\) quadrilateral are stored in quads[(i-1)*4] to quads[(i-1)*4+3].
refspointer to the array of the quadrilaterals references. refs[i-1] is the ref of the \(i^{th}\) quadrilateral.
areRequiredpointer to array of the flags saying if quadrilaterals are required. areRequired[i-1]=1 if the \(i^{th}\) quadrilateral is required.
Returns
0 if failed, 1 otherwise.
Remarks
Fortran interface: (Commentated in order to allow to pass %val(0) instead of the refs or areRequired arrays)

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

Definition at line 1072 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_scalarSol()

int MMG3D_Get_scalarSol ( MMG5_pSol  met,
double *  s 
)

Get the next element of a scalar solution structure defined at vertices.

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

This function retrieves the solution s of the next vertex of mesh. It is meant to be called in a loop over all vertices. When it has been called as many times as there are vertices in the mesh, the internal loop counter will be reset.

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_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 1468 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_scalarSols()

int MMG3D_Get_scalarSols ( MMG5_pSol  met,
double *  s 
)

Get all elements of a scalar solution structure defined at vertices.

Parameters
metpointer to the sol structure.
sarray of the scalar solutions at mesh vertices. The solution at vertex i will be stored in s[i-1].
Returns
0 if failed, 1 otherwise.
Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_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 1515 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_solsAtVerticesSize()

int MMG3D_Get_solsAtVerticesSize ( MMG5_pMesh  mesh,
MMG5_pSol sol,
int *  nsols,
MMG5_int *  nentities,
int *  typSol 
)

Get the number of elements, type, and dimensions of several solutions defined on vertices.

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

‍ SUBROUTINE MMG3D_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 314 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_solSize()

int MMG3D_Get_solSize ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
int *  typEntity,
MMG5_int *  np,
int *  typSol 
)

Get the number of elements, dimension, and type of a solution structure.

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 MMG3D_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 290 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_tensorSol()

int MMG3D_Get_tensorSol ( MMG5_pSol  met,
double *  m11,
double *  m12,
double *  m13,
double *  m22,
double *  m23,
double *  m33 
)

Get the next element of a tensor solution structure.

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.
m13pointer to the position (1,3) in the solution tensor.
m22pointer to the position (2,2) in the solution tensor.
m23pointer to the position (2,3) in the solution tensor.
m33pointer to the position (3,3) in the solution tensor.
Returns
0 if failed, 1 otherwise.

This function retrieves the next element \((m_{11},m_{12},m_{13},m_{22},m_{23},m_{33})\) of a tensor-valued solution field. It is meant to be called in a loop over all vertices. When it has been called as many times as there are elements in the solution, the internal loop counter will be reset.

Remarks
Fortran interface:

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

Definition at line 1673 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_tensorSols()

int MMG3D_Get_tensorSols ( MMG5_pSol  met,
double *  sols 
)

Get all elements of a tensor solution field.

Parameters
metpointer to the sol structure.
solsarray of the solutions at mesh vertices. The solution at vertex i will be stored in sols[6*(i-1)] to sols[6*(i-1)+5].
Returns
0 if failed, 1 otherwise.
Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_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 1735 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_tetrahedra()

int MMG3D_Get_tetrahedra ( MMG5_pMesh  mesh,
MMG5_int *  tetra,
MMG5_int *  refs,
int *  areRequired 
)

Get the vertices and reference of all tetrahedra in the mesh.

Parameters
meshpointer to the mesh structure.
tetrapointer to the array where the vertices are to be stored. Vertices of the \(i^{th}\) tetra are stored in tetra[(i-1)*4] to tetra[(i-1)*4+3]
refspointer to the array of the tetrahedron references. References of the \(i^{th}\) tetra is stored in refs[i-1].
areRequiredpointer to the array of the flags saying if the tetrahedra are required. areRequired[i-1]=1 if the \(i^{th}\) tetrahedron is required.
Returns
0 if failed, 1 otherwise.
Remarks
Fortran interface: (commentated in order to allow to pass %val(0) instead of the refs, areCorners or areRequired arrays)

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

Definition at line 693 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_tetrahedron()

int MMG3D_Get_tetrahedron ( 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 tetrahedron in the mesh.

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

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

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_GET_TETRAHEDRON(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 593 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_tetrahedronQuality()

double MMG3D_Get_tetrahedronQuality ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_int  k 
)

Get the quality measure of a single tetrahedron in the mesh.

Parameters
meshpointer to the mesh structure.
metpointer to the metric structure (may be NULL for an isotropic metric).
kindex of the tetrahedron for which we want to get the quality (from 1 to the number of tetrahedra included)
Returns
the computed quality or 0 in case of failure.

This function returns the quality measure of tetrahedron k. Quality values range from 0 (degenerate) to 1 (best attainable). The function returns 0 if the tetrahedron is flat or has a negative volume, and also if k is out of range. In the latter case it will also print a diagnostic message to standard output.

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_GET_TETRAHEDRONQUALITY(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 1402 of file API_functions_3d.c.

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

◆ MMG3D_Get_triangle()

int MMG3D_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 if failed, 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 MMG3D_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 896 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_triangles()

int MMG3D_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 where the vertices are to be stored Vertices of the \(i^{th}\) triangle are stored in tria[(i-1)*3] to tria[(i-1)*3+2].
refspointer to the array where the references are to be stored. refs[i-1] is the reference of the \(i^{th}\) triangle.
areRequiredpointer to array of the flags saying if triangles are required. areRequired[i-1]=1 if the \(i^{th}\) tria is required.
Returns
0 if failed, 1 otherwise.
Remarks
Fortran interface: (Commentated in order to allow to pass %val(0) instead of the refs or areRequired arrays)

‍! SUBROUTINE MMG3D_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 956 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_vectorSol()

int MMG3D_Get_vectorSol ( MMG5_pSol  met,
double *  vx,
double *  vy,
double *  vz 
)

Get the next element of a vector solution structure.

Parameters
metpointer to the sol structure.
vxx value of the vectorial solution.
vyy value of the vectorial solution.
vzz value of the vectorial solution.
Returns
0 if failed, 1 otherwise.

This function retrieves the next vector-valued element \((v_x,v_y,vz)\) of the solution. 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 loop counter will be reset.

Remarks
Fortran interface:

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

Definition at line 1561 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_vectorSols()

int MMG3D_Get_vectorSols ( MMG5_pSol  met,
double *  sols 
)

Get all elements of a vector solution structure.

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

Get vectorial solutions at mesh vertices

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_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 1616 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_vertex()

int MMG3D_Get_vertex ( MMG5_pMesh  mesh,
double *  c0,
double *  c1,
double *  c2,
MMG5_int *  ref,
int *  isCorner,
int *  isRequired 
)

Get the coordinates c0, c1,c2 and reference ref of the next vertex of mesh.

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.
c2pointer to the coordinate of the vertex along the third 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, c1,c2 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 MMG3D_GetByIdx_vertex function can be used instead.

Remarks
Fortran interface:

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

Definition at line 398 of file API_functions_3d.c.

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

◆ MMG3D_Get_vertices()

int MMG3D_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 coordinates. The coordinates of the \(i^{th}\) vertex are stored in vertices[(i-1)*3]@3.
refspointer to the array of the vertex references. The ref of the \(i^th\) vertex is stored in refs[i-1].
areCornerspointer to the array of the 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 or areRequired arrays)

‍! SUBROUTINE MMG3D_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 485 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_GetByIdx_vertex()

int MMG3D_GetByIdx_vertex ( MMG5_pMesh  mesh,
double *  c0,
double *  c1,
double *  c2,
MMG5_int *  ref,
int *  isCorner,
int *  isRequired,
MMG5_int  idx 
)

Get the coordinates and reference of a specific vertex in the mesh.

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.
c2pointer to the coordinate of the vertex along the third 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, c2 and reference ref of vertex idx of mesh.

Remarks
Fortran interface:

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

Definition at line 425 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Init_fileNames()

void MMG3D_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.

This function initializes all file names to their default values.

Remarks
Fortran interface:

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

Definition at line 58 of file API_functions_3d.c.

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

◆ MMG3D_Init_mesh()

int MMG3D_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 that depend on the library function that you want to call.

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

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

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

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

Returns
1 on success, 0 on failure

This function allocates and initializes MMG structures. All structures of types MMG5_pMesh and MMG5_pSol that will be given as arguments to Mmg functions must be initialized with this function.

Remarks
No fortran interface to allow variadic arguments.
Warning
detected bugs:
  • some vertices along open boundaries end up with a normal (while they should not)

Definition at line 46 of file API_functions_3d.c.

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

◆ MMG3D_Init_parameters()

void MMG3D_Init_parameters ( MMG5_pMesh  mesh)

Initialize parameters to their default values.

Parameters
meshpointer to the mesh structure.

Initialization of the input parameters (stored in the Info structure).

Remarks
Fortran interface:

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

Definition at line 87 of file API_functions_3d.c.

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

◆ MMG3D_Set_corner()

int MMG3D_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 MMG3D_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 1223 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_dparameter()

int MMG3D_Set_dparameter ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
int  dparam,
double  val 
)

set a real-valued parameter of the remesher

Parameters
meshpointer to the mesh structure.
solpointer to the sol structure (unused).
dparamdouble parameter to set (see MMG3D_Param for a list of parameters that can be set).
valvalue of the parameter.
Returns
0 if failed, 1 otherwise.

This function sets the double parameter dparam to value val.

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_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 2364 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_edge()

int MMG3D_Set_edge ( MMG5_pMesh  mesh,
MMG5_int  v0,
MMG5_int  v1,
MMG5_int  ref,
MMG5_int  pos 
)

Set the vertices and reference of a single edge in a mesh.

Parameters
meshpointer to the mesh structure.
v0first extremity of the edge.
v1second extremity of the edge.
refedge reference.
posedge position in the mesh.
Returns
0 if failed, 1 otherwise.

Set edges of extremities v0, v1 and reference ref at position pos in mesh structure (from 1 to nb_edges included)

Remarks
Fortran interface:

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

Definition at line 1098 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_edges()

int MMG3D_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. The vertices of the \(i^{th}\) edge should be given in edges[(i-1)*2] and edges[(i-1)*2+1].
refsedges references. refs[i-1] is the ref of the \(i^{th}\) edge.
Returns
0 if failed, 1 otherwise.
Remarks
Fortran interface:

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

Definition at line 1176 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_handGivenMesh()

void MMG3D_Set_handGivenMesh ( MMG5_pMesh  mesh)

Finish providing mesh data without using the API functions.

Parameters
meshpointer to the mesh structure.

To mark as ended a mesh given without using the API functions (for example, mesh given by mesh->point[i] = 0 ...). This function performs verifications, e.g. to make sure that all tetrahedra are consistently oriented.

Remarks
Fortran interface:

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

Definition at line 1867 of file API_functions_3d.c.

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

◆ MMG3D_Set_inputMeshName()

int MMG3D_Set_inputMeshName ( MMG5_pMesh  mesh,
const char *  meshin 
)

Set the name of input mesh.

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

‍ SUBROUTINE MMG3D_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 65 of file API_functions_3d.c.

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

◆ MMG3D_Set_inputParamName()

int MMG3D_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 MMG3D_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 74 of file API_functions_3d.c.

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

◆ MMG3D_Set_inputSolName()

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

Set the name of 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 MMG3D_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 70 of file API_functions_3d.c.

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

◆ MMG3D_Set_iparameter()

int MMG3D_Set_iparameter ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
int  iparam,
MMG5_int  val 
)

set an integer parameter of the remesher

Parameters
meshpointer to the mesh structure.
solpointer to the sol structure (unused).
iparaminteger parameter to set (see MMG3D_Param for a list of parameters that can be set).
valvalue for the parameter.
Returns
0 if failed, 1 otherwise.

This function sets the integer parameter iparam to value val.

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_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 2113 of file API_functions_3d.c.

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

◆ MMG3D_Set_ithSol_inSolsAtVertices()

int MMG3D_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 if failed, 1 otherwise.

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

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_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 1754 of file API_functions_3d.c.

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

◆ MMG3D_Set_ithSols_inSolsAtVertices()

int MMG3D_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 the solutions at mesh vertices. The solution at vertex k is given by s[k-1] for a scalar sol, s[3*(k-1)]@3 for a vectorial solution and s[6*(k-1)]@6 for a tensor solution.
Returns
0 if failed, 1 otherwise.

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

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_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 1811 of file API_functions_3d.c.

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

◆ MMG3D_Set_localParameter()

int MMG3D_Set_localParameter ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
int  typ,
MMG5_int  ref,
double  hmin,
double  hmax,
double  hausd 
)

set a local parameter

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
hausdHausdorff distance
Returns
0 if failed, 1 otherwise.

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

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_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 2444 of file API_functions_3d.c.

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

◆ MMG3D_Set_lsBaseReference()

int MMG3D_Set_lsBaseReference ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
MMG5_int  br 
)

Set a new level-set base reference.

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

Set a new level-set base reference of ref br in LS discretization mode. Base references are boundary conditions to which implicit domains 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 MMG3D_SET_LSBASEREFERENCE(mesh,sol,br,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
INTEGER(MMG5F_INT) :: br
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 2537 of file API_functions_3d.c.

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

◆ MMG3D_Set_meshSize()

int MMG3D_Set_meshSize ( MMG5_pMesh  mesh,
MMG5_int  np,
MMG5_int  ne,
MMG5_int  nprism,
MMG5_int  nt,
MMG5_int  nquad,
MMG5_int  na 
)

Set the number of vertices, tetrahedra, prisms, triangles, quadrilaterals, and edges of a mesh.

Parameters
meshpointer to the mesh structure.
npnumber of vertices.
nenumber of tetrahedra.
nprismnumber of prisms.
ntnumber of triangles.
nquadnumber of quads.
nanumber of edges.
Returns
0 if failed, 1 otherwise.

This function sets the number of vertices, tetrahedra, prisms, triangles, quadrilaterals and edges of the mesh and allocates the associated arrays. If called again, it will reset the whole mesh to reallocate it at the new size

Remarks
Fortran interface:

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

Definition at line 264 of file API_functions_3d.c.

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

◆ MMG3D_Set_multiMat()

int MMG3D_Set_multiMat ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
MMG5_int  ref,
int  split,
MMG5_int  rmin,
MMG5_int  rplus 
)

Set the reference mapping for the elements of reference ref in level-set discretization mode.

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

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

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

Definition at line 2533 of file API_functions_3d.c.

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

◆ MMG3D_Set_normalAtVertex()

int MMG3D_Set_normalAtVertex ( MMG5_pMesh  mesh,
MMG5_int  k,
double  n0,
double  n1,
double  n2 
)

Set the normal orientation at a single vertex.

Parameters
meshpointer to the mesh structure.
kvertex index
n0x componant of the normal at vertex k.
n1y componant of the normal at vertex k.
n2z componant of the normal at vertex k.
Returns
1 if success.

Set normal (n0,n1,n2) at vertex k.

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_SET_NORMALATVERTEX(mesh,k,n0,n1,n2,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(IN):: k
REAL(KIND=8), INTENT(IN) :: n0,n1,n2
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1380 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_outputMeshName()

int MMG3D_Set_outputMeshName ( MMG5_pMesh  mesh,
const char *  meshout 
)

Set the name of output mesh file.

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

‍ SUBROUTINE MMG3D_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 78 of file API_functions_3d.c.

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

◆ MMG3D_Set_outputSolName()

int MMG3D_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 if failed, 1 otherwise.
Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_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 83 of file API_functions_3d.c.

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

◆ MMG3D_Set_parallelTriangle()

int MMG3D_Set_parallelTriangle ( MMG5_pMesh  mesh,
MMG5_int  k 
)

Assign the "parallel" attribute to a single triangle.

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

Set triangle k as parallel (triangle at the interface between two processors, ie, this triangle is required). (k from 1 to nb_tria included).

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_SET_PARALLELTRIANGLE(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 1318 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_parallelTriangles()

int MMG3D_Set_parallelTriangles ( MMG5_pMesh  mesh,
MMG5_int *  parIdx,
MMG5_int  npar 
)

Assign the "parallel" attribute to multiple triangles.

Parameters
meshpointer to the mesh structure
parIdxarray of indices of triangles
nparnumber of triangles
Returns
1.

Set the parallel triangles (triangles at the interface between processors, i.e. these triangles are required).

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_SET_PARALLELTRIANGLES(mesh,parIdx,npar,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), DIMENSION(*),INTENT(IN) :: parIdx
INTEGER(MMG5F_INT), INTENT(IN) :: npar
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1334 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_prism()

int MMG3D_Set_prism ( MMG5_pMesh  mesh,
MMG5_int  v0,
MMG5_int  v1,
MMG5_int  v2,
MMG5_int  v3,
MMG5_int  v4,
MMG5_int  v5,
MMG5_int  ref,
MMG5_int  pos 
)

Set the vertices and reference of a single prism in a mesh.

Parameters
meshpointer to the mesh structure.
v0first vertex of prism.
v1second vertex of prism.
v2third vertex of prism.
v3fourth vertex of prism.
v4fifth vertex of prism.
v5sixth vertex of prism.
refprism reference.
posprism position in the mesh.
Returns
0 if failed, 1 otherwise.

This function sets the six vertices v0, v1,v2,v3,v4,v5 and reference ref for the prism at position pos in the mesh structure (from 1 to nb_prisms included).

Remarks
Fortran interface:

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

Definition at line 717 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_prisms()

int MMG3D_Set_prisms ( MMG5_pMesh  mesh,
MMG5_int *  prisms,
MMG5_int *  refs 
)

Set the vertices and references of all prisms in a mesh.

Parameters
meshpointer to the mesh structure.
prismsvertices of the prisms of the mesh Vertices of the \(i^{th}\) prism are stored in prism[(i-1)*6] to prism[(i-1)*6+5] included.
refsarray of the prisms references. The references of the \(i^{th}\) prism is stored in refs[i-1].
Returns
0 if failed, 1 otherwise.

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

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

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

Definition at line 803 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_quadrilateral()

int MMG3D_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 quadrilateral in a mesh.

Parameters
meshpointer to the mesh structure.
v0first vertex of quadrilateral.
v1second vertex of quadrilateral.
v2third vertex of quadrilateral.
v3fourth vertex of quadrilateral.
refquadrilateral reference.
posquadrilateral position in the mesh.
Returns
0 if failed, 1 otherwise.

Set a quadrilateral of vertices v0, v1, v2, v3 and reference ref at position pos in mesh structure (from 1 to nb_quadrangles included).

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_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 981 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_quadrilaterals()

int MMG3D_Set_quadrilaterals ( MMG5_pMesh  mesh,
MMG5_int *  quads,
MMG5_int *  refs 
)

Set the vertices and references of all quadrilaterals in a mesh.

Parameters
meshpointer to the mesh structure.
quadspointer to the array of the quads vertices Vertices of the \(i^{th}\) quadra are stored in quads[(i-1)*3]@3.
refspointer to the array of the quadrilateral references. refs[i-1] is the ref of the \(i^{th}\) quadra.
Returns
0 if failed, 1 otherwise.
Remarks
Fortran interface: (commentated in order to allow to pass %val(0) instead of the refs array)

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

Definition at line 1054 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_requiredEdge()

int MMG3D_Set_requiredEdge ( MMG5_pMesh  mesh,
MMG5_int  k 
)

Assign the "required" attribute to a single edge.

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

Set edge k as required.

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_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 1368 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_requiredTetrahedra()

int MMG3D_Set_requiredTetrahedra ( MMG5_pMesh  mesh,
MMG5_int *  reqIdx,
MMG5_int  nreq 
)

Assign the "required" attribute to multiple tetrahedra.

Parameters
meshpointer to the mesh structure.
reqIdxarray of the indices of the required elements.
nreqnumber of required elements
Returns
1.

Determine which tetrahedra have the "required" attribute.

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_SET_REQUIREDTETRAHEDRA(mesh,reqIdx,nreq,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), DIMENSION(*),INTENT(IN) :: reqIdx
INTEGER(MMG5F_INT), INTENT(IN) :: nreq
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1260 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_requiredTetrahedron()

int MMG3D_Set_requiredTetrahedron ( MMG5_pMesh  mesh,
MMG5_int  k 
)

Assign the "required" attribute to a tetrahedron.

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

Set element k as required (k from 1 to nb_tetra included).

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_SET_REQUIREDTETRAHEDRON(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 1248 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_requiredTriangle()

int MMG3D_Set_requiredTriangle ( MMG5_pMesh  mesh,
MMG5_int  k 
)

Assign the "required" attribute to a single triangle.

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

Set triangle k as required (k from 1 to nb_tria included).

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_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 1280 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_requiredTriangles()

int MMG3D_Set_requiredTriangles ( MMG5_pMesh  mesh,
MMG5_int *  reqIdx,
MMG5_int  nreq 
)

Assign the "required" attribute to multiple triangles.

Parameters
meshpointer to the mesh structure.
reqIdxarray of the indices of the required triangles.
nreqnumber of required triangles
Returns
1.
Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_SET_REQUIREDTRIANGLES(mesh,reqIdx,nreq,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), DIMENSION(*),INTENT(IN) :: reqIdx
INTEGER(MMG5F_INT), INTENT(IN) :: nreq
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1296 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_requiredVertex()

int MMG3D_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 nb_vertices included). This prevents the remesher from moving the vertex.

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_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 1235 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_ridge()

int MMG3D_Set_ridge ( MMG5_pMesh  mesh,
MMG5_int  k 
)

Assign the "ridge" attribute to a single edge.

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

Set the "ridge" attribute at edge k. This affects how the remesher treats the edge and the adjacent triangles or tetrahedra.

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_SET_RIDGE(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 1356 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_scalarSol()

int MMG3D_Set_scalarSol ( MMG5_pSol  met,
double  s,
MMG5_int  pos 
)

Set a single element of a scalar solution structure.

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

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

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_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 1434 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_scalarSols()

int MMG3D_Set_scalarSols ( MMG5_pSol  met,
double *  s 
)

Set the values of all elements of a scalar solution structure.

Parameters
metpointer to the sol structure.
sarray of the scalar solutions values. s[i-1] is the solution at vertex i.
Returns
0 if failed, 1 otherwise.

Set scalar solutions at mesh vertices.

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_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 1498 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_solsAtVerticesSize()

int MMG3D_Set_solsAtVerticesSize ( MMG5_pMesh  mesh,
MMG5_pSol sol,
int  nsols,
MMG5_int  nentities,
int *  typSol 
)

Initialize an array of solution values defined at vertices.

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

Initialize a solution field defined at vertices: set dimension, types and number of data values. (not used by Mmg itself).

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_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 161 of file API_functions_3d.c.

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

◆ MMG3D_Set_solSize()

int MMG3D_Set_solSize ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
int  typEntity,
MMG5_int  np,
int  typSol 
)

Initialize a solution field.

Parameters
meshpointer to the mesh structure.
solpointer to the sol structure.
typEntitytype of entities on which the solution is defined (vertices, triangles, ...). See MMG5_entities for the defined entity types. Currently only MMG5_Vertex is supported.
npnumber of solutions.
typSoltype of solution (scalar, vectorial, ..., see MMG5_type for possible values).
Returns
0 if failed, 1 otherwise.

Initialize a solution field: set dimension, types and number of data. To use to initialize a metric, a level-set or a displacement field.

Remarks
Fortran interface:

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

Definition at line 116 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_tensorSol()

int MMG3D_Set_tensorSol ( MMG5_pSol  met,
double  m11,
double  m12,
double  m13,
double  m22,
double  m23,
double  m33,
MMG5_int  pos 
)

Set a single element of a tensor solution structure.

Parameters
metpointer to the sol structure.
m11value of the tensorial solution at position (1,1) in the tensor
m12value of the tensorial solution at position (1,2) in the tensor
m13value of the tensorial solution at position (1,3) in the tensor
m22value of the tensorial solution at position (2,2) in the tensor
m23value of the tensorial solution at position (2,3) in the tensor
m33value of the tensorial solution at position (3,3) in the tensor
posposition of the solution in the mesh (begin to 1).
Returns
0 if failed, 1 otherwise.

Set tensorial values at position pos in solution structure. (pos from 1 to nb_vertices included).

Remarks
Fortran interface:

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

Definition at line 1631 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_tensorSols()

int MMG3D_Set_tensorSols ( MMG5_pSol  met,
double *  sols 
)

Set all elements of a tensor solution structure.

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

Set tensorial values by array.

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_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 1709 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_tetrahedra()

int MMG3D_Set_tetrahedra ( MMG5_pMesh  mesh,
MMG5_int *  tetra,
MMG5_int *  refs 
)

Set the vertices and references of all tetrahedra in a mesh structure.

Parameters
meshpointer to the mesh structure.
tetravertices of the tetras of the mesh given. The vertices of the \(i^{th}\) tetrahedron are given by tetra[(i-1)*4] to tetra[(i-1)*4+3] included.
refsarray of the tetrahedra references. The references of the \(i^{th}\) tetrahedron is given by refs[i-1].
Returns
0 if failed, 1 otherwise.

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

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

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

Definition at line 635 of file API_functions_3d.c.

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

◆ MMG3D_Set_tetrahedron()

int MMG3D_Set_tetrahedron ( MMG5_pMesh  mesh,
MMG5_int  v0,
MMG5_int  v1,
MMG5_int  v2,
MMG5_int  v3,
MMG5_int  ref,
MMG5_int  pos 
)

set a single tetrahedron's vertices

Parameters
meshpointer to the mesh structure.
v0first vertex of tetrahedron.
v1second vertex of tetrahedron.
v2third vertex of tetrahedron.
v3fourth vertex of tetrahedron.
reftetrahedron reference.
postetrahedron position in the mesh.
Returns
0 if failed, 1 otherwise.

Assign the vertices v0, v1,v2,v3 and reference ref to the tetrahedron at position pos in the mesh structure. pos ranges from 1 to nb_tetra included.

Remarks
Fortran interface:

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

Definition at line 521 of file API_functions_3d.c.

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

◆ MMG3D_Set_triangle()

int MMG3D_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 if failed, 1 otherwise.

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

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_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 862 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_triangles()

int MMG3D_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 tria vertices 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 if failed, 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 MMG3D_SET_TRIANGLES(mesh,tria,refs,retval)
! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
! INTEGER(MMG5F_INT),DIMENSION(*), INTENT(IN) :: tria
! INTEGER(MMG5F_INT),DIMENSION(*), INTENT(IN) :: refs
! INTEGER, INTENT(OUT) :: retval
! END SUBROUTINE

Definition at line 938 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_vectorSol()

int MMG3D_Set_vectorSol ( MMG5_pSol  met,
double  vx,
double  vy,
double  vz,
MMG5_int  pos 
)

Set a single element of a vector solution structure.

Parameters
metpointer to the sol structure.
vxx value of the vectorial solution.
vyy value of the vectorial solution.
vzz value of the vectorial solution.
posposition of the solution in the mesh (begin to 1).
Returns
0 if failed, 1 otherwise.

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

Remarks
Fortran interface:

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

Definition at line 1524 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_vectorSols()

int MMG3D_Set_vectorSols ( MMG5_pSol  met,
double *  sols 
)

Set all elements of a vector solution structure.

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

Set vectorial solutions at mesh vertices

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_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 1593 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_vertex()

int MMG3D_Set_vertex ( MMG5_pMesh  mesh,
double  c0,
double  c1,
double  c2,
MMG5_int  ref,
MMG5_int  pos 
)

Set the coordinates 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.
c2coordinate of the vertex along the third dimension.
refvertex reference.
posposition of the vertex in the mesh.
Returns
1.

This function sets the coordinates of a vertex c0, c1,c2 and reference ref at position pos in mesh structure (from 1 to nb_vertices included).

Remarks
Fortran interface:

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

Definition at line 362 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_vertices()

int MMG3D_Set_vertices ( MMG5_pMesh  mesh,
double *  vertices,
MMG5_int *  refs 
)

Set all vertex coordinates and references in a mesh structure.

Parameters
meshpointer to the mesh structure.
verticesarray of vertex coordinates in the order \([x_1, y_1, z_1, x_2, \ldots, z_N]\) where \(N\) is the number of vertices in the mesh.
refsarray of vertex references. The reference of vertex \(i\) is stored in refs[ \(i-1\)].
Returns
1.

This function sets the coordinates and references of all vertices in a mesh structure. The number of vertices in the mesh must have been set before.

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

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

Definition at line 458 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_setMeshSize_initData()

int MMG3D_setMeshSize_initData ( MMG5_pMesh  mesh,
MMG5_int  np,
MMG5_int  ne,
MMG5_int  nprism,
MMG5_int  nt,
MMG5_int  nquad,
MMG5_int  na 
)
Parameters
meshpointer to the mesh structure.
npnumber of vertices.
nenumber of tetrahedra.
nprismnumber of prisms.
ntnumber of triangles.
nquadnumber of quads.
nanumber of edges.
Returns
0 if failed, 1 otherwise.

Check the input mesh size and assign their values to the mesh.

Definition at line 220 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_skipIso()

static int MMG3D_skipIso ( MMG5_pMesh  mesh)
inlinestatic

Definition at line 1929 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Unset_corner()

int MMG3D_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 MMG3D_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 1229 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Unset_parallelTriangle()

int MMG3D_Unset_parallelTriangle ( MMG5_pMesh  mesh,
MMG5_int  k 
)

Remove the "parallel" attribute from a single triangle.

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

Remove parallel attribute from triangle k (i.e. triangles aren't preserved anymore). (k from 1 to nb_tria included).

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_UNSET_PARALLELTRIANGLE(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 1326 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Unset_parallelTriangles()

int MMG3D_Unset_parallelTriangles ( MMG5_pMesh  mesh,
MMG5_int *  parIdx,
MMG5_int  npar 
)

Remove the "parallel" attribute from multiple triangles.

Parameters
meshpointer to the mesh structure.
parIdxarray of the indices of triangles
nparnumber of triangles
Returns
1.

Remove parallel attributes from triangles (i.e. triangles aren't preserved anymore).

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_UNSET_PARALLELTRIANGLES(mesh,parIdx,npar,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), DIMENSION(*),INTENT(IN) :: parIdx
INTEGER(MMG5F_INT), INTENT(IN) :: npar
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1345 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Unset_requiredEdge()

int MMG3D_Unset_requiredEdge ( MMG5_pMesh  mesh,
MMG5_int  k 
)

Remove the "required" attribute from a single edge.

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

Remove required attribute from edge k.

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_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 1374 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Unset_requiredTetrahedra()

int MMG3D_Unset_requiredTetrahedra ( MMG5_pMesh  mesh,
MMG5_int *  reqIdx,
MMG5_int  nreq 
)

Remove the "required" attribute from multiple tetrahedra.

Parameters
meshpointer to the mesh structure.
reqIdxarray of the indices of the required elements.
nreqnumber of required elements
Returns
1.

Remove required attribute from a list of Tetra whose indices are contained in array reqIdx.

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_UNSET_REQUIREDTETRAHEDRA(mesh,reqIdx,nreq,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), DIMENSION(*),INTENT(IN) :: reqIdx
INTEGER(MMG5F_INT), INTENT(IN) :: nreq
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1270 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Unset_requiredTetrahedron()

int MMG3D_Unset_requiredTetrahedron ( MMG5_pMesh  mesh,
MMG5_int  k 
)

Remove the "required" attribute from a tetrahedron.

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

Remove required attribute from element k (k from 1 to nb_tetra included).

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_UNSET_REQUIREDTETRAHEDRON(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 1254 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Unset_requiredTriangle()

int MMG3D_Unset_requiredTriangle ( MMG5_pMesh  mesh,
MMG5_int  k 
)

Remove the "required" attribute from a single triangle.

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

Remove required attribute from triangle k.

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_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 1288 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Unset_requiredTriangles()

int MMG3D_Unset_requiredTriangles ( MMG5_pMesh  mesh,
MMG5_int *  reqIdx,
MMG5_int  nreq 
)

Remove the "required" attribute from multiple triangles.

Parameters
meshpointer to the mesh structure.
reqIdxarray of the indices of the required trias.
nreqnumber of required trias
Returns
1.
Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_UNSET_REQUIREDTRIANGLES(mesh,reqIdx,nreq,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), DIMENSION(*),INTENT(IN) :: reqIdx
INTEGER(MMG5F_INT), INTENT(IN) :: nreq
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1307 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Unset_requiredVertex()

int MMG3D_Unset_requiredVertex ( MMG5_pMesh  mesh,
MMG5_int  k 
)

Remove 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 MMG3D_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 1242 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Unset_ridge()

int MMG3D_Unset_ridge ( MMG5_pMesh  mesh,
MMG5_int  k 
)

Remove the "ridge" attribute from a single edge.

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

Remove ridge attribute at edge k.

Remarks
Fortran interface:

‍ SUBROUTINE MMG3D_UNSET_RIDGE(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 1362 of file API_functions_3d.c.

Here is the caller graph for this function: