Mmg
Simplicial remeshers (mesh adaptation, isovalue discretization, lagrangian movement)
|
#include <stdarg.h>
#include "libmmgtypes.h"
#include "chrono_private.h"
#include "mmg_core_export_private.h"
Go to the source code of this file.
Macros | |
#define | MMG5_VOLFRAC 1.e-5 |
API header for the common part of the MMG libraries. | |
#define MMG5_VOLFRAC 1.e-5 |
API header for the common part of the MMG libraries.
Definition at line 49 of file libmmgcommon_private.h.
LIBMMG_CORE_EXPORT int MMG5_Clean_isoEdges | ( | MMG5_pMesh | mesh | ) |
mesh | pointer to mesh |
Clean non-ridge edges belonging to isosurface.
mesh | pointer to mesh |
return | 1 if successful, 0 if fail |
Clean edges belonging to isosurf, except for ridges.
Deletion of edges that belong to isosurf
Definition at line 368 of file libtools.c.
LIBMMG_CORE_EXPORT int MMG5_Compute_constantSize | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
double * | hsize | ||
) |
mesh | pointer to the mesh structure. |
met | pointer to the metric. |
hsiz | computed constant size to impose. |
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.
Definition at line 623 of file API_functions.c.
LIBMMG_CORE_EXPORT int MMG5_Free_allSols | ( | MMG5_pMesh | mesh, |
MMG5_pSol * | sol | ||
) |
mesh | pointer to the mesh structure. |
sol | pointer to an array of solution structure (that stores solution fields). |
Deallocation of an array of solution fields
Definition at line 491 of file API_functions.c.
LIBMMG_CORE_EXPORT void MMG5_Free_structures | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol | ||
) |
mesh | pointer to the mesh structure. |
sol | pointer to the sol structure. |
Structures unallocation before return (common structures between all codes).
Definition at line 513 of file API_functions.c.
LIBMMG_CORE_EXPORT char * MMG5_Get_basename | ( | char * | path | ) |
path | string containing a filename and its path |
Extract basename from a path (allocate a string to store it).
Definition at line 683 of file API_functions.c.
LIBMMG_CORE_EXPORT const char * MMG5_Get_entitiesName | ( | enum MMG5_entities | ent | ) |
ent | MMG5_entities enum |
Print the name associated to the ent value in the MMG5_entities enum.
Definition at line 693 of file API_functions.c.
LIBMMG_CORE_EXPORT char * MMG5_Get_filenameExt | ( | char * | filename | ) |
filename | string containing a filename |
Get the extension of the filename string. Do not consider '.o' as an extension.
Definition at line 912 of file API_functions.c.
LIBMMG_CORE_EXPORT int MMG5_Get_format | ( | char * | ptr, |
int | fmt | ||
) |
ptr | pointer to the file extension (dot included) |
fmt | default file format. |
Get the wanted file format from the mesh extension. If fmt is provided, it is used as default file format (ptr==NULL), otherwise, the default file format is the medit one.
Definition at line 816 of file API_functions.c.
LIBMMG_CORE_EXPORT const char * MMG5_Get_formatName | ( | enum MMG5_Format | fmt | ) |
fmt | file format. |
Print the name of the file format associated to fmt.
Definition at line 864 of file API_functions.c.
LIBMMG_CORE_EXPORT char * MMG5_Get_path | ( | char * | path | ) |
path | string containing a filename and its path |
Remove filename from a path and return the path in a newly allocated string.
Definition at line 939 of file API_functions.c.
const char * MMG5_Get_tagName | ( | uint16_t | tag | ) |
tag | input entity tag |
Print the name associated to the typ value in the MMG5_type enum.
Definition at line 737 of file API_functions.c.
LIBMMG_CORE_EXPORT const char * MMG5_Get_typeName | ( | enum MMG5_type | typ | ) |
typ | MMG5_type enum |
Print the name associated to the typ value in the MMG5_type enum.
Definition at line 716 of file API_functions.c.
LIBMMG_CORE_EXPORT void MMG5_Init_fileNames | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol | ||
) |
mesh | pointer to the mesh structure. |
sol | pointer to the sol structure. |
Initialize file names to their default values.
SUBROUTINE MMG5_INIT_FILENAMES(mesh,sol)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
END SUBROUTINE
mesh | pointer to the mesh structure. |
sol | pointer to the sol structure. |
Initialize file names to their default values.
Definition at line 132 of file API_functions.c.
LIBMMG_CORE_EXPORT void() MMG5_Init_parameters | ( | MMG5_pMesh | mesh | ) |
mesh | pointer to the mesh structure. |
Initialization of the input parameters (stored in the Info structure).
SUBROUTINE MMG5_INIT_PARAMETERS(mesh)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
END SUBROUTINE
mesh | pointer to 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
Definition at line 51 of file API_functions.c.
LIBMMG_CORE_EXPORT void MMG5_mmgFree_names | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met | ||
) |
mesh | pointer to the mesh structure. |
met | pointer to the sol structure. |
File name deallocations before return.
SUBROUTINE MMG5_SETMMGFREE_NAMES(mesh,met)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
END SUBROUTINE
mesh | pointer to the mesh structure. |
met | pointer to the sol structure. |
File name deallocations before return.
Definition at line 562 of file API_functions.c.
LIBMMG_CORE_EXPORT char * MMG5_Remove_ext | ( | char * | path, |
char * | ext | ||
) |
path | path from which we want to remove the extension. |
Allocate a new string and copy path without extension in it.
Definition at line 974 of file API_functions.c.
LIBMMG_CORE_EXPORT int MMG5_saveEdge | ( | MMG5_pMesh | mesh, |
const char * | filename, | ||
const char * | ext | ||
) |
mesh | pointer to the mesh structure. |
filename | name of file. |
ext | file extension (.poly or .edge) |
Save edge list at .edge file format (Tetgen/Triangle).
Definition at line 2818 of file inout.c.
LIBMMG_CORE_EXPORT int MMG5_saveNode | ( | MMG5_pMesh | mesh, |
const char * | filename | ||
) |
LIBMMG_CORE_EXPORT int MMG5_scaleMesh | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
MMG5_pSol | sol | ||
) |
mesh | pointer to the mesh structure. |
met | pointer to the metric structure. |
ls | pointer to a solution structure (level-set or displacement). |
Scale the mesh and the size informations between 0 and 1. Compute a default value for the hmin/hmax parameters if needed.
SUBROUTINE MMG5_SCALEMESH(mesh,met,ls,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met,ls
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
mesh | pointer to the mesh structure. |
met | pointer to the metric structure. |
sol | pointer to a solution structure (level-set or displacement). |
Scale the mesh and the size informations between 0 and 1. Compute a default value for the hmin/hmax parameters if needed.
Definition at line 649 of file scalem.c.
LIBMMG_CORE_EXPORT void MMG5_Set_constantSize | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
double | hsiz | ||
) |
mesh | pointer to the mesh structure. |
met | pointer to the sol structure. |
hsiz | wanted edge size |
fill the metric field with the size hsiz
\Remark not for extern users.
Definition at line 446 of file API_functions.c.
|
inline |
mesh | pointer to the mesh structure. |
sethmin | 1 if hmin is already setted (>0.) |
sethmax | 1 if hmax is already setted (>0.) |
Set default values for hmin and hmax from the bounding box.
\Remark not for extern users.
Definition at line 586 of file API_functions.c.
LIBMMG_CORE_EXPORT int MMG5_Set_inputMeshName | ( | MMG5_pMesh | mesh, |
const char * | meshin | ||
) |
mesh | pointer to the mesh structure. |
meshin | input mesh name. |
Set the name of input mesh.
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
mesh | pointer to the mesh structure. |
meshin | input mesh name. |
Set the name of input mesh.
Definition at line 153 of file API_functions.c.
LIBMMG_CORE_EXPORT int MMG5_Set_inputParamName | ( | MMG5_pMesh | mesh, |
const char * | fparamin | ||
) |
mesh | pointer to the mesh structure. |
fparamin | name of the input parameter file. |
Set the name of input parameter file.
SUBROUTINE MMG5_SET_INPUTPARAMNAME(mesh,fparamin,strlen,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
CHARACTER(LEN=*), INTENT(IN) :: fparamin
INTEGER, INTENT(IN) :: strlen
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
mesh | pointer to the mesh structure. |
fparamin | name of the input solution file. |
Set the name of input parameter file.
Definition at line 245 of file API_functions.c.
LIBMMG_CORE_EXPORT int MMG5_Set_inputSolName | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
const char * | solin | ||
) |
mesh | pointer to the mesh structure. |
sol | pointer to the sol structure. |
solin | name of the input solution file. |
Set the name of input solution file.
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
mesh | pointer to the mesh structure. |
sol | pointer to the sol structure. |
solin | name of the input solution file. |
Set the name of input solution file.
Definition at line 189 of file API_functions.c.
LIBMMG_CORE_EXPORT int MMG5_Set_lsBaseReference | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
MMG5_int | br | ||
) |
mesh | pointer to the mesh structure. |
sol | pointer to the sol structure. |
br | new level-set base reference. |
Set a new level-set base reference of ref br in ls discretization mode. Base references are boundary conditions to which implicit domain can be attached. All implicit volumes that are not attached to listed based references are deleted as spurious volumes by the rmc option.
Definition at line 176 of file libtools.c.
LIBMMG_CORE_EXPORT int MMG5_Set_multiMat | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
MMG5_int | ref, | ||
int | split, | ||
MMG5_int | rin, | ||
MMG5_int | rex | ||
) |
mesh | pointer to the mesh structure. |
sol | pointer to the sol structure. |
ref | input tetra reference. |
split | MMG5_MMAT_NoSplit if the entity must not be splitted, MMG5_MMAT_Split otherwise |
rin | internal reference after ls discretization |
rex | external reference after ls discretization |
Set the reference mapping for the elements of ref ref in ls discretization mode.
Definition at line 104 of file libtools.c.
LIBMMG_CORE_EXPORT int MMG5_Set_outputMeshName | ( | MMG5_pMesh | mesh, |
const char * | meshout | ||
) |
mesh | pointer to the mesh structure. |
meshout | name of the output mesh file. |
Set the name of output mesh file.
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
mesh | pointer to the mesh structure. |
meshout | name of the output mesh file. |
Set the name of output mesh file.
Definition at line 273 of file API_functions.c.
LIBMMG_CORE_EXPORT int MMG5_Set_outputSolName | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
const char * | solout | ||
) |
mesh | pointer to the mesh structure. |
sol | pointer to the sol structure. |
solout | name of the output solution file. |
Set the name of output solution file.
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
mesh | pointer to the mesh structure. |
sol | pointer to the sol structure. |
solout | name of the output solution file. |
Set the name of output solution file.
Definition at line 388 of file API_functions.c.
LIBMMG_CORE_EXPORT int MMG5_unscaleMesh | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
MMG5_pSol | sol | ||
) |
mesh | pointer to the mesh structure. |
met | pointer to a metric. |
sol | pointer to a solution structure (level-set or displacement). |
Unscale the mesh and the size informations to their initial sizes.
SUBROUTINE MMG5_UNSCALEMESH(mesh,met,ls,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met,ls
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE
mesh | pointer to the mesh structure. |
met | pointer to a metric. |
sol | pointer to a solution structure (level-set or displacement). |
Unscale the mesh and the size informations to their initial sizes.
Definition at line 689 of file scalem.c.