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)
 Main "program" for level-set discretization.
 
int MMGS_mmgslib (MMG5_pMesh mesh, MMG5_pSol met)
 Main "program" for mesh adaptation.
 
void MMGS_Set_commonFunc (void)
 Set common function pointers between mmgs and mmg3d to the matching mmgs functions.
 

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:57
MMG5_int ne
Definition: libmmgtypes.h:620
MMG5_int nei
Definition: libmmgtypes.h:620
MMG5_int nt
Definition: libmmgtypes.h:620
MMG5_int np
Definition: libmmgtypes.h:620
MMG5_int nti
Definition: libmmgtypes.h:620
MMG5_int npi
Definition: libmmgtypes.h:620
MMG5_int nai
Definition: libmmgtypes.h:620
MMG5_int na
Definition: libmmgtypes.h:620

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 
)

Main "program" for mesh adaptation.

Parameters
meshpointer to the mesh structure.
metpointer to the sol (metric) structure.
Returns
MMG5_SUCCESS on success, MMG5_LOWFAILURE in case there is a failure but a conform mesh can be returned or MMG5_STRONGFAILURE if there is a failure 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 
)

Main "program" for level-set discretization.

Parameters
meshpointer to the mesh structure.
solpointer to the sol (level-set) structure.
metpointer to the sol (metric) structure (optionnal).
Returns
MMG5_SUCCESS on success, MMG5_LOWFAILURE if there is a a failure but a conform mesh is saved or MMG5_STRONGFAILURE if there is a a failure 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 to the mesh structure (unused).
solpointer to a solution structure.
metpointer to 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 function pointers between mmgs and mmg3d to the matching mmgs functions.

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: