mmg3d
libmmg3d.c File Reference

Most of the API functions of the MMG3D library. More...

Include dependency graph for libmmg3d.c:

Macros

#define _MMG5_RETURN_AND_PACK(mesh, met, disp, val)
 

Functions

void _MMG3D_Free_topoTables (MMG5_pMesh mesh)
 
void _MMG3D_solTruncatureForOptim (MMG5_pMesh mesh, MMG5_pSol met)
 
int _MMG3D_bdryBuild (MMG5_pMesh mesh)
 
int _MMG3D_packMesh (MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol disp)
 
int MMG3D_mmg3dlib (MMG5_pMesh mesh, MMG5_pSol met)
 
int MMG3D_mmg3dls (MMG5_pMesh mesh, MMG5_pSol met)
 
int MMG3D_mmg3dmov (MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol disp)
 

Variables

double(* MMG3D_lenedgCoor )(double *ca, double *cb, double *sa, double *sb)
 

Detailed Description

Most of the API functions of the MMG3D library.

Author
Charles Dapogny (UPMC)
Cécile Dobrzynski (Bx INP/Inria/UBordeaux)
Pascal Frey (UPMC)
Algiane Froehly (Inria/UBordeaux)
Version
5
Date
01 2014
Warning
Use the MMG3D_ prefix: MMG5_ prefix will became obsolete soon...
Todo:
documentation doxygen

Private API functions for MMG3D library: incompatible functions with the main binary.

Macro Definition Documentation

◆ _MMG5_RETURN_AND_PACK

#define _MMG5_RETURN_AND_PACK (   mesh,
  met,
  disp,
  val 
)
Value:
do \
{ \
if ( !_MMG3D_packMesh(mesh,met,disp) ) { \
mesh->npi = mesh->np; \
mesh->nti = mesh->nt; \
mesh->nai = mesh->na; \
mesh->nei = mesh->ne; \
met->npi = met->np; \
return(MMG5_LOWFAILURE); \
} \
_LIBMMG5_RETURN(mesh,met,val); \
}while(0)
double val
Definition: mmgcommon.h:427
int _MMG3D_packMesh(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol disp)
Definition: libmmg3d.c:312
int nt
Definition: libmmgtypes.h:480
int np
Definition: libmmgtypes.h:480
MMG5_pMesh * mesh
Definition: API_functionsf_3d.c:66
#define MMG5_LOWFAILURE
Definition: libmmgtypes.h:48
int na
Definition: libmmgtypes.h:480
int ne
Definition: libmmgtypes.h:480

Pack the mesh mesh and its associated metric met and return val.

Function Documentation

◆ _MMG3D_bdryBuild()

int _MMG3D_bdryBuild ( MMG5_pMesh  mesh)
Parameters
meshpointer toward the mesh structure (unused).
Returns
-1 if fail, the number of detected ridges otherwise

Create the boundary entities of the mesh (triangles and edges).

Warning
mesh must be packed and hashed
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _MMG3D_Free_topoTables()

void _MMG3D_Free_topoTables ( MMG5_pMesh  mesh)
inline

Free adja, xtetra and xpoint tables

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

◆ _MMG3D_packMesh()

int _MMG3D_packMesh ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_pSol  disp 
)
Parameters
meshpointer toward the mesh structure (unused).
metpointer toward the solution (metric or level-set) structure.
disppointer toward the solution (displacement) structure.
Returns
1 if success, 0 if chkmsh fail or if we are unable to build triangles.

Pack the sparse mesh and create triangles and edges before getting out of library

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

◆ _MMG3D_solTruncatureForOptim()

void _MMG3D_solTruncatureForOptim ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the solution structure.

Truncate the metric computed by the DoSol function by hmax and hmin values (if setted by the user). Set hmin and hmax if they are not setted.

Here is the caller graph for this function:

◆ MMG3D_mmg3dlib()

int MMG3D_mmg3dlib ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the sol (metric) structure.
Returns
MMG5_SUCCESS if success, MMG5_LOWFAILURE if fail but a conform mesh is saved or MMG5_STRONGFAILURE if fail and we can't save the mesh.

Main program for the remesh library.

Remarks
Fortran interface:

SUBROUTINE MMG3D_MMG3DLIB(mesh,met,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
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_mmg3dls()

int MMG3D_mmg3dls ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the sol (level-set) structure.
Returns
MMG5_SUCCESS if success, MMG5_LOWFAILURE if fail but a conform mesh is saved or MMG5_STRONGFAILURE if fail and we can't save the mesh.

Main program for the level-set discretization library.

Remarks
Fortran interface:

SUBROUTINE MMG3D_MMG3DLS(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_mmg3dmov()

int MMG3D_mmg3dmov ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_pSol  disp 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the sol (output metric) structure.
disppointer toward a sol (displacement for the lagrangian motion mode) structure.
Returns
MMG5_SUCCESS if success, MMG5_LOWFAILURE if fail but a conform mesh is saved or MMG5_STRONGFAILURE if fail and we can't save the mesh.

Main program for the rigidbody movement library.

Remarks
Fortran interface:

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

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

Variable Documentation

◆ MMG3D_lenedgCoor

double(* MMG3D_lenedgCoor) (double *ca, double *cb, double *sa, double *sb)
Parameters
capointer toward the coordinates of the first edge's extremity.
cbpointer toward the coordinates of the second edge's extremity.
mapointer toward the metric associated to the first edge's extremity.
mbpointer toward the metric associated to the second edge's extremity.
Returns
edge length.

Compute length of edge $[ca,cb]$ (with ca and cb coordinates of edge extremities) according to the size prescription.

Remarks
Fortran interface:

SUBROUTINE MMG3D_LENEDGCOOR(ca,cb,sa,sb,retval)
REAL(KIND=8), INTENT(IN) :: ca,cb,sa,sb
REAL(KIND=8), INTENT(OUT) :: retval
END SUBROUTINE