mmg3d
|
Tools functions for the mmg3d library. More...
Tools functions for the mmg3d library.
int MMG3D_Compute_eigenv | ( | double | m[6], |
double | lambda[3], | ||
double | vp[3][3] | ||
) |
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, m13, m22, m23, m33 in this order). lambda[0] is the eigenvalue associated to the eigenvector ( v[0][0], v[0,1], v[0,2] ) 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], v[1,2] ) in C and to the eigenvector v(2,:) in fortran lambda[2] is the eigenvalue associated to the eigenvector ( v[2][0], v[2,1], v[2,2] ) in C and to the eigenvector v(3,:) in fortran
SUBROUTINE MMG3D_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 MMG3D_defaultValues | ( | MMG5_pMesh | mesh | ) |
Tools for the library
mesh | pointer toward the mesh structure. |
Print the default parameters values.
SUBROUTINE MMG3D_DEFAULTVALUES(mesh,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
void MMG3D_destockOptions | ( | MMG5_pMesh | mesh, |
MMG5_Info * | info | ||
) |
mesh | pointer toward the mesh structure. |
info | pointer toward the info structure. |
Recover the info structure stored in the mesh structure.
SUBROUTINE MMG3D_DESTOCKOPTIONS(mesh,info)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,info
END SUBROUTINE
int MMG3D_doSol | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met | ||
) |
mesh | pointer toward the mesh structure |
met | pointer toward the sol structure |
Compute isotropic size map according to the mean of the length of the edges passing through a point.
SUBROUTINE MMG3D_DOSOL(mesh,met,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
void MMG3D_Free_solutions | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol | ||
) |
mesh | pointer toward the mesh structure |
sol | pointer toward the solution structure |
Free the solution.
SUBROUTINE MMG3D_FREE_SOLUTIONS(mesh,sol)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
END SUBROUTINE
int MMG3D_freeLocalPar | ( | MMG5_pMesh | mesh | ) |
int MMG3D_Get_adjaTet | ( | MMG5_pMesh | mesh, |
int | kel, | ||
int | listet[4] | ||
) |
Return adjacent elements of a tetrahedron.
Utils
mesh | pointer toward the mesh structure. |
kel | tetrahedron index. |
listet | pointer toward the table of the 4 tetra adjacent to kel. (the index is 0 if there is no adjacent) |
Find the indices of the 4 adjacent elements of tetrahedron kel. if the
face has no adjacent element (so we are on a boundary face).
SUBROUTINE MMG3D_GET_ADJATET(mesh,kel,listet,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
INTEGER, INTENT(IN) :: kel
INTEGER, DIMENSION(4), INTENT(OUT) :: listet
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
int MMG3D_Get_nonBdyTriangle | ( | MMG5_pMesh | mesh, |
int * | v0, | ||
int * | v1, | ||
int * | v2, | ||
int * | ref, | ||
int | idx | ||
) |
mesh | pointer toward the mesh structure. |
v0 | pointer toward the firts vertex of the triangle |
v1 | pointer toward the second vertex of the triangle. |
v2 | pointer toward the third vertex of the triangle. |
ref | pointer toward the triangle reference. |
idx | index of the non boundary triangle to get (between 1 and nb_tria) |
Get vertices and reference ref of the idx^th non boundary triangle (for DG methods for example). A tria is boundary if it is located at the interface of 2 domains witch different references or if it belongs to one tetra only.
SUBROUTINE MMG3D_GET_NONBDYTRIANGLE(mesh,v0,v1,v2,ref,idx,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(OUT) :: v0,v1,v2
INTEGER :: ref
INTEGER, INTENT(IN) :: idx
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
int MMG3D_Get_numberOfNonBdyTriangles | ( | MMG5_pMesh | mesh, |
int * | nb_tria | ||
) |
mesh | pointer toward the mesh structure. |
nb_tria | pointer toward the number of non boundary triangles. |
Get the number of non boundary triangles (for DG methods for example). A triangle is boundary if it is located at the interface of 2 domains with different references or if it belongs to one tetra only. Append these triangles to the list of triangles.
SUBROUTINE MMG3D_GET_NUMBEROFNONBDYTRIANGLESS(mesh,nb_tria,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(OUT) :: nb_tria
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
First step: Mesh analysis to detect the tetra/prisms boundary faces and to store the info in the xtetra/xprisms structures
Second step: Count the number of non boundary faces
Third step: Append the non boundary edges to the boundary edges array
int MMG3D_Get_tetFromTria | ( | MMG5_pMesh | mesh, |
int | ktri, | ||
int * | ktet, | ||
int * | iface | ||
) |
mesh | pointer toward the mesh structure. |
ktri | index of the boundary triangle. |
ktet | pointer toward an integer that will contains the tetra index. |
iface | pointer toward the triangle in ktet. |
Fill ktet by the indice of a tetra to which belong a boundary triangle and iface by the indice of the triangle in the tetra.
SUBROUTINE MMG3D_GET_TETFROMTRIA(mesh,ktri,ktet,iface,retval)
MMG5_DATA_PTR_T, INTENT(IN) :: mesh
INTEGER, INTENT(IN) :: ktri
INTEGER, INTENT(OUT) :: ktet,iface
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
int MMG3D_Get_tetsFromTria | ( | MMG5_pMesh | mesh, |
int | ktri, | ||
int | ktet[2], | ||
int | iface[2] | ||
) |
mesh | pointer toward the mesh structure. |
ktri | index of the boundary triangle. |
ktet | array of size 2 that will contain the indices of the tetra (filled by the function). |
iface | pointer toward an array of size 2 that will contains the indices of the faces of the tetras ktet[i] that corresponds to the boundary tria ktri. |
Fill ktet by the indices of the tetra to which belong a boundary triangle and iface by the indices of the faces of the tetras that correspond to the triangle. Fill ktet[1] and iface[1] by 0 if the triangle belongs to 1 tetra only.
SUBROUTINE MMG3D_GET_TETSFROMTRIA(mesh,ktri,ktet,iface,retval)
MMG5_DATA_PTR_T, INTENT(IN) :: mesh
INTEGER, INTENT(IN) :: ktri
INTEGER, DIMENSION(2), INTENT(OUT) :: ktet,iface
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
int MMG3D_mmg3dcheck | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
MMG5_pSol | sol, | ||
double | critmin, | ||
double | lmin, | ||
double | lmax, | ||
int * | eltab, | ||
int8_t | metRidTyp | ||
) |
Checks
mesh | pointer toward the mesh structure. |
met | pointer toward the sol structure (metric). |
sol | pointer toward the sol structure (ls or displacement). |
critmin | minimum quality for elements. |
lmin | minimum edge length. |
lmax | maximum ede length. |
eltab | table of invalid elements. |
metRidTyp | Type of storage of ridges metrics: 0 for classic storage (before the MMG5_defsiz call), 1 for special storage (after this call). |
Search invalid elements (in term of quality or edge length).
SUBROUTINE MMG3D_MMG3DCHECK(mesh,met,sol,critmin,lmin,lmax,eltab,&
metridtyp,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met,sol
REAL(KIND=8), INTENT(IN) :: critmin,lmin,lmax
INTEGER,DIMENSION(*), INTENT(OUT) :: eltab
INTEGER, INTENT(IN) :: metridtyp
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
Free topologic tables (adja, xpoint, xtetra) resulting from a previous run
int MMG3D_parsar | ( | int | argc, |
char * | argv[], | ||
MMG5_pMesh | mesh, | ||
MMG5_pSol | met, | ||
MMG5_pSol | sol | ||
) |
argc | number of command line arguments. |
argv | command line arguments. |
mesh | pointer toward the mesh structure. |
met | pointer toward a metric |
sol | pointer toward a level-set or displacement |
Store command line arguments.
int MMG3D_parsop | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the sol structure. |
Read local parameters file. This file must have the same name as the mesh with the .mmg3d extension or must be named DEFAULT.mmg3d.
SUBROUTINE MMG3D_PARSOP(mesh,met,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
int MMG3D_searchlen | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
double | lmin, | ||
double | lmax, | ||
int * | eltab, | ||
int8_t | metRidTyp | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the sol structure. |
lmin | minimum edge length. |
lmax | maximum ede length. |
eltab | table of invalid elements. |
metRidTyp | Type of storage of ridges metrics: 0 for classic storage (before the MMG5_defsiz call), 1 for special storage (after this call). |
Store in eltab elements which have edge lengths shorter than lmin or longer than lmax, eltab is allocated and could contain mesh->ne elements.
SUBROUTINE MMG3D_SEARCHLEN(mesh,met,lmin,lmax,eltab,metridtyp,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
REAL(KIND=8), INTENT(IN) :: lmin,lmax
INTEGER,DIMENSION(*), INTENT(OUT) :: eltab
INTEGER, INTENT(IN) :: metridtyp
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
void MMG3D_searchqua | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
double | critmin, | ||
int * | eltab, | ||
int8_t | metRidTyp | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the sol structure. |
critmin | minimum quality for elements. |
eltab | pointer toward the table of invalid elements. |
metRidTyp | Type of storage of ridges metrics: 0 for classic storage (before the MMG5_defsiz call), 1 for special storage (after this call). |
Store elements which have worse quality than critmin in eltab, eltab is allocated and could contain mesh->ne elements.
SUBROUTINE MMG3D_SEARCHQUA(mesh,met,critmin,eltab,metridtyp)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
REAL(KIND=8), INTENT(IN) :: critmin
INTEGER,DIMENSION(*), INTENT(OUT) :: eltab
INTEGER, INTENT(IN) :: metridtyp
END SUBROUTINE
int MMG3D_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 MMG3D_SET_CONSTANTSIZE(mesh,met,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
void MMG3D_setfunc | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met | ||
) |
To associate function pointers without calling MMG3D_mmg3dlib
mesh | pointer toward the mesh structure (unused). |
met | pointer toward the sol structure (unused). |
Set function pointers for caltet, lenedg, lenedgCoor defsiz, gradsiz... depending if the readed metric is anisotropic or isotropic
SUBROUTINE MMG3D_SETFUNC(mesh,met)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
END SUBROUTINE
int MMG3D_stockOptions | ( | MMG5_pMesh | mesh, |
MMG5_Info * | info | ||
) |
mesh | pointer toward the mesh structure. |
info | pointer toward the info structure. |
Store the info structure in the mesh structure.
SUBROUTINE MMG3D_STOCKOPTIONS(mesh,info,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,info
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
int MMG3D_switch_metricStorage | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met | ||
) |
mesh | pointer toward the mesh structure |
met | pointer toward the sol structure |
Switch the m22 and m23 value of the metric to allow to pass from the API storage to the medit one.
SUBROUTINE MMG3D_SWITCH_METRICSTORAGE(mesh,met,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
int MMG3D_usage | ( | char * | prog | ) |
prog | pointer toward the program name. |
return | 1 if success, 0 if fail. |
Print help for mmg3d options.
SUBROUTINE MMG3D_USAGE(prog,strlen0,retval)
CHARACTER(LEN=*), INTENT(IN) :: prog
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE