mmg2d
|
Tools functions for the mmg2d library. More...
#include "mmg2d.h"
Tools functions for the mmg2d library.
int MMG2D_Compute_eigenv | ( | double | m[3], |
double | lambda[2], | ||
double | vp[2][2] | ||
) |
m | upper part of a symetric matric diagonalizable in |R |
lambda | array of the metric eigenvalues |
vp | array of the metric eigenvectors |
Compute the real eigenvalues and eigenvectors of a symetric matrice m whose upper part is provided (m11, m12, m22, in this order). lambda[0] is the eigenvalue associated to the eigenvector ( v[0][0], v[0,1] ) in C and to the eigenvector v(1,:) in fortran lambda[1] is the eigenvalue associated to the eigenvector ( v[1][0], v[1,1] ) in C and to the eigenvector v(2,:) in fortran
SUBROUTINE MMG2D_COMPUTE_EIGENV(m,lambda,vp,retval)
REAL(KIND=8), INTENT(IN) :: m(*)
REAL(KIND=8), INTENT(OUT) :: lambda(*),vp(*)
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
int MMG2D_defaultValues | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh structure. |
Print the default parameters values.
void MMG2D_Free_edges | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh structure |
Free the mesh edges (and the associated xpoints).
SUBROUTINE MMG2D_FREE_EDGES(mesh)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
END SUBROUTINE
void MMG2D_Free_solutions | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol | ||
) |
mesh | pointer toward the mesh structure |
sol | pointer toward the solution structure |
Free the solution.
SUBROUTINE MMG2D_FREE_SOLUTIONS(mesh,sol)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
END SUBROUTINE
void MMG2D_Free_triangles | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh structure |
Free the mesh elements (and the adjacency).
SUBROUTINE MMG2D_FREE_TRIANGLES(mesh)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
END SUBROUTINE
int MMG2D_freeLocalPar | ( | MMG5_pMesh | mesh | ) |
int MMG2D_Get_adjaTri | ( | MMG5_pMesh | mesh, |
int | kel, | ||
int | listri[3] | ||
) |
Return adjacent elements of a triangle.
mesh | pointer toward the mesh structure. |
kel | triangle index. |
listri | pointer toward the table of the indices of the three adjacent triangles of the elt kel (the index is 0 if there is no adjacent). |
Find the indices of the 3 adjacent elements of triangle kel. if the
face has no adjacent element (so we are on a boundary face).
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
int MMG2D_Get_adjaVertices | ( | MMG5_pMesh | mesh, |
int | ip, | ||
int | lispoi[MMG2D_LMAX] | ||
) |
Return adjacent elements of a triangle.
mesh | pointer toward the mesh structure. |
ip | vertex index. |
lispoi | pointer toward an array of size MMG2D_LMAX that will contain the indices of adjacent vertices to the vertex ip. |
Find the indices of the adjacent vertices of the vertex ip.
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
int MMG2D_Get_adjaVerticesFast | ( | MMG5_pMesh | mesh, |
int | ip, | ||
int | start, | ||
int | lispoi[MMG2D_LMAX] | ||
) |
Return adjacent elements of a triangle.
mesh | pointer toward the mesh structure. |
ip | vertex index. |
start | index of a triangle holding ip. |
lispoi | pointer toward an array of size MMG2D_LMAX that will contain the indices of adjacent vertices to the vertex ip. |
Find the indices of the adjacent vertices of the vertex ip of the triangle start.
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
int MMG2D_Get_nonBdyEdge | ( | MMG5_pMesh | mesh, |
int * | e0, | ||
int * | e1, | ||
int * | ref, | ||
int | idx | ||
) |
mesh | pointer toward the mesh structure. |
e0 | pointer toward the first extremity of the edge. |
e1 | pointer toward the second extremity of the edge. |
ref | pointer toward the edge reference. |
idx | index of the non boundary edge to get (between 1 and nb_edges) |
Get extremities e0, e1 and reference ref of the idx^th non boundary edge (for DG methods for example). An edge is boundary if it is located at the interface of 2 domains with different references, if it belongs to one triangle only or if it is a singular edge (ridge or required).
SUBROUTINE MMG2D_GET_NONBDYEDGE(mesh,e0,e1,ref,idx,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(OUT) :: e0,e1
INTEGER :: ref
INTEGER, INTENT(IN) :: idx
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
int MMG2D_Get_numberOfNonBdyEdges | ( | MMG5_pMesh | mesh, |
int * | nb_edges | ||
) |
mesh | pointer toward the mesh structure. |
nb_edges | pointer toward the number of non boundary edges. |
Get the number of non boundary edges (for DG methods for example). An edge is boundary if it is located at the interface of 2 domains with different references, if it belongs to one triangle only or if it is a singular edge (ridge or required). Append these edges to the list of edge.
SUBROUTINE MMG2D_GET_NUMBEROFNONBDYEDGES(mesh,nb_edges,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(OUT) :: nb_edges
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
int MMG2D_Get_triFromEdge | ( | MMG5_pMesh | mesh, |
int | ked, | ||
int * | ktri, | ||
int * | ied | ||
) |
mesh | pointer toward the mesh structure. |
ked | index of the boundary edge. |
ktri | pointer toward the index of the tri (filled by the function). |
ied | pointer toward the index of the edge of the triangle ktri that correspond to the boundary edge ked. |
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.
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
int MMG2D_Get_trisFromEdge | ( | MMG5_pMesh | mesh, |
int | ked, | ||
int | ktri[2], | ||
int | ied[2] | ||
) |
mesh | pointer toward the mesh structure. |
ked | index of the boundary edge. |
ktri | pointer toward an array of size 2 to fill by the indices of the triangles that share the edge ked (filled by the function). |
ied | pointer toward an array of size two to fill by the indices of the edge in each triangle. |
Fill ktri by the indices of the triangles to which belong a boundary edge and ied by the indices of the matching edge in each triangle. If ked belongs to one triangle only, ktri[1] = ied[1] = 0.
SUBROUTINE MMG2D_GET_TRISFROMEDGE(mesh,ked,ktri,ied,retval)
MMG5_DATA_PTR_T, INTENT(IN) :: mesh
INTEGER, INTENT(IN) :: ked
INTEGER, DIMENSION(2),INTENT(OUT) :: ktri,ied
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
int MMG2D_parsop | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met | ||
) |
mesh | pointer toward the mesh |
met | pointer toward the metric |
Read parameter file DEFAULT.mmg2d
void MMG2D_Reset_verticestags | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh structure |
Reset the vertices tag (be careful all the tags are deleted).
SUBROUTINE MMG2D_RESET_VERTICESTAGS(mesh)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
END SUBROUTINE
int MMG2D_Set_constantSize | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met | ||
) |
mesh | pointer toward the mesh structure |
met | pointer toward the sol structure |
Compute constant size map according to mesh->info.hsiz, mesh->info.hmin and mesh->info.hmax. Update this 3 value if not compatible.
SUBROUTINE MMG2D_SET_CONSTANTSIZE(mesh,met,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
void MMG2D_setfunc | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward a sol structure. |
Set function pointers for length, caltri... depending if case is iso or aniso
SUBROUTINE MMG2D_SETFUNC(mesh,met)
MMG5_DATA_PTR_T, INTENT(IN) :: mesh,met
END SUBROUTINE