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_mark_packedPoints (MMG5_pMesh mesh, int *np, int *nc)
 
int MMG3D_pack_tetraAndAdja (MMG5_pMesh mesh)
 
int MMG3D_pack_tetra (MMG5_pMesh mesh)
 
int MMG3D_pack_prismsAndQuads (MMG5_pMesh mesh)
 
int MMG3D_pack_sol (MMG5_pMesh mesh, MMG5_pSol sol)
 
int MMG3D_update_eltsVertices (MMG5_pMesh mesh)
 
int MMG3D_pack_pointArray (MMG5_pMesh mesh)
 
int MMG3D_pack_points (MMG5_pMesh mesh)
 
void MMG3D_unset_reqBoundaries (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; \
} \
_LIBMMG5_RETURN(mesh,met,val); \
}while(0)
int MMG3D_packMesh(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol disp)
Definition: libmmg3d.c:674
int nt
Definition: libmmgtypes.h:516
int np
Definition: libmmgtypes.h:516
MMG5_pMesh * mesh
Definition: API_functionsf_3d.c:65
int na
Definition: libmmgtypes.h:516
#define MMG5_STRONGFAILURE
Definition: libmmgtypes.h:56
int ne
Definition: libmmgtypes.h:516
double val
Definition: mmgcommon.h:503

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:

◆ MMG3D_Free_topoTables()

void MMG3D_Free_topoTables ( MMG5_pMesh  mesh)

Free adja, xtetra and xpoint tables

Here is the call graph for this function:

◆ MMG3D_mark_packedPoints()

int MMG3D_mark_packedPoints ( MMG5_pMesh  mesh,
int *  np,
int *  nc 
)
Parameters
meshpointer toward the mesh structure (unused).
nppointer toward the number of packed points
ncpointer toward the number of packed corners
Returns
1 if success, 0 if fail.

Count the number of packed points and store the packed point index in tmp.

◆ 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

In debug mode, check that all structures are allocated

Free topologic tables (adja, xpoint, xtetra) resulting from a previous run

Here is the call 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

In debug mode, check that all structures are allocated

Here is the call 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

In debug mode, check that all structures are allocated

Here is the call graph for this function:

◆ MMG3D_pack_pointArray()

int MMG3D_pack_pointArray ( MMG5_pMesh  mesh)
Parameters
meshpointer toward the mesh structure (unused).
Returns
the number of corners if success, -1 otherwise

Pack a sparse point array.

Here is the call graph for this function:

◆ MMG3D_pack_points()

int MMG3D_pack_points ( MMG5_pMesh  mesh)
Parameters
meshpointer toward the mesh structure (unused).
Returns
the number of corners if success, -1 otherwise

Pack a sparse point array and update the element vertices according to their new indices.

Store in tmp the pack index of each point and count the corner

Update the element vertices indices

Pack the point array

Here is the call graph for this function:

◆ MMG3D_pack_prismsAndQuads()

int MMG3D_pack_prismsAndQuads ( MMG5_pMesh  mesh)
Parameters
meshpointer toward the mesh structure
Returns
1 if success, 0 if fail.

Pack prisms and quads

◆ MMG3D_pack_sol()

int MMG3D_pack_sol ( MMG5_pMesh  mesh,
MMG5_pSol  sol 
)
Parameters
meshpointer toward the mesh structure (unused).
metpointer toward the solution (metric or level-set) structure.
Returns
1 if success, 0 if fail.

Pack a sparse solution structure.

◆ MMG3D_pack_tetra()

int MMG3D_pack_tetra ( MMG5_pMesh  mesh)
Parameters
meshpointer toward the mesh structure
Returns
1 if success, 0 if fail.

Pack the sparse tetra. Doesn't pack the adjacency array.

◆ MMG3D_pack_tetraAndAdja()

int MMG3D_pack_tetraAndAdja ( MMG5_pMesh  mesh)
Parameters
meshpointer toward the mesh structure
Returns
1 if success, 0 if fail.

Pack the sparse tetra and the associated adja array

◆ 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 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:

◆ 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.

◆ MMG3D_unset_reqBoundaries()

void MMG3D_unset_reqBoundaries ( MMG5_pMesh  mesh)
Parameters
meshpointer towarad the mesh structure.

Set all boundary triangles to required and add a tag to detect that they are not realy required.

◆ MMG3D_update_eltsVertices()

int MMG3D_update_eltsVertices ( MMG5_pMesh  mesh)
Parameters
meshpointer toward the mesh structure (unused).
Returns
1 if success, 0 otherwise

Update the element vertices indices with the pack point index stored in the tmp field of the points.

Variable Documentation

◆ MMG3D_lenedgCoor

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