mmg2d
libmmg2d_tools.c File Reference

Tools functions for the mmg2d library. More...

#include "mmg2d.h"
Include dependency graph for libmmg2d_tools.c:

Functions

void MMG2D_setfunc (MMG5_pMesh mesh, MMG5_pSol met)
 
int MMG2_parsop (MMG5_pMesh mesh, MMG5_pSol met)
 
int MMG2D_Get_adjaTri (MMG5_pMesh mesh, int kel, int listri[3])
 Return adjacent elements of a triangle. More...
 
int MMG2D_Get_adjaVertices (MMG5_pMesh mesh, int ip, int lispoi[MMG2D_LMAX])
 Return adjacent elements of a triangle. More...
 
int MMG2D_Get_adjaVerticesFast (MMG5_pMesh mesh, int ip, int start, int lispoi[MMG2D_LMAX])
 Return adjacent elements of a triangle. More...
 
int MMG2D_Get_triFromEdge (MMG5_pMesh mesh, int ked, int *ktri, int *ied)
 
int MMG2D_Set_constantSize (MMG5_pMesh mesh, MMG5_pSol met)
 
void MMG2D_Reset_verticestags (MMG5_pMesh mesh)
 
void MMG2D_Free_triangles (MMG5_pMesh mesh)
 
void MMG2D_Free_edges (MMG5_pMesh mesh)
 
void MMG2D_Free_solutions (MMG5_pMesh mesh, MMG5_pSol sol)
 

Detailed Description

Tools functions for the mmg2d library.

Author
Algiane Froehly (Inria/UBordeaux)
Version
5
Date
01 2014

Function Documentation

◆ MMG2_parsop()

int MMG2_parsop ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh
metpointer toward the metric
Returns
1 if success, 0 if fail

Read parameter file DEFAULT.mmg2d

Here is the caller graph for this function:

◆ MMG2D_Free_edges()

void MMG2D_Free_edges ( MMG5_pMesh  mesh)
Parameters
meshpointer toward the mesh structure

Free the mesh edges (and the associated xpoints).

Remarks
Fortran interface:

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

Here is the caller graph for this function:

◆ MMG2D_Free_solutions()

void MMG2D_Free_solutions ( MMG5_pMesh  mesh,
MMG5_pSol  sol 
)
Parameters
meshpointer toward the mesh structure
solpointer toward the solution structure

Free the solution.

Remarks
Fortran interface:

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

Here is the caller graph for this function:

◆ MMG2D_Free_triangles()

void MMG2D_Free_triangles ( MMG5_pMesh  mesh)
Parameters
meshpointer toward the mesh structure

Free the mesh elements (and the adjacency).

Remarks
Fortran interface:

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

Here is the caller graph for this function:

◆ MMG2D_Get_adjaTri()

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

Return adjacent elements of a triangle.

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

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

Remarks
Fortran interface:

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

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

◆ MMG2D_Get_adjaVertices()

int MMG2D_Get_adjaVertices ( MMG5_pMesh  mesh,
int  ip,
int  lispoi[MMG2D_LMAX] 
)
inline

Return adjacent elements of a triangle.

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

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

Remarks
Fortran interface:

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

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

◆ MMG2D_Get_adjaVerticesFast()

int MMG2D_Get_adjaVerticesFast ( MMG5_pMesh  mesh,
int  ip,
int  start,
int  lispoi[MMG2D_LMAX] 
)
inline

Return adjacent elements of a triangle.

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

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

Remarks
Fortran interface:

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

Here is the caller graph for this function:

◆ MMG2D_Get_triFromEdge()

int MMG2D_Get_triFromEdge ( MMG5_pMesh  mesh,
int  ked,
int *  ktri,
int *  ied 
)
Parameters
meshpointer toward the mesh structure.
kedindex of the boundary edge.
ktripointer toward the index of the tri (filled by the function).
iedpointer toward the index of the edge of the triangle ktri that correspond to the boundary edge ked.
Returns
0 if fail, 1 otherwise

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

Remarks
Fortran interface:

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

Here is the caller graph for this function:

◆ MMG2D_Reset_verticestags()

void MMG2D_Reset_verticestags ( MMG5_pMesh  mesh)
Parameters
meshpointer toward the mesh structure

Reset the vertices tag (be careful all the tags are deleted).

Remarks
Fortran interface:

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

Here is the caller graph for this function:

◆ MMG2D_Set_constantSize()

int MMG2D_Set_constantSize ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh structure
metpointer toward the sol structure
Returns
1 if success

Compute constant size map according to mesh->info.hsiz

Remarks
Fortran interface:

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

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

◆ MMG2D_setfunc()

void MMG2D_setfunc ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward a sol structure.

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

Remarks
Fortran interface:

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

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