mmg3d
mmg.c File Reference

Common part for functions used in mmgs.c and mmg3d.c files. More...

#include "mmgcommon.h"
Include dependency graph for mmg.c:

Functions

void MMG5_mmgUsage (char *prog)
 
void MMG5_paramUsage1 (void)
 
void MMG5_paramUsage2 (void)
 
void MMG5_lagUsage (void)
 
void MMG5_2d3dUsage (void)
 
void MMG5_advancedUsage (void)
 
void MMG5_mmgDefaultValues (MMG5_pMesh mesh)
 
int MMG5_countLocalParamAtTri (MMG5_pMesh mesh, MMG5_iNode **bdryRefs)
 
int MMG5_writeLocalParamAtTri (MMG5_pMesh mesh, MMG5_iNode *bdryRefs, FILE *out)
 
void MMG5_solTruncatureForOptim (MMG5_pMesh mesh, MMG5_pSol met)
 
char * MMG5_Get_filenameExt (char *filename)
 
char * MMG5_Get_basename (char *path)
 
char * MMG5_Get_path (char *path)
 
char * MMG5_Remove_ext (char *path, char *ext)
 
int MMG5_Get_format (char *ptr, int fmt)
 
const char * MMG5_Get_formatName (enum MMG5_Format fmt)
 

Detailed Description

Common part for functions used in mmgs.c and mmg3d.c files.

Author
Charles Dapogny (UPMC)
Cécile Dobrzynski (Bx INP/Inria/UBordeaux)
Pascal Frey (UPMC)
Algiane Froehly (Inria/UBordeaux)
Version
5
Date
04 2015

Function Documentation

◆ MMG5_2d3dUsage()

void MMG5_2d3dUsage ( void  )

Print help for common options between 2D and 3D.

Here is the caller graph for this function:

◆ MMG5_advancedUsage()

void MMG5_advancedUsage ( void  )

Print help for advanced users of mmg.

Here is the caller graph for this function:

◆ MMG5_countLocalParamAtTri()

int MMG5_countLocalParamAtTri ( MMG5_pMesh  mesh,
MMG5_iNode **  bdryRefs 
)
inline
Parameters
meshpointer toward the mesh structure.
bdryRefspointer toward the list of the boundary references.
Returns
npar, the number of local parameters at triangles if success, 0 otherwise.

Count the local default values at triangles and fill the list of the boundary references.

Count the number of different boundary references and list it

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

◆ MMG5_Get_basename()

char* MMG5_Get_basename ( char *  path)
Parameters
pathstring containing a filename and its path
Returns
a pointer toward the allocated string that contains the file basename.

Extract basename from a path (allocate a string to store it).

Here is the caller graph for this function:

◆ MMG5_Get_filenameExt()

char* MMG5_Get_filenameExt ( char *  filename)
Parameters
filenamestring containing a filename
Returns
pointer toward the filename extension or toward the end of the string if no extension have been founded

Get the extension of the filename string. Do not consider '.o' as an extension.

Here is the caller graph for this function:

◆ MMG5_Get_format()

int MMG5_Get_format ( char *  ptr,
int  fmt 
)
Parameters
ptrpointer toward the file extension (dot included)
fmtdefault file format.
Returns
and index associated to the file format detected from the extension.

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.

Here is the caller graph for this function:

◆ MMG5_Get_formatName()

const char* MMG5_Get_formatName ( enum MMG5_Format  fmt)
Parameters
fmtfile format.
Returns
The name of the file format in a string.

Print the name of the file format associated to fmt.

Here is the caller graph for this function:

◆ MMG5_Get_path()

char* MMG5_Get_path ( char *  path)
Parameters
pathstring containing a filename and its path
Returns
a pointer toward the path allocated here

Remove filename from a path and return the path in a newly allocated string.

Here is the call graph for this function:

◆ MMG5_lagUsage()

void MMG5_lagUsage ( void  )

Print help for lagrangian motion option.

Here is the caller graph for this function:

◆ MMG5_mmgDefaultValues()

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

Print the default parameters values.

Here is the caller graph for this function:

◆ MMG5_mmgUsage()

void MMG5_mmgUsage ( char *  prog)
Parameters
*progpointer toward the program name.

Print help for common options of the 3 codes (first section).

Here is the caller graph for this function:

◆ MMG5_paramUsage1()

void MMG5_paramUsage1 ( void  )

Print help for common parameters options of the 3 codes (first section).

Here is the caller graph for this function:

◆ MMG5_paramUsage2()

void MMG5_paramUsage2 ( void  )

Print help for common options of the 3 codes (second section).

Here is the caller graph for this function:

◆ MMG5_Remove_ext()

char* MMG5_Remove_ext ( char *  path,
char *  ext 
)
Parameters
pathpath from which we want to remove the extension.
Returns
allocated string or NULL if the allocation fail.

Allocate a new string and copy path without extension in it.

Here is the call graph for this function:

◆ MMG5_solTruncatureForOptim()

void MMG5_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.

Warning
works only for a metric computed by the DoSol function because we suppose that we have a diagonal tensor in aniso.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG5_writeLocalParamAtTri()

int MMG5_writeLocalParamAtTri ( MMG5_pMesh  mesh,
MMG5_iNode bdryRefs,
FILE *  out 
)
inline
Parameters
meshpointer toward the mesh structure.
bdryRefspointer toward the list of the boundary references.
outpointer toward the file in which to write.
Returns
1 if success, 0 otherwise.

Write the local default values at triangles in the parameter file.

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