Mmg
Simplicial remeshers (mesh adaptation, isovalue discretization, lagrangian movement)
|
C API functions definitions for MMG2D library. More...
Go to the source code of this file.
Functions | |
int | MMG2D_Init_mesh (const int starter,...) |
Initialize a mesh structure and optionally the associated solution and metric structures. | |
void | MMG2D_Init_fileNames (MMG5_pMesh mesh, MMG5_pSol sol) |
Initialize file names to their default values. | |
int | MMG2D_Set_inputMeshName (MMG5_pMesh mesh, const char *meshin) |
Set the name of the input mesh. | |
int | MMG2D_Set_inputSolName (MMG5_pMesh mesh, MMG5_pSol sol, const char *solin) |
Set the name of the input solution file. | |
int | MMG2D_Set_inputParamName (MMG5_pMesh mesh, const char *fparamin) |
Set the name of the input parameter file. | |
int | MMG2D_Set_outputMeshName (MMG5_pMesh mesh, const char *meshout) |
Set the name of the output mesh file. | |
int | MMG2D_Set_outputSolName (MMG5_pMesh mesh, MMG5_pSol sol, const char *solout) |
Set the name of the output solution file. | |
void | MMG2D_Init_parameters (MMG5_pMesh mesh) |
Initialize the input parameters (stored in the Info structure). | |
int | MMG2D_Set_iparameter (MMG5_pMesh mesh, MMG5_pSol sol, int iparam, MMG5_int val) |
Set integer parameter iparam to value val. | |
int | MMG2D_Set_dparameter (MMG5_pMesh mesh, MMG5_pSol sol, int dparam, double val) |
Set double parameter dparam to value val. | |
int | MMG2D_Set_localParameter (MMG5_pMesh mesh, MMG5_pSol sol, int typ, MMG5_int ref, double hmin, double hmax, double hausd) |
Set local parameters. | |
int | MMG2D_Set_multiMat (MMG5_pMesh mesh, MMG5_pSol sol, MMG5_int ref, int split, MMG5_int rin, MMG5_int rout) |
Set the reference mapping for the elements of ref ref in LS discretization mode. | |
int | MMG2D_Set_lsBaseReference (MMG5_pMesh mesh, MMG5_pSol sol, MMG5_int br) |
Set level-set base reference. | |
int | MMG2D_Set_meshSize (MMG5_pMesh mesh, MMG5_int np, MMG5_int nt, MMG5_int nquad, MMG5_int na) |
Set the numbers of entities in the mesh. | |
int | MMG2D_Set_solSize (MMG5_pMesh mesh, MMG5_pSol sol, int typEntity, MMG5_int np, int typSol) |
Set the size and type of a solution field. | |
int | MMG2D_Set_solsAtVerticesSize (MMG5_pMesh mesh, MMG5_pSol *sol, int nsols, MMG5_int np, int *typSol) |
Initialize an array of solutions field defined at vertices. | |
int | MMG2D_Get_solSize (MMG5_pMesh mesh, MMG5_pSol sol, int *typEntity, MMG5_int *np, int *typSol) |
Get the number of solutions, their dimension and their type. | |
int | MMG2D_Get_solsAtVerticesSize (MMG5_pMesh mesh, MMG5_pSol *sol, int *nsols, MMG5_int *np, int *typSol) |
Get the number of elements and dimension of a solution defined on vertices. | |
int | MMG2D_Get_meshSize (MMG5_pMesh mesh, MMG5_int *np, MMG5_int *nt, MMG5_int *nquad, MMG5_int *na) |
Get the number of vertices, triangles and edges of the mesh. | |
int | MMG2D_Set_vertex (MMG5_pMesh mesh, double c0, double c1, MMG5_int ref, MMG5_int pos) |
Set the coordinates and reference of a single vertex. | |
int | MMG2D_Set_corner (MMG5_pMesh mesh, MMG5_int k) |
Assign the "corner" attribute to a vertex. | |
int | MMG2D_Unset_corner (MMG5_pMesh mesh, MMG5_int k) |
Remove the "corner" attribute from a vertex. | |
int | MMG2D_Set_requiredVertex (MMG5_pMesh mesh, MMG5_int k) |
Assign the "required" attribute to a vertex. | |
int | MMG2D_Unset_requiredVertex (MMG5_pMesh mesh, MMG5_int k) |
Remove the "required" attribute from a vertex. | |
int | MMG2D_Get_vertex (MMG5_pMesh mesh, double *c0, double *c1, MMG5_int *ref, int *isCorner, int *isRequired) |
Get the coordinates and reference ref of the next vertex of a mesh. | |
int | MMG2D_GetByIdx_vertex (MMG5_pMesh mesh, double *c0, double *c1, MMG5_int *ref, int *isCorner, int *isRequired, MMG5_int idx) |
Get the coordinates and reference of a specific vertex in the mesh. | |
int | MMG2D_Set_vertices (MMG5_pMesh mesh, double *vertices, MMG5_int *refs) |
Set the coordinates and references of all vertices in the mesh. | |
int | MMG2D_Get_vertices (MMG5_pMesh mesh, double *vertices, MMG5_int *refs, int *areCorners, int *areRequired) |
Get the coordinates and references of all vertices in the mesh. | |
int | MMG2D_Set_triangle (MMG5_pMesh mesh, MMG5_int v0, MMG5_int v1, MMG5_int v2, MMG5_int ref, MMG5_int pos) |
Set the vertices and reference of a single triangle in a mesh. | |
int | MMG2D_Set_requiredTriangle (MMG5_pMesh mesh, MMG5_int k) |
Give triangle k the "required" attribute. | |
int | MMG2D_Unset_requiredTriangle (MMG5_pMesh mesh, MMG5_int k) |
Remove the "required" attribute from triangle k. | |
int | MMG2D_Get_triangle (MMG5_pMesh mesh, MMG5_int *v0, MMG5_int *v1, MMG5_int *v2, MMG5_int *ref, int *isRequired) |
Get the vertices and reference of the next triangle in the mesh. | |
int | MMG2D_Set_triangles (MMG5_pMesh mesh, MMG5_int *tria, MMG5_int *refs) |
Set the vertices and references of all triangles in a mesh. | |
int | MMG2D_Get_triangles (MMG5_pMesh mesh, MMG5_int *tria, MMG5_int *refs, int *areRequired) |
Get the vertices and references of all triangles in the mesh. | |
int | MMG2D_Set_quadrilateral (MMG5_pMesh mesh, MMG5_int v0, MMG5_int v1, MMG5_int v2, MMG5_int v3, MMG5_int ref, MMG5_int pos) |
Set the vertices and reference of a single quadrangle in a mesh. | |
int | MMG2D_Get_quadrilateral (MMG5_pMesh mesh, MMG5_int *v0, MMG5_int *v1, MMG5_int *v2, MMG5_int *v3, MMG5_int *ref, int *isRequired) |
Get the vertices and reference of the next quadrangle of the mesh. | |
int | MMG2D_Set_quadrilaterals (MMG5_pMesh mesh, MMG5_int *quadra, MMG5_int *refs) |
Set the vertices and references of all quadrangles in a mesh. | |
int | MMG2D_Get_quadrilaterals (MMG5_pMesh mesh, MMG5_int *quadra, MMG5_int *refs, int *areRequired) |
Get the vertices and references of all quadrangles of the mesh. | |
int | MMG2D_Set_edge (MMG5_pMesh mesh, MMG5_int v0, MMG5_int v1, MMG5_int ref, MMG5_int pos) |
Define a single edge. | |
int | MMG2D_Set_requiredEdge (MMG5_pMesh mesh, MMG5_int k) |
Give edge k the "required" attribute. | |
int | MMG2D_Unset_requiredEdge (MMG5_pMesh mesh, MMG5_int k) |
Remove the "required" attribute from edge k. | |
int | MMG2D_Set_parallelEdge (MMG5_pMesh mesh, MMG5_int k) |
Give edge k the "parallel" attribute. | |
int | MMG2D_Get_edge (MMG5_pMesh mesh, MMG5_int *e0, MMG5_int *e1, MMG5_int *ref, int *isRidge, int *isRequired) |
Get the vertices and reference of the next edge in the mesh. | |
int | MMG2D_Set_edges (MMG5_pMesh mesh, MMG5_int *edges, MMG5_int *refs) |
Set the vertices and references of all edges in a mesh. | |
int | MMG2D_Get_edges (MMG5_pMesh mesh, MMG5_int *edges, MMG5_int *refs, int *areRidges, int *areRequired) |
Get the vertices and references of all edges in a mesh. | |
double | MMG2D_Get_triangleQuality (MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k) |
Get the quality measure of a single triangle in the mesh. | |
int | MMG2D_Set_scalarSol (MMG5_pSol met, double s, MMG5_int pos) |
Set a single value of a sol structure. | |
int | MMG2D_Get_scalarSol (MMG5_pSol met, double *s) |
Get the scalar solution value s of next element of a solution. | |
int | MMG2D_Set_scalarSols (MMG5_pSol met, double *s) |
Set all values of a scalar sol structure. | |
int | MMG2D_Get_scalarSols (MMG5_pSol met, double *s) |
Get all elements of a scalar sol structure. | |
int | MMG2D_Set_vectorSol (MMG5_pSol met, double vx, double vy, MMG5_int pos) |
Set a single vector value in a sol structure. | |
int | MMG2D_Get_vectorSol (MMG5_pSol met, double *vx, double *vy) |
Get the next element of a vector sol structure. | |
int | MMG2D_Set_vectorSols (MMG5_pSol met, double *sols) |
Set all values in a vector sol structure. | |
int | MMG2D_Get_vectorSols (MMG5_pSol met, double *sols) |
Get all elements of a vector sol structure. | |
int | MMG2D_Set_tensorSol (MMG5_pSol met, double m11, double m12, double m22, MMG5_int pos) |
Set a single element of a tensor sol structure. | |
int | MMG2D_Get_tensorSol (MMG5_pSol met, double *m11, double *m12, double *m22) |
Get the next element of a tensor sol structure. | |
int | MMG2D_Set_tensorSols (MMG5_pSol met, double *sols) |
Set all elements of a tensor sol structure. | |
int | MMG2D_Get_tensorSols (MMG5_pSol met, double *sols) |
Get all elements of a tensor sol structure. | |
int | MMG2D_Set_ithSols_inSolsAtVertices (MMG5_pSol sol, int i, double *s) |
Set all elements of one out of multiple solution fields that are defined on vertices. | |
int | MMG2D_Get_ithSols_inSolsAtVertices (MMG5_pSol sol, int i, double *s) |
Get one out of several scalar solutions at all vertices in the mesh. | |
int | MMG2D_Set_ithSol_inSolsAtVertices (MMG5_pSol sol, int i, double *s, MMG5_int pos) |
Set a single element of one out of multiple solution fields that are defined on vertices. | |
int | MMG2D_Get_ithSol_inSolsAtVertices (MMG5_pSol sol, int i, double *s, MMG5_int pos) |
Get one out of several scalar solutions at a specific vertex. | |
int | MMG2D_Chk_meshData (MMG5_pMesh mesh, MMG5_pSol met) |
Check if the number of given entities match with mesh and sol size. | |
int | MMG2D_Free_allSols (MMG5_pMesh mesh, MMG5_pSol *sol) |
Deallocate an array of solution fields. | |
int | MMG2D_Free_all (const int starter,...) |
Deallocations before return. | |
int | MMG2D_Free_structures (const int starter,...) |
Structure deallocations before return. | |
int | MMG2D_Free_names (const int starter,...) |
Structure deallocations before return. | |
C API functions definitions for MMG2D library.
C API for MMG2D library.
Definition in file API_functions_2d.c.
int MMG2D_Chk_meshData | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met | ||
) |
Check if the number of given entities match with mesh and sol size.
mesh | pointer to the mesh structure. |
met | pointer to the sol structure. |
Check if the number of given entities match with mesh and sol size (not mandatory) and check mesh datas.
SUBROUTINE MMG2D_Chk_meshData(mesh,met,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,met
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 1860 of file API_functions_2d.c.
int MMG2D_Free_all | ( | const int | starter, |
... | |||
) |
Deallocations before return.
starter | dummy argument used to initialize the variadic argument list. |
... | variadic arguments that depend to the library function that you have call. |
For the MMG2D_mmg2dlib function, you need to call the MMG2D_Init_mesh function with the following arguments : MMG2D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppMet,&your_metric,MMG5_ARG_end).
For the MMG2D_mmg2dls function, you need to call the MMG2D_Init_mesh function with the following arguments : MMG2D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppLs, &your_level_set,MMG5_ARG_end).
For the MMG2D_mmg2dmov function, you must call : MMG2D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppMet,&empty_metric,MMG5_ARG_ppDisp, &your_displacement, MMG5_ARG_end).
Definition at line 1911 of file API_functions_2d.c.
int MMG2D_Free_allSols | ( | MMG5_pMesh | mesh, |
MMG5_pSol * | sol | ||
) |
Deallocate an array of solution fields.
mesh | pointer to the mesh structure. |
sol | pointer to an array of solution structure (that stores solution fields). |
SUBROUTINE MMG2D_Free_allSols(mesh,sol,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 1905 of file API_functions_2d.c.
int MMG2D_Free_names | ( | const int | starter, |
... | |||
) |
Structure deallocations before return.
starter | dummy argument used to initialize the variadic argument list. |
... | variadic arguments that depend to the library function that you have call. |
For the MMG2D_mmg2dlib function, you need to call the MMG2D_Init_mesh function with the following arguments : MMG2D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppMet,&your_metric,MMG5_ARG_end).
For the MMG2D_mmg2dls function, you need to call the MMG2D_Init_mesh function with the following arguments : MMG2D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppLs, &your_level_set,MMG5_ARG_end).
For the MMG2D_mmg2dmov function, you must call : MMG2D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppMet,&empty_metric,MMG5_ARG_ppDisp, &your_displacement, MMG5_ARG_end).
Definition at line 1940 of file API_functions_2d.c.
int MMG2D_Free_structures | ( | const int | starter, |
... | |||
) |
Structure deallocations before return.
starter | dummy argument used to initialize the variadic argument list. |
... | variadic arguments that depend to the library function that you have call. |
For the MMG2D_mmg2dlib function, you need to call the MMG2D_Init_mesh function with the following arguments : MMG2D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppMet,&your_metric,MMG5_ARG_end).
For the MMG2D_mmg2dls function, you need to call the MMG2D_Init_mesh function with the following arguments : MMG2D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppLs, &your_level_set,MMG5_ARG_end).
For the MMG2D_mmg2dmov function, you must call : MMG2D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppMet,&empty_metric,MMG5_ARG_ppDisp, &your_displacement, MMG5_ARG_end).
Definition at line 1925 of file API_functions_2d.c.
int MMG2D_Get_edge | ( | MMG5_pMesh | mesh, |
MMG5_int * | e0, | ||
MMG5_int * | e1, | ||
MMG5_int * | ref, | ||
int * | isRidge, | ||
int * | isRequired | ||
) |
Get the vertices and reference of the next edge in the mesh.
mesh | pointer to the mesh structure. |
e0 | pointer to the first extremity of the edge. |
e1 | pointer to the second extremity of the edge. |
ref | pointer to the edge reference. |
isRidge | pointer to the flag saying if the edge is ridge. |
isRequired | pointer to the flag saying if the edge is required. |
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.
SUBROUTINE MMG2D_GET_EDGE(mesh,e0,e1,ref,isRidge,isRequired,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(OUT):: e0,e1
INTEGER(MMG5F_INT) :: ref
INTEGER :: isRidge,isRequired
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 1313 of file API_functions_2d.c.
int MMG2D_Get_edges | ( | MMG5_pMesh | mesh, |
MMG5_int * | edges, | ||
MMG5_int * | refs, | ||
int * | areRidges, | ||
int * | areRequired | ||
) |
Get the vertices and references of all edges in a mesh.
mesh | pointer to the mesh structure. |
edges | pointer to the array of edges. Vertices of the \(i^{th}\) edge are stored in edge[(i-1)*2]@2. |
refs | edges references. refs[i-1] is the ref of the \(i^{th}\) edge. |
areRidges | 1 if the edge is a ridge, 0 otherwise. |
areRequired | 1 if the edge is required, 0 otherwise. |
! SUBROUTINE MMG2D_GET_EDGES(mesh,edges,refs,areRidges,areRequired,retval)
! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
! INTEGER(MMG5F_INT), INTENT(IN) :: edges(*)
! INTEGER(MMG5F_INT), INTENT(OUT):: refs(*)
! INTEGER, INTENT(OUT) :: areRequired(*),areRidges(*)
! INTEGER, INTENT(OUT) :: retval
! END SUBROUTINE
Definition at line 1389 of file API_functions_2d.c.
int MMG2D_Get_ithSol_inSolsAtVertices | ( | MMG5_pSol | sol, |
int | i, | ||
double * | s, | ||
MMG5_int | pos | ||
) |
Get one out of several scalar solutions at a specific vertex.
sol | pointer to the array of solutions |
i | position of the solution field that we want to set. |
s | solution(s) at mesh vertex pos. |
pos | index of the vertex on which we get the solution. |
Get values of the ith field of the solution array at vertex pos. (pos from 1 to the number of vertices included and i from 1 to the number of solutions).
SUBROUTINE MMG2D_GET_ITHSOL_INSOLSATVERTICES(sol,i,s,pos,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: sol
INTEGER, INTENT(IN) :: i
INTEGER(MMG5F_INT), INTENT(IN) :: pos
REAL(KIND=8), DIMENSION(*),INTENT(OUT) :: s
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 1830 of file API_functions_2d.c.
int MMG2D_Get_ithSols_inSolsAtVertices | ( | MMG5_pSol | sol, |
int | i, | ||
double * | s | ||
) |
Get one out of several scalar solutions at all vertices in the mesh.
sol | pointer to the array of solutions |
i | position of the solution field that we want to get. |
s | array of solutions at mesh vertices. The solution at vertex k is given by s[k-1] for a scalar sol, s[2*(k-1)]@2 for a vectorial solution and s[3*(k-1)]@3 for a tensor solution. |
Get values of the solution at the ith field of the solution array. (i from 1 to nb_sols)
SUBROUTINE MMG2D_GET_ITHSOLS_INSOLSATVERTICES(sol,i,s,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: sol
INTEGER, INTENT(IN) :: i
REAL(KIND=8), DIMENSION(*),INTENT(OUT) :: s
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 1775 of file API_functions_2d.c.
int MMG2D_Get_meshSize | ( | MMG5_pMesh | mesh, |
MMG5_int * | np, | ||
MMG5_int * | nt, | ||
MMG5_int * | nquad, | ||
MMG5_int * | na | ||
) |
Get the number of vertices, triangles and edges of the mesh.
recover datas
mesh | pointer to the mesh structure. |
np | pointer to the number of vertices. |
nt | pointer to the number of triangles. |
nquad | pointer to the number of quads. |
na | pointer to the number of edges. |
SUBROUTINE MMG2D_GET_MESHSIZE(mesh,np,nt,nquad,na,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT) :: np,nt,nquad,na
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 663 of file API_functions_2d.c.
int MMG2D_Get_quadrilateral | ( | MMG5_pMesh | mesh, |
MMG5_int * | v0, | ||
MMG5_int * | v1, | ||
MMG5_int * | v2, | ||
MMG5_int * | v3, | ||
MMG5_int * | ref, | ||
int * | isRequired | ||
) |
Get the vertices and reference of the next quadrangle of the mesh.
mesh | pointer to the mesh structure. |
v0 | pointer to the first vertex of quadrangle. |
v1 | pointer to the second vertex of quadrangle. |
v2 | pointer to the third vertex of quadrangle. |
v3 | pointer to the fourth vertex of quadrangle. |
ref | pointer to the quadrangle reference. |
isRequired | pointer to the flag saying if quadrangle is required. |
Get the vertices v0,v1,v2,v3 and reference ref of the next quadrangle of mesh. This function is meant to be called in a loop over all quadrangles. When it has been called as many times as there are quadrangles, the internal loop counter will be reset.
SUBROUTINE MMG2D_GET_QUADRILATERAL(mesh,v0,v1,v2,v3,ref,isRequired,&
retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(OUT):: v0,v1,v2,v3
INTEGER(MMG5F_INT) :: ref
INTEGER :: isRequired
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 1139 of file API_functions_2d.c.
int MMG2D_Get_quadrilaterals | ( | MMG5_pMesh | mesh, |
MMG5_int * | quadra, | ||
MMG5_int * | refs, | ||
int * | areRequired | ||
) |
Get the vertices and references of all quadrangles of the mesh.
mesh | pointer to the mesh structure. |
quadra | pointer to the array of quadrangles vertices. Vertices of the \(i^{th}\) quadrangle are stored in quadra[(i-1)*4]@4. |
refs | pointer to the array of quadrlaterals references. References of the \(i^{th}\) quad is stored in refs[i-1]. |
areRequired | pointer to the array of flags saying if the quadrangles are required. areRequired[i-1]=1 if the \(i^{th}\) quad is required. |
! SUBROUTINE MMG2D_GET_QUADRILATERALS(mesh,quadra,refs,areRequired,&
! retval)
! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
! INTEGER(MMG5F_INT), DIMENSION(*),INTENT(OUT) :: quadra
! INTEGER(MMG5F_INT), DIMENSION(*) :: refs
! INTEGER, DIMENSION(*) :: areRequired
! INTEGER, INTENT(OUT) :: retval
! END SUBROUTINE
Definition at line 1210 of file API_functions_2d.c.
int MMG2D_Get_scalarSol | ( | MMG5_pSol | met, |
double * | s | ||
) |
Get the scalar solution value s of next element of a solution.
met | pointer to the sol structure. |
s | pointer to the scalar solution value. |
This function is meant to be called in a loop over all elements. When it has been called as many times as there are elements in the solution, the internal counter will be reset.
SUBROUTINE MMG2D_GET_SCALARSOL(met,s,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8), INTENT(OUT) :: s
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 1473 of file API_functions_2d.c.
int MMG2D_Get_scalarSols | ( | MMG5_pSol | met, |
double * | s | ||
) |
Get all elements of a scalar sol structure.
met | pointer to the sol structure. |
s | array of scalar solutions at mesh vertices. s[i-1] is the solution at vertex i. |
SUBROUTINE MMG2D_GET_SCALARSOLS(met,s,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8), DIMENSION(*),INTENT(OUT) :: s
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 1521 of file API_functions_2d.c.
int MMG2D_Get_solsAtVerticesSize | ( | MMG5_pMesh | mesh, |
MMG5_pSol * | sol, | ||
int * | nsols, | ||
MMG5_int * | nentities, | ||
int * | typSol | ||
) |
Get the number of elements and dimension of a solution defined on vertices.
mesh | pointer to the mesh structure. |
sol | pointer to an array of sol structure. |
nentities | pointer to the number of entities. |
typSol | array of size MMG5_NSOL_MAX to store type of each solution (scalar, vectorial, ..., see MMG5_type for possible values). |
SUBROUTINE MMG2D_GET_SOLSATVERTICESSIZE(mesh,sol,nsols,nentities,typSol,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
INTEGER :: nsols
INTEGER(MMG5F_INT) :: nentities
INTEGER :: typSol(*)
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 634 of file API_functions_2d.c.
int MMG2D_Get_solSize | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
int * | typEntity, | ||
MMG5_int * | np, | ||
int * | typSol | ||
) |
Get the number of solutions, their dimension and their type.
mesh | pointer to the mesh structure. |
sol | pointer to the sol structure. |
typEntity | pointer to the type of entities to which solutions are applied (see MMG5_entities for possible values). |
np | pointer to the number of solutions. |
typSol | pointer to the type of the solutions (scalar, vectorial, ..., see MMG5_type for possible values) |
SUBROUTINE MMG2D_GET_SOLSIZE(mesh,sol,typEntity,np,typSol,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
INTEGER :: typEntity,typSol
INTEGER(MMG5F_INT) :: np
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 609 of file API_functions_2d.c.
int MMG2D_Get_tensorSol | ( | MMG5_pSol | met, |
double * | m11, | ||
double * | m12, | ||
double * | m22 | ||
) |
Get the next element of a tensor sol structure.
met | pointer to the sol structure. |
m11 | pointer to the position (1,1) in the solution tensor. |
m12 | pointer to the position (1,2) in the solution tensor. |
m22 | pointer to the position (2,2) in the solution tensor. |
This function is meant to be called in a loop over all elements. When it has been called as many times as there are elements in the solution, the internal counter will be reset.
SUBROUTINE MMG2D_GET_TENSORSOL(met,m11,m12,m22,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8), INTENT(OUT) :: m11,m12,m22
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 1674 of file API_functions_2d.c.
int MMG2D_Get_tensorSols | ( | MMG5_pSol | met, |
double * | sols | ||
) |
Get all elements of a tensor sol structure.
met | pointer to the sol structure. |
sols | array of solutions at mesh vertices. sols[3*(i-1)]@3 is the solution at vertex i. |
SUBROUTINE MMG2D_GET_TENSORSOLS(met,sols,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8), DIMENSION(*), INTENT(OUT) :: sols
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 1731 of file API_functions_2d.c.
int MMG2D_Get_triangle | ( | MMG5_pMesh | mesh, |
MMG5_int * | v0, | ||
MMG5_int * | v1, | ||
MMG5_int * | v2, | ||
MMG5_int * | ref, | ||
int * | isRequired | ||
) |
Get the vertices and reference of the next triangle in the mesh.
mesh | pointer to the mesh structure. |
v0 | pointer to the first vertex of triangle. |
v1 | pointer to the second vertex of triangle. |
v2 | pointer to the third vertex of triangle. |
ref | pointer to the triangle reference. |
isRequired | pointer to the flag saying if triangle is required. |
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.
SUBROUTINE MMG2D_GET_TRIANGLE(mesh,v0,v1,v2,ref,isRequired,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(OUT):: v0,v1,v2
INTEGER(MMG5F_INT) :: ref
INTEGER :: isRequired
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 976 of file API_functions_2d.c.
double MMG2D_Get_triangleQuality | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
MMG5_int | k | ||
) |
Get the quality measure of a single triangle in the mesh.
mesh | pointer to the mesh structure. |
met | pointer to the metric structure. |
k | index of the triangle for which we want to get the quality. |
Get quality of triangle k.
SUBROUTINE MMG2D_GET_TRIANGLEQUALITY(mesh,met,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,met
INTEGER(MMG5F_INT), INTENT(IN):: k
REAL(KIND=8), INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 1419 of file API_functions_2d.c.
int MMG2D_Get_triangles | ( | MMG5_pMesh | mesh, |
MMG5_int * | tria, | ||
MMG5_int * | refs, | ||
int * | areRequired | ||
) |
Get the vertices and references of all triangles in the mesh.
mesh | pointer to the mesh structure. |
tria | pointer to the array of triangles vertices Vertices of the \(i^{th}\) tria are stored in tria[(i-1)*3]@3. |
refs | pointer to the array of triangles references. refs[i-1] is the ref of the \(i^{th}\) tria. |
areRequired | pointer to array of flags saying if triangles are required. areRequired[i-1]=1 if the \(i^{th}\) tria is required. |
! SUBROUTINE MMG2D_GET_TRIANGLES(mesh,tria,refs,areRequired,retval)
! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
! INTEGER(MMG5F_INT), DIMENSION(*),INTENT(OUT) :: tria
! INTEGER(MMG5F_INT), DIMENSION(*) :: refs
! INTEGER, DIMENSION(*) :: areRequired
! INTEGER, INTENT(OUT) :: retval
! END SUBROUTINE
Definition at line 1079 of file API_functions_2d.c.
int MMG2D_Get_vectorSol | ( | MMG5_pSol | met, |
double * | vx, | ||
double * | vy | ||
) |
Get the next element of a vector sol structure.
met | pointer to the sol structure. |
vx | x value of the vectorial solution. |
vy | y value of the vectorial solution. |
This function retrieves vectorial solution \((v_x,v_y)\) of the next element of met. It is meant to be called in a loop over all elements. When it has been called as many times as there are elements in the solution, the internal counter will be reset.
SUBROUTINE MMG2D_GET_VECTORSOL(met,vx,vy,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8), INTENT(OUT) :: vx,vy
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 1571 of file API_functions_2d.c.
int MMG2D_Get_vectorSols | ( | MMG5_pSol | met, |
double * | sols | ||
) |
Get all elements of a vector sol structure.
met | pointer to the sol structure. |
sols | array to store the data in the order \([x_1, y_1, x_2, \ldots, y_N]\) |
SUBROUTINE MMG2D_GET_VECTORSOLS(met,sols,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8), DIMENSION(*),INTENT(OUT) :: sols
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 1624 of file API_functions_2d.c.
int MMG2D_Get_vertex | ( | MMG5_pMesh | mesh, |
double * | c0, | ||
double * | c1, | ||
MMG5_int * | ref, | ||
int * | isCorner, | ||
int * | isRequired | ||
) |
Get the coordinates and reference ref of the next vertex of a mesh.
mesh | pointer to the mesh structure. |
c0 | pointer to the coordinate of the vertex along the first dimension. |
c1 | pointer to the coordinate of the vertex along the second dimension. |
ref | pointer to the vertex reference. |
isCorner | pointer to the flag saying if vertex is corner. |
isRequired | pointer to the flag saying if vertex is required. |
This function retrieves the coordinates c0 and c1, and reference ref of the next vertex of a mesh. It is meant to be used in a loop over all vertices. When this function has been called as many times as there are vertices, the internal loop counter will be reset. To obtain data for a specific vertex, the MMG2D_GetByIdx_vertex function can be used instead.
SUBROUTINE MMG2D_GET_VERTEX(mesh,c0,c1,ref,isCorner,isRequired,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
REAL(KIND=8), INTENT(OUT) :: c0,c1
INTEGER(MMG5F_INT) :: ref
INTEGER :: isCorner,isRequired
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 752 of file API_functions_2d.c.
int MMG2D_Get_vertices | ( | MMG5_pMesh | mesh, |
double * | vertices, | ||
MMG5_int * | refs, | ||
int * | areCorners, | ||
int * | areRequired | ||
) |
Get the coordinates and references of all vertices in the mesh.
mesh | pointer to the mesh structure. |
vertices | pointer to the array of vertex coordinates. The coordinates of the \(i^{th}\) vertex are stored in vertices[(i-1)*2]@2. |
refs | pointer to the array of references. The ref of the \(i^th\) vertex is stored in refs[i-1]. |
areCorners | pointer to the array of flags saying if vertices are corners. areCorners[i-1]=1 if the \(i^{th}\) vertex is corner. |
areRequired | pointer to the array of flags saying if vertices are required. areRequired[i-1]=1 if the \(i^{th}\) vertex is required. |
! SUBROUTINE MMG2D_GET_VERTICES(mesh,vertices,refs,areCorners,&
! areRequired,retval)
! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
! REAL(KIND=8),DIMENSION(*), INTENT(OUT) :: vertices
! INTEGER(MMG5F_INT), DIMENSION(*) :: refs
! INTEGER, DIMENSION(*) :: areCorners,areRequired
! INTEGER, INTENT(OUT) :: retval
! END SUBROUTINE
Definition at line 839 of file API_functions_2d.c.
int MMG2D_GetByIdx_vertex | ( | MMG5_pMesh | mesh, |
double * | c0, | ||
double * | c1, | ||
MMG5_int * | ref, | ||
int * | isCorner, | ||
int * | isRequired, | ||
MMG5_int | idx | ||
) |
Get the coordinates and reference of a specific vertex in the mesh.
mesh | pointer to the mesh structure. |
c0 | pointer to the coordinate of the vertex along the first dimension. |
c1 | pointer to the coordinate of the vertex along the second dimension. |
ref | pointer to the vertex reference. |
isCorner | pointer to the flag saying if vertex is corner. |
isRequired | pointer to the flag saying if vertex is required. |
idx | index of vertex to get. |
Get coordinates c0, c1 and reference ref of vertex idx of mesh.
SUBROUTINE MMG2D_GETBYIDX_VERTEX(mesh,c0,c1,ref,isCorner,isRequired,idx,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
REAL(KIND=8), INTENT(OUT) :: c0,c1
INTEGER :: isCorner,isRequired
INTEGER(MMG5F_INT) :: ref,idx
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 779 of file API_functions_2d.c.
void MMG2D_Init_fileNames | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol | ||
) |
Initialize file names to their default values.
mesh | pointer to the mesh structure. |
sol | pointer to the sol structure. |
SUBROUTINE MMG2D_INIT_FILENAMES(mesh,sol)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
END SUBROUTINE
Definition at line 56 of file API_functions_2d.c.
int MMG2D_Init_mesh | ( | const int | starter, |
... | |||
) |
Initialize a mesh structure and optionally the associated solution and metric structures.
starter | dummy argument used to initialize the variadic argument list |
... | variadic arguments. |
For the MMG2D_mmgslib function, you need to call the MMG2D_Init_mesh function with the following arguments : MMG2D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppMet, &your_metric,MMG5_ARG_end).
For the MMG2D_mmgsls function, you need to call the MMG2D_Init_mesh function with the following arguments : MMG2D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppLs, &your_level_set,MMG5_ARG_end).
Here, your_mesh is a MMG5_pMesh, your_metric and your_level_set are MMG5_pSol.
Definition at line 43 of file API_functions_2d.c.
void MMG2D_Init_parameters | ( | MMG5_pMesh | mesh | ) |
Initialize the input parameters (stored in the Info structure).
mesh | pointer to the mesh structure. |
SUBROUTINE MMG2D_INIT_PARAMETERS(mesh)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
END SUBROUTINE
Definition at line 84 of file API_functions_2d.c.
int MMG2D_Set_corner | ( | MMG5_pMesh | mesh, |
MMG5_int | k | ||
) |
Assign the "corner" attribute to a vertex.
mesh | pointer to the mesh structure. |
k | vertex index. |
Set the "corner" attribute at vertex k. This affects how the vertex is treated during remeshing.
SUBROUTINE MMG2D_SET_CORNER(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(IN):: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 727 of file API_functions_2d.c.
int MMG2D_Set_dparameter | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
int | dparam, | ||
double | val | ||
) |
Set double parameter dparam to value val.
mesh | pointer to the mesh structure. |
sol | pointer to the sol structure. |
dparam | double parameter to set (see MMG2D_Param structure). |
val | value of the parameter. |
SUBROUTINE MMG2D_SET_DPARAMETER(mesh,sol,dparam,val,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
MMG5_DATA_PTR_T :: sol
INTEGER, INTENT(IN) :: dparam
REAL(KIND=8), INTENT(IN) :: val
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 283 of file API_functions_2d.c.
int MMG2D_Set_edge | ( | MMG5_pMesh | mesh, |
MMG5_int | v0, | ||
MMG5_int | v1, | ||
MMG5_int | ref, | ||
MMG5_int | pos | ||
) |
Define a single edge.
mesh | pointer to the mesh structure. |
v0 | first vertex of edge. |
v1 | second vertex of edge. |
ref | edge reference. |
pos | edge position in the mesh. |
Define an edge with vertices v0, v1 and reference ref at position pos in the mesh structure (pos from 1 to the number of edges included).
SUBROUTINE MMG2D_SET_EDGE(mesh,v0,v1,ref,pos,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(IN):: v0,v1
INTEGER(MMG5F_INT), INTENT(IN):: pos,ref
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 1240 of file API_functions_2d.c.
int MMG2D_Set_edges | ( | MMG5_pMesh | mesh, |
MMG5_int * | edges, | ||
MMG5_int * | refs | ||
) |
Set the vertices and references of all edges in a mesh.
mesh | pointer to the mesh structure. |
edges | pointer to the array of edges. Vertices of the \(i^{th}\) edge are stored in edge[(i-1)*2]@2. |
refs | edges references. refs[i-1] is the ref of the \(i^{th}\) edge. |
SUBROUTINE MMG2D_SET_EDGES(mesh,edges,refs,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(IN):: edges(*),refs(*)
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 1369 of file API_functions_2d.c.
int MMG2D_Set_inputMeshName | ( | MMG5_pMesh | mesh, |
const char * | meshin | ||
) |
Set the name of the input mesh.
mesh | pointer to the mesh structure. |
meshin | input mesh name. |
SUBROUTINE MMG2D_SET_INPUTMESHNAME(mesh,meshin,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
CHARACTER(LEN=*), INTENT(IN) :: meshin
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 62 of file API_functions_2d.c.
int MMG2D_Set_inputParamName | ( | MMG5_pMesh | mesh, |
const char * | fparamin | ||
) |
Set the name of the input parameter file.
mesh | pointer to the mesh structure. |
fparamin | name of the input parameter file. |
SUBROUTINE MMG2D_SET_INPUTPARAMNAME(mesh,fparamin,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
CHARACTER(LEN=*), INTENT(IN) :: fparamin
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 71 of file API_functions_2d.c.
int MMG2D_Set_inputSolName | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
const char * | solin | ||
) |
Set the name of the input solution file.
mesh | pointer to the mesh structure. |
sol | pointer to the sol structure. |
solin | name of the input solution file. |
SUBROUTINE MMG2D_SET_INPUTSOLNAME(mesh,sol,solin,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: solin
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 67 of file API_functions_2d.c.
int MMG2D_Set_iparameter | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
int | iparam, | ||
MMG5_int | val | ||
) |
Set integer parameter iparam to value val.
mesh | pointer to the mesh structure. |
sol | pointer to the sol structure (unused). |
iparam | integer parameter to set (see MMG2D_Param structure). |
val | value for the parameter. |
SUBROUTINE MMG2D_SET_IPARAMETER(mesh,sol,iparam,val,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
MMG5_DATA_PTR_T :: sol
INTEGER, INTENT(IN) :: iparam
INTEGER(MMG5F_INT), INTENT(IN):: val
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 112 of file API_functions_2d.c.
int MMG2D_Set_ithSol_inSolsAtVertices | ( | MMG5_pSol | sol, |
int | i, | ||
double * | s, | ||
MMG5_int | pos | ||
) |
Set a single element of one out of multiple solution fields that are defined on vertices.
sol | pointer to the array of solutions |
i | position of the solution field that we want to set. |
s | solution(s) at mesh vertex pos. |
pos | index of the vertex on which we set the solution. |
Set values of the solution at the ith field of the solution array. (pos from 1 to nb_vertices included and i from 1 to nb_sols).
SUBROUTINE MMG2D_SET_ITHSOL_INSOLSATVERTICES(sol,i,s,pos,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: sol
INTEGER, INTENT(IN) :: i
INTEGER(MMG5F_INT), INTENT(IN) :: pos
REAL(KIND=8), DIMENSION(*),INTENT(OUT) :: s
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 1803 of file API_functions_2d.c.
int MMG2D_Set_ithSols_inSolsAtVertices | ( | MMG5_pSol | sol, |
int | i, | ||
double * | s | ||
) |
Set all elements of one out of multiple solution fields that are defined on vertices.
sol | pointer to the array of solutions |
i | position of the solution field that we want to set. |
s | array of solutions at mesh vertices. The solution at vertex k is given by s[k-1] for a scalar sol, s[2*(k-1)]@2 for a vectorial solution and s[3*(k-1)]@3 for a tensor solution. |
Set scalar values of the solution at the ith field of the solution array. (i from 1 to nb_sols)
SUBROUTINE MMG2D_SET_ITHSOLS_INSOLSATVERTICES(sol,i,s,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: sol
INTEGER, INTENT(IN) :: i
REAL(KIND=8), DIMENSION(*),INTENT(OUT) :: s
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 1747 of file API_functions_2d.c.
int MMG2D_Set_localParameter | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
int | typ, | ||
MMG5_int | ref, | ||
double | hmin, | ||
double | hmax, | ||
double | hausd | ||
) |
Set local parameters.
mesh | pointer to the mesh structure. |
sol | pointer to the sol structure. |
typ | type of entity (triangle, edge,...). |
ref | reference of the entity. |
hmin | minimal edge size. |
hmax | maximal edge size. |
hausd | value of the Hausdorff number. |
Set local parameters: set the Hausdorff distance, minimal desired edge length, and maximal desired edge length for all entities of type typ and reference ref.
SUBROUTINE MMG2D_SET_LOCALPARAMETER(mesh,sol,typ,ref,&
hmin,hmax,hausd,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
INTEGER, INTENT(IN) :: typ
INTEGER(MMG5F_INT), INTENT(IN):: ref
REAL(KIND=8), INTENT(IN) :: hmin,hmax,hausd
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 380 of file API_functions_2d.c.
int MMG2D_Set_lsBaseReference | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
MMG5_int | br | ||
) |
Set level-set base reference.
mesh | pointer to the mesh structure. |
sol | pointer to the sol structure. |
br | new level-set base reference. |
Set a new level-set base reference of ref br in ls discretization mode. Based references are boundary conditions to which implicit domain can be attached. All implicit volumes that are not attached to listed base references are deleted as spurious volumes by the rmc option.
SUBROUTINE MMG2D_SET_LSBASEREFERENCE(mesh,sol,br,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
INTEGER(MMG5F_INT), INTENT(IN):: br
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 473 of file API_functions_2d.c.
int MMG2D_Set_meshSize | ( | MMG5_pMesh | mesh, |
MMG5_int | np, | ||
MMG5_int | nt, | ||
MMG5_int | nquad, | ||
MMG5_int | na | ||
) |
Set the numbers of entities in the mesh.
mesh | pointer to the mesh structure. |
np | number of vertices. |
nt | number of triangles. |
nquad | number of quads. |
na | number of edges. |
Set the number of vertices, triangles, quadrangles and edges of the mesh and allocate the associated tables. If call twice, reset the whole mesh to realloc it at the new size
SUBROUTINE MMG2D_SET_MESHSIZE(mesh,np,nt,nquad,na,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT) :: np,nt,nquad,na
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 478 of file API_functions_2d.c.
int MMG2D_Set_multiMat | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
MMG5_int | ref, | ||
int | split, | ||
MMG5_int | rmin, | ||
MMG5_int | rplus | ||
) |
Set the reference mapping for the elements of ref ref in LS discretization mode.
mesh | pointer to the mesh structure. |
sol | pointer to the sol structure. |
ref | input tetra reference. |
split | MMG5_MMAT_NoSplit if the entity must not be split, MMG5_MMAT_Split otherwise |
rmin | reference for the negative side after LS discretization |
rplus | reference for the positive side after LS discretization |
With this function you can determine which references will be given to the triangles on both sides of the level set, after discretization. Negative and positive here refer to areas where the function is smaller or larger, respectively, than the isovalue of the level set. SUBROUTINE MMG2D_SET_MULTIMAT(mesh,sol,ref,split,rmin,rplus,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
INTEGER(MMG5F_INT), INTENT(IN):: ref,rmin,rplus
INTEGER, INTENT(IN) :: split
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 468 of file API_functions_2d.c.
int MMG2D_Set_outputMeshName | ( | MMG5_pMesh | mesh, |
const char * | meshout | ||
) |
Set the name of the output mesh file.
mesh | pointer to the mesh structure. |
meshout | name of the output mesh file. |
SUBROUTINE MMG2D_SET_OUTPUTMESHNAME(mesh,meshout,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
CHARACTER(LEN=*), INTENT(IN) :: meshout
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 75 of file API_functions_2d.c.
int MMG2D_Set_outputSolName | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
const char * | solout | ||
) |
Set the name of the output solution file.
mesh | pointer to the mesh structure. |
sol | pointer to the sol structure. |
solout | name of the output solution file. |
SUBROUTINE MMG2D_SET_OUTPUTSOLNAME(mesh,sol,solout,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: solout
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 80 of file API_functions_2d.c.
int MMG2D_Set_parallelEdge | ( | MMG5_pMesh | mesh, |
MMG5_int | k | ||
) |
Give edge k the "parallel" attribute.
mesh | pointer to the mesh structure. |
k | edge index. |
SUBROUTINE MMG2D_SET_PARALLELEDGE(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(IN):: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 1295 of file API_functions_2d.c.
int MMG2D_Set_quadrilateral | ( | MMG5_pMesh | mesh, |
MMG5_int | v0, | ||
MMG5_int | v1, | ||
MMG5_int | v2, | ||
MMG5_int | v3, | ||
MMG5_int | ref, | ||
MMG5_int | pos | ||
) |
Set the vertices and reference of a single quadrangle in a mesh.
mesh | pointer to the mesh structure. |
v0 | first vertex of quadrangle. |
v1 | second vertex of quadrangle. |
v2 | third vertex of quadrangle. |
v3 | fourth vertex of quadrangle. |
ref | quadrangle reference. |
pos | quadrangle position in the mesh. |
Define a quadrangle with vertices v0, v1,v2,v3 and reference ref at position pos in mesh structure (from 1 to nb_quad included).
SUBROUTINE MMG2D_SET_QUADRILATERAL(mesh,v0,v1,v2,v3,ref,pos,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(IN):: v0,v1,v2,v3,ref,pos
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 1105 of file API_functions_2d.c.
int MMG2D_Set_quadrilaterals | ( | MMG5_pMesh | mesh, |
MMG5_int * | quadra, | ||
MMG5_int * | refs | ||
) |
Set the vertices and references of all quadrangles in a mesh.
mesh | pointer to the mesh structure. |
quadra | vertices of the quadrangles of the mesh Vertices of the \(i^{th}\) quadrangle are stored in quadra[(i-1)*4]@4. |
refs | array of references. The reference of the \(i^{th}\) quadrangle is stored in refs[i-1]. |
! SUBROUTINE MMG2D_SET_QUADRILATERALS(mesh,quadra,refs,retval)
! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
! INTEGER(MMG5F_INT), DIMENSION(*), INTENT(IN) :: quadra,refs
! INTEGER, INTENT(OUT) :: retval
! END SUBROUTINE
Definition at line 1185 of file API_functions_2d.c.
int MMG2D_Set_requiredEdge | ( | MMG5_pMesh | mesh, |
MMG5_int | k | ||
) |
Give edge k the "required" attribute.
mesh | pointer to the mesh structure. |
k | edge index. |
SUBROUTINE MMG2D_SET_REQUIREDEDGE(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(IN):: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 1271 of file API_functions_2d.c.
int MMG2D_Set_requiredTriangle | ( | MMG5_pMesh | mesh, |
MMG5_int | k | ||
) |
Give triangle k the "required" attribute.
mesh | pointer to the mesh structure. |
k | triangle index. |
SUBROUTINE MMG2D_SET_REQUIREDTRIANGLE(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(IN):: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 950 of file API_functions_2d.c.
int MMG2D_Set_requiredVertex | ( | MMG5_pMesh | mesh, |
MMG5_int | k | ||
) |
Assign the "required" attribute to a vertex.
mesh | pointer to the mesh structure. |
k | vertex index. |
Set vertex k as required (k from 1 to the number of vertices included). This prevents the remesher from moving the vertex.
SUBROUTINE MMG2D_SET_REQUIREDVERTEX(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(IN):: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 739 of file API_functions_2d.c.
int MMG2D_Set_scalarSol | ( | MMG5_pSol | met, |
double | s, | ||
MMG5_int | pos | ||
) |
Set a single value of a sol structure.
met | pointer to the sol structure. |
s | solution scalar value. |
pos | position of the solution in the mesh. |
Set scalar value s at position pos in solution structure. (pos from 1 to nb_vertices included).
SUBROUTINE MMG2D_SET_SCALARSOL(met,s,pos,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8), INTENT(IN) :: s
INTEGER(MMG5F_INT), INTENT(IN):: pos
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 1443 of file API_functions_2d.c.
int MMG2D_Set_scalarSols | ( | MMG5_pSol | met, |
double * | s | ||
) |
Set all values of a scalar sol structure.
met | pointer to the sol structure. |
s | array of scalar solutions values. s[i-1] is the solution at vertex i. |
SUBROUTINE MMG2D_SET_SCALARSOLS(met,s,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8),DIMENSION(*), INTENT(IN) :: s
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 1504 of file API_functions_2d.c.
int MMG2D_Set_solsAtVerticesSize | ( | MMG5_pMesh | mesh, |
MMG5_pSol * | sol, | ||
int | nsols, | ||
MMG5_int | nentities, | ||
int * | typSol | ||
) |
Initialize an array of solutions field defined at vertices.
mesh | pointer to the mesh structure. |
sol | pointer to an allocatable sol structure. |
nsols | number of solutions per entity |
nentities | number of entities |
typSol | Array of size nsol listing the type of the solutions (scalar, vectorial, ..., see MMG5_type for possible values). |
Initialize an array of solutions field defined at vertices: set dimension, types and number of data. To use to initialize an array of solution fields (not used by Mmg itself).
SUBROUTINE MMG2D_SET_SOLSATVERTICESSIZE(mesh,sol,nsols,nentities,typSol,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
INTEGER, INTENT(IN) :: nsols
INTEGER(MMG5F_INT), INTENT(IN):: nentities
INTEGER, INTENT(IN) :: typSol(*)
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Sol tab allocation
Definition at line 564 of file API_functions_2d.c.
int MMG2D_Set_solSize | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
int | typEntity, | ||
MMG5_int | np, | ||
int | typSol | ||
) |
Set the size and type of a solution field.
mesh | pointer to the mesh structure. |
sol | pointer to the sol structure. |
typEntity | type of solutions entities (vertices, triangles, ..., see MMG5_entities for possible values). |
np | number of solutions. |
typSol | type of solution (scalar, vectorial, ..., see MMG5_type for possible values). |
Initialize an array of solution field: set dimension, types and number of data. To use to initialize an array of solution fields (not used by Mmg itself).
SUBROUTINE MMG2D_SET_SOLSIZE(mesh,sol,typEntity,np,typSol,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
INTEGER, INTENT(IN) :: typEntity
INTEGER(MMG5F_INT), INTENT(IN):: np
INTEGER, INTENT(IN) :: typSol
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 520 of file API_functions_2d.c.
int MMG2D_Set_tensorSol | ( | MMG5_pSol | met, |
double | m11, | ||
double | m12, | ||
double | m22, | ||
MMG5_int | pos | ||
) |
Set a single element of a tensor sol structure.
met | pointer to the sol structure. |
m11 | value at position (1,1) in the solution tensor. |
m12 | value at position (1,2) in the solution tensor. |
m22 | value at position (2,2) in the solution tensor. |
pos | position of the solution in the mesh. |
Set tensor value s at position pos in solution structure (pos from 1 to nb_vertices included).
SUBROUTINE MMG2D_SET_TENSORSOL(met,m11,m12,m22,pos,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8), INTENT(IN) :: m11,m12,m22
INTEGER(MMG5F_INT), INTENT(IN):: pos
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 1640 of file API_functions_2d.c.
int MMG2D_Set_tensorSols | ( | MMG5_pSol | met, |
double * | sols | ||
) |
Set all elements of a tensor sol structure.
met | pointer to the sol structure. |
sols | array of tensorial solutions. sols[3*(i-1)]@3 is the solution at vertex i |
Set tensorial values at position pos in solution structure.
SUBROUTINE MMG2D_SET_TENSORSOLS(met,sols,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8),DIMENSION(*), INTENT(IN) :: sols
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 1708 of file API_functions_2d.c.
int MMG2D_Set_triangle | ( | MMG5_pMesh | mesh, |
MMG5_int | v0, | ||
MMG5_int | v1, | ||
MMG5_int | v2, | ||
MMG5_int | ref, | ||
MMG5_int | pos | ||
) |
Set the vertices and reference of a single triangle in a mesh.
mesh | pointer to the mesh structure. |
v0 | first vertex of triangle. |
v1 | second vertex of triangle. |
v2 | third vertex of triangle. |
ref | triangle reference. |
pos | triangle position in the mesh. |
This function defines a triangle with vertices v0, v1, v2 and reference ref at position pos in mesh structure (from 1 to the number of triangles included).
SUBROUTINE MMG2D_SET_TRIANGLE(mesh,v0,v1,v2,ref,pos,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(IN):: v0,v1,v2,ref,pos
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 874 of file API_functions_2d.c.
int MMG2D_Set_triangles | ( | MMG5_pMesh | mesh, |
MMG5_int * | tria, | ||
MMG5_int * | refs | ||
) |
Set the vertices and references of all triangles in a mesh.
mesh | pointer to the mesh structure. |
tria | pointer to the array of the triangle's vertices. The vertices of the \(i^{th}\) tria are stored in tria[(i-1)*3]@3. |
refs | pointer to the array of the triangle references. refs[i-1] is the ref of the \(i^{th}\) tria. |
This function sets the vertices and references of all triangles in a mesh.
! SUBROUTINE MMG2D_SET_TRIANGLES(mesh,tria,refs,retval)
! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
! INTEGER(MMG5F_INT),DIMENSION(*), INTENT(IN) :: tria,refs
! INTEGER, INTENT(OUT) :: retval
! END SUBROUTINE
Definition at line 1021 of file API_functions_2d.c.
int MMG2D_Set_vectorSol | ( | MMG5_pSol | met, |
double | vx, | ||
double | vy, | ||
MMG5_int | pos | ||
) |
Set a single vector value in a sol structure.
met | pointer to the sol structure. |
vx | x value of the vectorial solution. |
vy | y value of the vectorial solution. |
pos | position of the solution in the mesh (begins at 1). |
Set vectorial value \((v_x,v_y)\) at position pos in solution structure. ( pos from 1 to nb_vertices included).
SUBROUTINE MMG2D_SET_VECTORSOL(met,vx,vy,pos,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8), INTENT(IN) :: vx,vy
INTEGER(MMG5F_INT), INTENT(IN):: pos
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 1530 of file API_functions_2d.c.
int MMG2D_Set_vectorSols | ( | MMG5_pSol | met, |
double * | sols | ||
) |
Set all values in a vector sol structure.
met | pointer to the sol structure. |
sols | array of vectorial solutions sols[2*(i-1)]@2 is the solution at vertex i |
Set vectorial solutions at mesh vertices
SUBROUTINE MMG2D_SET_VECTORSOLS(met,sols,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8),DIMENSION(*), INTENT(IN):: sols
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 1602 of file API_functions_2d.c.
int MMG2D_Set_vertex | ( | MMG5_pMesh | mesh, |
double | c0, | ||
double | c1, | ||
MMG5_int | ref, | ||
MMG5_int | pos | ||
) |
Set the coordinates and reference of a single vertex.
mesh | pointer to the mesh structure. |
c0 | coordinate of the vertex along the first dimension. |
c1 | coordinate of the vertex along the second dimension. |
ref | vertex reference. |
pos | position of the vertex in the mesh. |
Set vertex of coordinates c0, c1 and reference ref at position pos in mesh structure (from 1 to nb_vertices included).
SUBROUTINE MMG2D_SET_VERTEX(mesh,c0,c1,ref,pos,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
REAL(KIND=8), INTENT(IN) :: c0,c1
INTEGER(MMG5F_INT), INTENT(IN):: ref,pos
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 687 of file API_functions_2d.c.
int MMG2D_Set_vertices | ( | MMG5_pMesh | mesh, |
double * | vertices, | ||
MMG5_int * | refs | ||
) |
Set the coordinates and references of all vertices in the mesh.
mesh | pointer to the mesh structure. |
vertices | array of vertex coordinates in the order \([x_1, y_1, x_2, \ldots, y_N]\) |
refs | array of vertex references \([r_1, r_2, \ldots, r_N]\) |
! SUBROUTINE MMG2D_SET_VERTICES(mesh,vertices,refs,retval)
! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
! REAL(KIND=8), DIMENSION(*),INTENT(IN) :: vertices
! INTEGER(MMG5F_INT),DIMENSION(*), INTENT(IN):: refs
! INTEGER, INTENT(OUT) :: retval
! END SUBROUTINE
Definition at line 811 of file API_functions_2d.c.
int MMG2D_Unset_corner | ( | MMG5_pMesh | mesh, |
MMG5_int | k | ||
) |
Remove the "corner" attribute from a vertex.
mesh | pointer to the mesh structure. |
k | vertex index. |
Remove corner attribute from vertex k (from 1 to the number of vertices included).
SUBROUTINE MMG2D_UNSET_CORNER(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(IN):: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 733 of file API_functions_2d.c.
int MMG2D_Unset_requiredEdge | ( | MMG5_pMesh | mesh, |
MMG5_int | k | ||
) |
Remove the "required" attribute from edge k.
mesh | pointer to the mesh structure. |
k | edge index. |
SUBROUTINE MMG2D_UNSET_REQUIREDEDGE(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(IN):: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 1283 of file API_functions_2d.c.
int MMG2D_Unset_requiredTriangle | ( | MMG5_pMesh | mesh, |
MMG5_int | k | ||
) |
Remove the "required" attribute from triangle k.
mesh | pointer to the mesh structure. |
k | triangle index. |
SUBROUTINE MMG2D_UNSET_REQUIREDTRIANGLE(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(IN):: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 963 of file API_functions_2d.c.
int MMG2D_Unset_requiredVertex | ( | MMG5_pMesh | mesh, |
MMG5_int | k | ||
) |
Remove the "required" attribute from a vertex.
mesh | pointer to the mesh structure. |
k | vertex index. |
This function removes the "required" attribute from vertex k.
SUBROUTINE MMG2D_UNSET_REQUIREDVERTEX(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER(MMG5F_INT), INTENT(IN):: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Definition at line 746 of file API_functions_2d.c.