mmg2d
libmmg2d.c File Reference
#include "mmg2d.h"
Include dependency graph for libmmg2d.c:

Macros

#define _MMG2D_RETURN_AND_PACK(mesh, met, val)
 

Functions

void MMG2D_solTruncatureForOptim (MMG5_pMesh mesh, MMG5_pSol met)
 
int MMG2D_mmg2dlib (MMG5_pMesh mesh, MMG5_pSol sol)
 
static int _MMG2D_restart (MMG5_pMesh mesh)
 
int MMG2D_mmg2dmesh (MMG5_pMesh mesh, MMG5_pSol sol)
 
int MMG2D_mmg2dls (MMG5_pMesh mesh, MMG5_pSol sol)
 
int MMG2D_mmg2dmov (MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol disp)
 

Macro Definition Documentation

◆ _MMG2D_RETURN_AND_PACK

#define _MMG2D_RETURN_AND_PACK (   mesh,
  met,
  val 
)
Value:
do \
{ \
if ( !MMG2_pack(mesh,met) ) { \
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 nt
Definition: libmmgtypes.h:480
int np
Definition: libmmgtypes.h:480
MMG5_pMesh * mesh
Definition: API_functionsf_2d.c:63
#define MMG5_LOWFAILURE
Definition: libmmgtypes.h:48
int na
Definition: libmmgtypes.h:480
int ne
Definition: libmmgtypes.h:480
int MMG2_pack(MMG5_pMesh mesh, MMG5_pSol sol)
Definition: hash_2d.c:354

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

Function Documentation

◆ _MMG2D_restart()

static int _MMG2D_restart ( MMG5_pMesh  mesh)
inlinestatic
Parameters
meshpointer toward the mesh structure.
Returns
0 if fail (lack of memory), 1 otherwise.

Clean the mesh structure when we just call the MMG2D_Free_Triangles and MMG2D_Free_Edges functions between 2 call of the MMG2D_mmg2dmesh function:

  • Allocate the tria and edge structures if needed;
  • Reset the tags at vertices.

If needed, reallocate the missing structures

Here is the caller graph for this function:

◆ MMG2D_mmg2dlib()

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

Main program for the mesh adaptation library .

Remarks
Fortran interface:

SUBROUTINE MMG2D_MMG2DLIB(mesh,sol,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

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

◆ MMG2D_mmg2dls()

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

Main program for the level-set discretization library .

Remarks
Fortran interface:

SUBROUTINE MMG2D_MMG2DLS(mesh,sol,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

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

◆ MMG2D_mmg2dmesh()

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

Main program for the mesh generation library .

Remarks
Fortran interface:

SUBROUTINE MMG2D_MMG2DMESH(mesh,sol,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

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

◆ MMG2D_mmg2dmov()

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

Main program for the rigid body movement library .

Remarks
Fortran interface:

SUBROUTINE MMG2D_MMG2DMOV(mesh,sol,disp,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol,disp
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

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

◆ MMG2D_solTruncatureForOptim()

void MMG2D_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: