mmgs
libmmgs.c File Reference

API functions for MMGS library. More...

#include "mmgs.h"
#include "mmgsexterns.h"
Include dependency graph for libmmgs.c:

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)
 

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.

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 * mesh
Definition: API_functionsf_s.c:63
static int MMGS_packMesh(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_pSol met)
Definition: libmmgs.c:91
#define MMG5_LOWFAILURE
Definition: libmmgtypes.h:51
int np
Definition: libmmgtypes.h:582
int nt
Definition: libmmgtypes.h:582
int ne
Definition: libmmgtypes.h:582
int na
Definition: libmmgtypes.h:582

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

Function Documentation

◆ MMGS_Free_topoTables()

static void MMGS_Free_topoTables ( MMG5_pMesh  mesh)
inlinestatic

Free adja, xtetra and xpoint tables

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

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

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

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