mmg3d
libmmgcommon.h File Reference

API header for the common part of the MMG libraries. More...

#include <stdarg.h>
#include "libmmgtypes.h"
#include "chrono.h"
Include dependency graph for libmmgcommon.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void MMG5_Init_fileNames (MMG5_pMesh mesh, MMG5_pSol sol)
 
void() MMG5_Init_parameters (MMG5_pMesh mesh)
 
int MMG5_Set_inputMeshName (MMG5_pMesh mesh, const char *meshin)
 
int MMG5_Set_outputMeshName (MMG5_pMesh mesh, const char *meshout)
 
int MMG5_Set_inputSolName (MMG5_pMesh mesh, MMG5_pSol sol, const char *solin)
 
int MMG5_Set_outputSolName (MMG5_pMesh mesh, MMG5_pSol sol, const char *solout)
 
void MMG5_Set_constantSize (MMG5_pMesh mesh, MMG5_pSol met, double hsiz)
 
int MMG5_Set_multiMat (MMG5_pMesh mesh, MMG5_pSol sol, int ref, int split, int rin, int rex)
 
void MMG5_Free_structures (MMG5_pMesh mesh, MMG5_pSol sol)
 
void MMG5_mmgFree_names (MMG5_pMesh mesh, MMG5_pSol met)
 
int MMG5_Set_defaultTruncatureSizes (MMG5_pMesh mesh, int8_t sethmin, int8_t sethmax)
 
int MMG5_Compute_constantSize (MMG5_pMesh mesh, MMG5_pSol met, double *hsize)
 
const char * MMG5_Get_entitiesName (enum MMG5_entities ent)
 
const char * MMG5_Get_typeName (enum MMG5_type typ)
 
int MMG5_Free_allSols (MMG5_pMesh mesh, MMG5_pSol *sol)
 
int MMG5_saveNode (MMG5_pMesh mesh, const char *filename)
 
int MMG5_saveEdge (MMG5_pMesh mesh, const char *filename, const char *ext)
 

Detailed Description

API header for the common part of the MMG libraries.

Author
Algiane Froehly (Inria/UBordeaux)
Version
5
Date
01 2014
Warning
To keep the genheader working, don't break line between the enum name and the opening brace (it creates errors under windows)

Function Documentation

◆ MMG5_Compute_constantSize()

int MMG5_Compute_constantSize ( MMG5_pMesh  mesh,
MMG5_pSol  met,
double *  hsize 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric.
hsizcomputed constant size to impose.
Returns
1 if success, 0 if fail

Compute the constant size to impose according to hmin and hmax and store it in hsiz. Fill hmin and hamx if they are not setted by the user.

Here is the caller graph for this function:

◆ MMG5_Free_allSols()

int MMG5_Free_allSols ( MMG5_pMesh  mesh,
MMG5_pSol sol 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward an array of solution structure (that stores solution fields).
Returns
1

Deallocation of an array of solution fields

Here is the caller graph for this function:

◆ MMG5_Free_structures()

void MMG5_Free_structures ( MMG5_pMesh  mesh,
MMG5_pSol  sol 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the sol structure.

Structures unallocation before return (common structures between all codes).

Here is the caller graph for this function:

◆ MMG5_Get_entitiesName()

const char * MMG5_Get_entitiesName ( enum MMG5_entities  ent)
Parameters
entMMG5_entities enum
Returns
the name of the enum field

Print the name associated to the ent value in the MMG5_entities enum.

Here is the caller graph for this function:

◆ MMG5_Get_typeName()

const char * MMG5_Get_typeName ( enum MMG5_type  typ)
Parameters
typMMG5_type enum
Returns
the name of the enum field

Print the name associated to the typ value in the MMG5_type enum.

Here is the caller graph for this function:

◆ MMG5_Init_fileNames()

void MMG5_Init_fileNames ( MMG5_pMesh  mesh,
MMG5_pSol  sol 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the sol structure.

Initialize file names to their default values.

Remarks
Fortran interface:

‍ SUBROUTINE MMG5_INIT_FILENAMES(mesh,sol)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
END SUBROUTINE

Parameters
meshpointer toward the mesh structure.
solpointer toward the sol structure.

Initialize file names to their default values.

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

◆ MMG5_Init_parameters()

void() MMG5_Init_parameters ( MMG5_pMesh  mesh)
Parameters
meshpointer toward the mesh structure.

Initialization of the input parameters (stored in the Info structure).

Remarks
Fortran interface:

‍ SUBROUTINE MMG5_INIT_PARAMETERS(mesh)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
END SUBROUTINE

Parameters
meshpointer toward the mesh structure.

Initialization of the input parameters.

MMG3D_IPARAM_lag is used by mmg3d only but need to be negative in the scaleMesh function

◆ MMG5_mmgFree_names()

void MMG5_mmgFree_names ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the sol structure.

File name deallocations before return.

Remarks
Fortran interface:

‍ SUBROUTINE MMG5_SETMMGFREE_NAMES(mesh,met)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
END SUBROUTINE

Parameters
meshpointer toward the mesh structure.
metpointer toward the sol structure.

File name deallocations before return.

Here is the caller graph for this function:

◆ MMG5_saveEdge()

int MMG5_saveEdge ( MMG5_pMesh  mesh,
const char *  filename,
const char *  ext 
)
Parameters
meshpointer toward the mesh structure.
filenamename of file.
extfile extension (.poly or .edge)
Returns
1 if success, 0 if fail.

Save edge list at .edge file format (Tetgen/Triangle).

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

◆ MMG5_saveNode()

int MMG5_saveNode ( MMG5_pMesh  mesh,
const char *  filename 
)
Parameters
meshpointer toward the mesh structure.
filenamename of file.
Returns
1 if success, 0 if fail.

Save node list at .node file format (Tetgen/Triangle).

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

◆ MMG5_Set_constantSize()

void MMG5_Set_constantSize ( MMG5_pMesh  mesh,
MMG5_pSol  met,
double  hsiz 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the sol structure.
hsizwanted edge size

fill the metric field with the size hsiz

\Remark not for extern users.

Here is the caller graph for this function:

◆ MMG5_Set_defaultTruncatureSizes()

int MMG5_Set_defaultTruncatureSizes ( MMG5_pMesh  mesh,
int8_t  sethmin,
int8_t  sethmax 
)
inline
Parameters
meshpointer toward the mesh structure.
sethmin1 if hmin is already setted (>0.)
sethmax1 if hmax is already setted (>0.)
Returns
1 if success, 0 if we detect mismatch parameters

Set default values for hmin and hmax from the bounding box.

\Remark not for extern users.

Here is the caller graph for this function:

◆ MMG5_Set_inputMeshName()

int MMG5_Set_inputMeshName ( MMG5_pMesh  mesh,
const char *  meshin 
)
Parameters
meshpointer toward the mesh structure.
meshininput mesh name.
Returns
1.

Set the name of input mesh.

Remarks
Fortran interface:

‍ SUBROUTINE MMG5_SET_INPUTMESHNAME(mesh,meshin,strlen,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
CHARACTER(LEN=*), INTENT(IN) :: meshin
INTEGER, INTENT(IN) :: strlen
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

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

Set the name of input mesh.

Here is the caller graph for this function:

◆ MMG5_Set_inputSolName()

int MMG5_Set_inputSolName ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
const char *  solin 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the sol structure.
solinname of the input solution file.
Returns
1.

Set the name of input solution file.

Remarks
Fortran interface:

‍ SUBROUTINE MMG5_SET_INPUTSOLNAME(mesh,sol,solin,strlen,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: solin
INTEGER, INTENT(IN) :: strlen
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Parameters
meshpointer toward the mesh structure.
solpointer toward the sol structure.
solinname of the input solution file.
Returns
1 if success, 0 if fail

Set the name of input solution file.

Here is the caller graph for this function:

◆ MMG5_Set_multiMat()

int MMG5_Set_multiMat ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
int  ref,
int  split,
int  rin,
int  rex 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the sol structure.
refinput tetra reference.
splitMMG5_MMAT_NoSplit if the entity must not be splitted, MMG5_MMAT_Split otherwise
rininternal reference after ls discretization
rexexternal reference after ls discretization
Returns
0 if failed, 1 otherwise.

Set the reference mapping for the elements of ref ref in ls discretization mode.

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

◆ MMG5_Set_outputMeshName()

int MMG5_Set_outputMeshName ( MMG5_pMesh  mesh,
const char *  meshout 
)
Parameters
meshpointer toward the mesh structure.
meshoutname of the output mesh file.
Returns
1.

Set the name of output mesh file.

Remarks
Fortran interface:

‍ SUBROUTINE MMG5_SET_OUTPUTMESHNAME(mesh,meshout,strlen,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
CHARACTER(LEN=*), INTENT(IN) :: meshout
INTEGER, INTENT(IN) :: strlen
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Parameters
meshpointer toward the mesh structure.
meshoutname of the output mesh file.
Returns
1 if success, 0 if fail.

Set the name of output mesh file.

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

◆ MMG5_Set_outputSolName()

int MMG5_Set_outputSolName ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
const char *  solout 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the sol structure.
soloutname of the output solution file.
Returns
0 if failed, 1 otherwise.

Set the name of output solution file.

Remarks
Fortran interface:

‍ SUBROUTINE MMG5_SET_OUTPUTSOLNAME(mesh,sol,solout,strlen,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: solout
INTEGER, INTENT(IN) :: strlen
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Parameters
meshpointer toward the mesh structure.
solpointer toward the sol structure.
soloutname of the output solution file.
Returns
0 if failed, 1 otherwise.

Set the name of output solution file.

Here is the caller graph for this function: