Mmg
Simplicial remeshers (mesh adaptation, isovalue discretization, lagrangian movement)
Macros | Functions
libmmgs.c File Reference

API functions for MMGS library. More...

#include "libmmgs.h"
#include "libmmgs_private.h"
#include "mmgsexterns_private.h"
#include "mmgexterns_private.h"
Include dependency graph for libmmgs.c:

Go to the source code of this file.

Macros

#define MMGS_RETURN_AND_PACK(mesh, met, sol, val)
 

Functions

static void MMGS_Free_topoTables (MMG5_pMesh mesh)
 
static int MMGS_packMesh (MMG5_pMesh mesh, MMG5_pSol sol, MMG5_pSol met)
 
int MMGS_mmgsls (MMG5_pMesh mesh, MMG5_pSol sol, MMG5_pSol umet)
 
int MMGS_mmgslib (MMG5_pMesh mesh, MMG5_pSol met)
 
void MMGS_Set_commonFunc (void)
 

Detailed Description

API functions for MMGS library.

Author
Charles Dapogny (UPMC)
Cécile Dobrzynski (Bx INP/Inria/UBordeaux)
Pascal Frey (UPMC)
Algiane Froehly (Inria/UBordeaux)
Version
5
Date
01 2014
Todo:
documentation doxygen

Private API functions for MMGS library: incompatible functions with the main binary.

Definition in file libmmgs.c.

Macro Definition Documentation

◆ MMGS_RETURN_AND_PACK

#define MMGS_RETURN_AND_PACK (   mesh,
  met,
  sol,
  val 
)
Value:
do \
{ \
if ( !MMGS_packMesh(mesh,met,sol) ) { \
mesh->npi = mesh->np; \
mesh->nti = mesh->nt; \
mesh->nai = mesh->na; \
mesh->nei = mesh->ne; \
met->npi = met->np; \
if ( met ) { met->npi = met->np; } \
if ( sol ) { sol->npi = sol->np; } \
return MMG5_LOWFAILURE; \
} \
_LIBMMG5_RETURN(mesh,met,sol,val); \
}while(0)
MMG5_pMesh MMG5_pSol * sol
MMG5_pMesh * mesh
static int MMGS_packMesh(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_pSol met)
Definition: libmmgs.c:93
#define MMG5_LOWFAILURE
Definition: libmmgtypes.h:51
MMG5_int ne
Definition: libmmgtypes.h:612
MMG5_int nei
Definition: libmmgtypes.h:612
MMG5_int nt
Definition: libmmgtypes.h:612
MMG5_int np
Definition: libmmgtypes.h:612
MMG5_int nti
Definition: libmmgtypes.h:612
MMG5_int npi
Definition: libmmgtypes.h:612
MMG5_int nai
Definition: libmmgtypes.h:612
MMG5_int na
Definition: libmmgtypes.h:612

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

Definition at line 49 of file libmmgs.c.

Function Documentation

◆ MMGS_Free_topoTables()

static void MMGS_Free_topoTables ( MMG5_pMesh  mesh)
inlinestatic

Free adja, xtetra and xpoint tables

Definition at line 66 of file libmmgs.c.

Here is the caller graph for this function:

◆ MMGS_mmgslib()

int MMGS_mmgslib ( 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 library.

Remarks
Fortran interface:

‍ SUBROUTINE MMGS_MMGSLIB(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

Definition at line 545 of file libmmgs.c.

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

◆ MMGS_mmgsls()

int MMGS_mmgsls ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the sol (level-set) structure.
metpointer toward the sol (metric) structure (optionnal).
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 level set discretization library. If a metric met is provided, use it to adapt the mesh.

Remarks
Fortran interface:

‍ SUBROUTINE MMGS_MMGSLS(mesh,sol,met,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
MMG5_DATA_PTR_T :: 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

Definition at line 298 of file libmmgs.c.

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

◆ MMGS_packMesh()

static int MMGS_packMesh ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
MMG5_pSol  met 
)
inlinestatic
Parameters
meshpointer toward the mesh structure (unused).
solpointer toward a solution structure.
metpointer toward the solution (metric) structure.

Pack the sparse mesh and create edges before getting out of library

Definition at line 93 of file libmmgs.c.

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

◆ MMGS_Set_commonFunc()

void MMGS_Set_commonFunc ( void  )

Set common pointer functions between mmgs and mmg3d to the matching mmgs functions.

Definition at line 732 of file libmmgs.c.

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