mmg3d
libmmg3d_tools.c File Reference

Tools functions for the mmg3d library. More...

Include dependency graph for libmmg3d_tools.c:

Functions

void MMG3D_setfunc (MMG5_pMesh mesh, MMG5_pSol met)
 
int MMG3D_Get_adjaTet (MMG5_pMesh mesh, int kel, int listet[4])
 Return adjacent elements of a tetrahedron. More...
 
int MMG3D_usage (char *prog)
 
int MMG3D_defaultValues (MMG5_pMesh mesh)
 
int MMG3D_parsar (int argc, char *argv[], MMG5_pMesh mesh, MMG5_pSol met)
 
int MMG3D_parsop (MMG5_pMesh mesh, MMG5_pSol met)
 
int MMG3D_stockOptions (MMG5_pMesh mesh, MMG5_Info *info)
 
void MMG3D_destockOptions (MMG5_pMesh mesh, MMG5_Info *info)
 
int MMG3D_mmg3dcheck (MMG5_pMesh mesh, MMG5_pSol met, double critmin, double lmin, double lmax, int *eltab, char metRidTyp)
 
void MMG3D_searchqua (MMG5_pMesh mesh, MMG5_pSol met, double critmin, int *eltab, char metRidTyp)
 
int MMG3D_Get_tetFromTria (MMG5_pMesh mesh, int ktri, int *ktet, int *iface)
 
int MMG3D_Get_tetsFromTria (MMG5_pMesh mesh, int ktri, int ktet[2], int iface[2])
 
int MMG3D_searchlen (MMG5_pMesh mesh, MMG5_pSol met, double lmin, double lmax, int *eltab, char metRidTyp)
 
int MMG3D_doSol (MMG5_pMesh mesh, MMG5_pSol met)
 
int MMG3D_Set_constantSize (MMG5_pMesh mesh, MMG5_pSol met)
 
int MMG3D_switch_metricStorage (MMG5_pMesh mesh, MMG5_pSol met)
 

Detailed Description

Tools functions for the mmg3d library.

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

Function Documentation

◆ MMG3D_defaultValues()

int MMG3D_defaultValues ( MMG5_pMesh  mesh)

Tools for the library

Parameters
meshpointer toward the mesh structure.
Returns
0 if fail, 1 if success.

Print the default parameters values.

Remarks
Fortran interface:

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

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

◆ MMG3D_destockOptions()

void MMG3D_destockOptions ( MMG5_pMesh  mesh,
MMG5_Info info 
)
Parameters
meshpointer toward the mesh structure.
infopointer toward the info structure.

Recover the info structure stored in the mesh structure.

Remarks
Fortran interface:

SUBROUTINE MMG3D_DESTOCKOPTIONS(mesh,info)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,info
END SUBROUTINE

Here is the caller graph for this function:

◆ MMG3D_doSol()

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

Compute isotropic size map according to the mean of the length of the edges passing through a point.

Remarks
Fortran interface:

SUBROUTINE MMG3D_DOSOL(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:

◆ MMG3D_Get_adjaTet()

int MMG3D_Get_adjaTet ( MMG5_pMesh  mesh,
int  kel,
int  listet[4] 
)

Return adjacent elements of a tetrahedron.

Utils

Parameters
meshpointer toward the mesh structure.
keltetrahedron index.
listetpointer toward the table of the 4 tetra adjacent to kel. (the index is 0 if there is no adjacent)
Returns
1.

Find the indices of the 4 adjacent elements of tetrahedron kel. $listet[i] = 0$ if the $i^{th}$ face has no adjacent element (so we are on a boundary face).

Remarks
Fortran interface:

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

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

◆ MMG3D_Get_tetFromTria()

int MMG3D_Get_tetFromTria ( MMG5_pMesh  mesh,
int  ktri,
int *  ktet,
int *  iface 
)
Parameters
meshpointer toward the mesh structure.
ktriindex of the boundary triangle.
ktetpointer toward an integer that will contains the tetra index.
ifacepointer toward the triangle in ktet.
Returns
0 if fail, 1 otherwise

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.

Warning
will be deprecated in release 5.5
Remarks
Fortran interface:

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

Here is the caller graph for this function:

◆ MMG3D_Get_tetsFromTria()

int MMG3D_Get_tetsFromTria ( MMG5_pMesh  mesh,
int  ktri,
int  ktet[2],
int  iface[2] 
)
Parameters
meshpointer toward the mesh structure.
ktriindex of the boundary triangle.
ktetarray of size 2 that will contain the indices of the tetra (filled by the function).
ifacepointer 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.
Returns
0 if fail, 1 otherwise

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.

Remarks
Fortran interface:

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

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

◆ MMG3D_mmg3dcheck()

int MMG3D_mmg3dcheck ( MMG5_pMesh  mesh,
MMG5_pSol  met,
double  critmin,
double  lmin,
double  lmax,
int *  eltab,
char  metRidTyp 
)

Checks

Parameters
meshpointer toward the mesh structure.
metpointer toward the sol structure.
critminminimum quality for elements.
lminminimum edge length.
lmaxmaximum ede length.
eltabtable of invalid elements.
metRidTypType 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).

Remarks
Fortran interface:

SUBROUTINE MMG3D_MMG3DCHECK(mesh,met,critmin,lmin,lmax,eltab,&
metridtyp,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
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

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

◆ MMG3D_parsar()

int MMG3D_parsar ( int  argc,
char *  argv[],
MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
argcnumber of command line arguments.
argvcommand line arguments.
meshpointer toward the mesh structure.
metpointer toward the sol structure.
Returns
1 if we want to run Mmg after, 0 if not or if fail.

Store command line arguments.

Remarks
no matching fortran function.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_parsop()

int MMG3D_parsop ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the sol structure.
Returns
1.

Read local parameters file. This file must have the same name as the mesh with the .mmg3d extension or must be named DEFAULT.mmg3d.

Remarks
Fortran interface:

SUBROUTINE MMG3D_PARSOP(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:

◆ MMG3D_searchlen()

int MMG3D_searchlen ( MMG5_pMesh  mesh,
MMG5_pSol  met,
double  lmin,
double  lmax,
int *  eltab,
char  metRidTyp 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the sol structure.
lminminimum edge length.
lmaxmaximum ede length.
eltabtable of invalid elements.
metRidTypType of storage of ridges metrics: 0 for classic storage (before the MMG5_defsiz call), 1 for special storage (after this call).
Returns
1 if success, 0 otherwise.

Store in eltab elements which have edge lengths shorter than lmin or longer than lmax, eltab is allocated and could contain mesh->ne elements.

Remarks
Fortran interface:

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

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

◆ MMG3D_searchqua()

void MMG3D_searchqua ( MMG5_pMesh  mesh,
MMG5_pSol  met,
double  critmin,
int *  eltab,
char  metRidTyp 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the sol structure.
critminminimum quality for elements.
eltabpointer toward the table of invalid elements.
metRidTypType 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.

Remarks
Fortran interface:

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

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

◆ MMG3D_Set_constantSize()

int MMG3D_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, mesh->info.hmin and mesh->info.hmax. Update this 3 value if not compatible.

Remarks
Fortran interface:

SUBROUTINE MMG3D_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:

◆ MMG3D_setfunc()

void MMG3D_setfunc ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)

To associate function pointers without calling MMG3D_mmg3dlib

Parameters
meshpointer toward the mesh structure (unused).
metpointer toward the sol structure (unused).

Set function pointers for caltet, lenedg, lenedgCoor defsiz, gradsiz... depending if the readed metric is anisotropic or isotropic

Remarks
Fortran interface:

SUBROUTINE MMG3D_SETFUNC(mesh,met)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
END SUBROUTINE

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

◆ MMG3D_stockOptions()

int MMG3D_stockOptions ( MMG5_pMesh  mesh,
MMG5_Info info 
)
Parameters
meshpointer toward the mesh structure.
infopointer toward the info structure.
Returns
1.

Store the info structure in the mesh structure.

Remarks
Fortran interface:

SUBROUTINE MMG3D_STOCKOPTIONS(mesh,info,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,info
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

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

◆ MMG3D_switch_metricStorage()

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

Switch the m22 and m23 value of the metric to allow to pass from the API storage to the medit one.

Remarks
Fortran interface:

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

Here is the caller graph for this function:

◆ MMG3D_usage()

int MMG3D_usage ( char *  prog)
Parameters
progpointer toward the program name.
return1 if success, 0 if fail.

Print help for mmg3d options.

Remarks
Fortran interface:

SUBROUTINE MMG3D_USAGE(prog,strlen0,retval)
CHARACTER(LEN=*), INTENT(IN) :: prog
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

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