mmg2d
mmg2d.h File Reference
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <limits.h>
#include <math.h>
#include <string.h>
#include <signal.h>
#include <ctype.h>
#include <float.h>
#include "libmmg2d.h"
#include "mmgcommon.h"
Include dependency graph for mmg2d.h:

Go to the source code of this file.

Data Structures

struct  squeue
 
struct  Bucket
 
struct  Hedge
 
struct  HashTable
 

Macros

#define M_MAX(a, b)   (((a) > (b)) ? (a) : (b))
 
#define M_MIN(a, b)   (((a) < (b)) ? (a) : (b))
 
#define M_LAMBDA   0.34
 
#define M_MU   0.33
 
#define _MMG2_EPSD   1.e-10
 
#define _MMG2D_EPSA   1.e-12
 
#define _MMG2D_PRECI   1.
 
#define _MMG2D_SIZE   0.75
 
#define _MMG2D_ALPHA   0.28867513459
 
#define _MMG2D_ALPHAD   3.464101615137755 /* 6.0 / sqrt(3.0) */
 
#define MMG2_LONMAX   1024
 
#define _MMG2D_BADKAL   0.2
 
#define _MMG2_NULKAL   1.e-6
 
#define _MMG2_ANGCORN   -1.e-6
 
#define _MMG2_SHORTMAX   0x7fff
 
#define MMG2_LLONG   2.0
 
#define MMG2_LSHRT   0.3
 
#define MMG2_LOPTL   1.4
 
#define MMG2_LOPTS   0.71
 
#define _MMG2D_NPMAX   50000
 
#define _MMG2D_NEDMAX   100000
 
#define _MMG2D_NEMAX   100000
 
#define _MMG2D_RETURN_AND_FREE(mesh, met, disp, val)
 
#define _MMG2D_POINT_REALLOC(mesh, sol, ip, wantedGap, law, o, tag, retval)
 
#define _MMG2D_TRIA_REALLOC(mesh, jel, wantedGap, law, retval)
 
#define _MMG2D_EDGE_REALLOC(mesh, jel, wantedGap, law, retval)
 

Typedefs

typedef struct squeue Queue
 
typedef QueuepQueue
 
typedef BucketpBucket
 
typedef HashTablepHashTable
 

Functions

static void _MMG2_excfun (int sigid)
 
int _MMG2D_newPt (MMG5_pMesh mesh, double c[2], int16_t tag)
 
void _MMG2D_delPt (MMG5_pMesh mesh, int ip)
 
int _MMG5_newEdge (MMG5_pMesh mesh)
 
void _MMG5_delEdge (MMG5_pMesh mesh, int iel)
 
int _MMG2D_newElt (MMG5_pMesh mesh)
 
int _MMG2D_delElt (MMG5_pMesh mesh, int iel)
 
int _MMG5_getnElt (MMG5_pMesh mesh, int n)
 
int MMG2D_zaldy (MMG5_pMesh mesh)
 
long long _MMG5_memSize (void)
 
int _MMG2D_memOption (MMG5_pMesh mesh)
 
int MMG2_scaleMesh (MMG5_pMesh, MMG5_pSol)
 
int MMG2_unscaleMesh (MMG5_pMesh, MMG5_pSol)
 
int MMG2_pack (MMG5_pMesh, MMG5_pSol)
 
int MMG2_outqua (MMG5_pMesh, MMG5_pSol)
 
int MMG2_mmg2d1 (MMG5_pMesh, MMG5_pSol)
 
int _MMG2D_Init_mesh_var (va_list argptr)
 
int _MMG2D_Free_all_var (va_list argptr)
 
int _MMG2D_Free_structures_var (va_list argptr)
 
int _MMG2D_Free_names_var (va_list argptr)
 
void MMG2D_solTruncatureForOptim (MMG5_pMesh mesh, MMG5_pSol met)
 
int MMG2_mmg2d2 (MMG5_pMesh, MMG5_pSol)
 
int MMG2_mmg2d6 (MMG5_pMesh, MMG5_pSol)
 
int MMG2_mmg2d9 (MMG5_pMesh, MMG5_pSol, MMG5_pSol)
 
int _MMG2_swapdelone (MMG5_pMesh, MMG5_pSol, int, char, double, int *)
 
int _MMG5_mmg2dChkmsh (MMG5_pMesh, int, int)
 
int MMG2_boulep (MMG5_pMesh, int, int, int *)
 
int MMG2_prilen (MMG5_pMesh, MMG5_pSol)
 
int MMG2_coorbary (MMG5_pMesh, MMG5_pTria, double c[2], double *, double *, double *)
 
int MMG2_isInTriangle (MMG5_pMesh, int, double c[2])
 
int MMG2_cutEdge (MMG5_pMesh, MMG5_pTria, MMG5_pPoint, MMG5_pPoint)
 
int MMG2_cutEdgeTriangle (MMG5_pMesh, int, int, int)
 
int MMG2_findTria (MMG5_pMesh, int)
 
int MMG2_locateEdge (MMG5_pMesh, int, int, int *, int *)
 
int MMG2_bdryenforcement (MMG5_pMesh, MMG5_pSol)
 
int MMG2_settagtriangles (MMG5_pMesh, MMG5_pSol)
 
int MMG2_findtrianglestate (MMG5_pMesh, int, int, int, int, int, int)
 
pQueue MMG2_kiuini (MMG5_pMesh mesh, int nbel, double declic, int base)
 
void MMG2_kiufree (pQueue q)
 
int MMG2_kiudel (pQueue q, int iel)
 
int MMG2_kiuput (pQueue q, int iel)
 
int MMG2_kiupop (pQueue q)
 
int MMG2_hashEdge (pHashTable edgeTable, int iel, int ia, int ib)
 
int MMG2_hashNew (HashTable *hash, int hsize, int hmax)
 
int MMG2_baseBdry (MMG5_pMesh mesh)
 
int MMG2_invmat (double *m, double *minv)
 
int simred (double *m1, double *m2, double *m)
 
int _MMG2_cavity (MMG5_pMesh, MMG5_pSol, int, int *)
 
int _MMG2_delone (MMG5_pMesh, MMG5_pSol, int, int *, int)
 
int _MMG2_cenrad_iso (MMG5_pMesh, double *, double *, double *)
 
int _MMG2_getIniRef (MMG5_pMesh, int)
 
int _MMG2_isSplit (MMG5_pMesh, int, int *, int *)
 
int MMG2_parsop (MMG5_pMesh, MMG5_pSol)
 
int _MMG2_ismaniball (MMG5_pMesh, MMG5_pSol, int, char)
 
int _MMG2_snapval (MMG5_pMesh, MMG5_pSol, double *)
 
int _MMG2_chkmanimesh (MMG5_pMesh)
 
int MMG2_hashTria (MMG5_pMesh)
 
int _MMG2_resetRef (MMG5_pMesh)
 
int _MMG2_cuttri_ls (MMG5_pMesh, MMG5_pSol)
 
int _MMG2_setref_ls (MMG5_pMesh, MMG5_pSol)
 
int _MMG2_split1_sim (MMG5_pMesh, MMG5_pSol, int, int vx[3])
 
int _MMG2_split2_sim (MMG5_pMesh, MMG5_pSol, int, int vx[3])
 
int _MMG2_split3_sim (MMG5_pMesh, MMG5_pSol, int, int vx[3])
 
int _MMG2_split1 (MMG5_pMesh, MMG5_pSol, int, int vx[3])
 
int _MMG2_split2 (MMG5_pMesh, MMG5_pSol, int, int vx[3])
 
int _MMG2_split3 (MMG5_pMesh, MMG5_pSol, int, int vx[3])
 
int _MMG2_splitbar (MMG5_pMesh, int, int)
 
int MMG2_assignEdge (MMG5_pMesh)
 
int MMG2_bdryEdge (MMG5_pMesh)
 
int _MMG2_setadj (MMG5_pMesh)
 
int _MMG2_singul (MMG5_pMesh)
 
int _MMG2_analys (MMG5_pMesh)
 
int _MMG2_norver (MMG5_pMesh)
 
int _MMG2_regnor (MMG5_pMesh)
 
int _MMG2_boulen (MMG5_pMesh, int, char, int *, int *, double *)
 
int MMG2_mmg2d1n (MMG5_pMesh, MMG5_pSol)
 
int _MMG2_anatri (MMG5_pMesh, MMG5_pSol, char)
 
int _MMG2_adptri (MMG5_pMesh, MMG5_pSol)
 
int _MMG2_defsiz_iso (MMG5_pMesh, MMG5_pSol)
 
int _MMG2_defsiz_ani (MMG5_pMesh, MMG5_pSol)
 
int _MMG2_defmetbdy_2d (MMG5_pMesh, MMG5_pSol, int, char)
 
int _MMG2_defaultmet_2d (MMG5_pMesh, MMG5_pSol, int, char)
 
int _MMG2_grad2met_ani (MMG5_pMesh, MMG5_pSol, double *, double *, double)
 
int _MMG2_gradsiz_iso (MMG5_pMesh, MMG5_pSol)
 
int _MMG2_gradsiz_ani (MMG5_pMesh, MMG5_pSol)
 
int _MMG2_anaelt (MMG5_pMesh, MMG5_pSol, int)
 
int _MMG2_colelt (MMG5_pMesh, MMG5_pSol, int)
 
int _MMG2_swpmsh (MMG5_pMesh, MMG5_pSol, int)
 
double _MMG2_lencurv_iso (MMG5_pMesh, MMG5_pSol, int, int)
 
double _MMG2_lencurv_ani (MMG5_pMesh, MMG5_pSol, int, int)
 
int _MMG2_chkedg (MMG5_pMesh, int)
 
int _MMG2_bezierCurv (MMG5_pMesh, int, char, double, double *, double *)
 
int _MMG2_dichoto (MMG5_pMesh, MMG5_pSol, int, int *)
 
double _MMG2_quickcal (MMG5_pMesh, MMG5_pTria)
 
int _MMG2_chkcol (MMG5_pMesh, MMG5_pSol, int, char, int *, char)
 
int _MMG2_colver (MMG5_pMesh, int, int *)
 
int _MMG2_colver3 (MMG5_pMesh, int *)
 
int _MMG2_colver2 (MMG5_pMesh, int *)
 
int _MMG2_boulet (MMG5_pMesh, int, char, int *)
 
int _MMG2_bouleendp (MMG5_pMesh, int, char, int *, int *)
 
int _MMG2_savemesh_db (MMG5_pMesh, char *, char)
 
int _MMG2_savemet_db (MMG5_pMesh, MMG5_pSol, char *, char)
 
int _MMG2_chkswp (MMG5_pMesh, MMG5_pSol, int, char, char)
 
int _MMG2_swapar (MMG5_pMesh, int, char)
 
int _MMG5_interpmet22 (MMG5_pMesh, double *, double *, double, double *)
 
int _MMG2_intmet_iso (MMG5_pMesh, MMG5_pSol, int, char, int, double)
 
int _MMG2_intmet_ani (MMG5_pMesh, MMG5_pSol, int, char, int, double)
 
int _MMG2_adpspl (MMG5_pMesh, MMG5_pSol)
 
int _MMG2_adpcol (MMG5_pMesh, MMG5_pSol)
 
int _MMG2_movtri (MMG5_pMesh, MMG5_pSol, int, char)
 
int _MMG2_chkspl (MMG5_pMesh, MMG5_pSol, int, char)
 
int _MMG2_split1b (MMG5_pMesh, int, char, int)
 
int _MMG2_movedgpt (MMG5_pMesh, MMG5_pSol, int, int *, char)
 
int _MMG2_movintpt (MMG5_pMesh, MMG5_pSol, int, int *, char)
 
int _MMG2_movintpt_ani (MMG5_pMesh, MMG5_pSol, int, int *, char)
 
int _MMG2_chkmsh (MMG5_pMesh)
 
int _MMG2_chkor (MMG5_pMesh)
 
int _MMG2_savenor_db (MMG5_pMesh, char *, char)
 
int _MMG2_savedisp_db (MMG5_pMesh mesh, MMG5_pSol, char *, char)
 
int _MMG2_velextLS (MMG5_pMesh, MMG5_pSol)
 
int _MMG2D_indElt (MMG5_pMesh mesh, int kel)
 
int _MMG2D_indPt (MMG5_pMesh mesh, int kp)
 
double long_ani (double *ca, double *cb, double *ma, double *mb)
 
double long_iso (double *ca, double *cb, double *ma, double *mb)
 
double _MMG2_caltri_ani (MMG5_pMesh mesh, MMG5_pSol sol, MMG5_pTria)
 
double _MMG2_caltri_iso (MMG5_pMesh mesh, MMG5_pSol sol, MMG5_pTria)
 
int optlen_ani (MMG5_pMesh mesh, MMG5_pSol sol, double declic, int base)
 
int optlen_iso (MMG5_pMesh mesh, MMG5_pSol sol, double declic, int base)
 
int optlen_iso_bar (MMG5_pMesh mesh, MMG5_pSol sol, double declic, int base)
 
int interp_ani (double *, double *, double *, double)
 
int interp_iso (double *, double *, double *, double)
 
int lissmet_iso (MMG5_pMesh mesh, MMG5_pSol sol)
 
int lissmet_ani (MMG5_pMesh mesh, MMG5_pSol sol)
 
void _MMG2_Init_parameters (MMG5_pMesh mesh)
 
static void _MMG2D_Set_commonFunc ()
 

Variables

static const int MMG2_iare [3][2] = {{1,2},{2,0},{0,1}}
 
static const int MMG2_iopp [3][2] = {{1,2},{0,2},{0,1}}
 
static const unsigned int MMG2_idir [5] = {0,1,2,0,1}
 
static const unsigned int MMG2_inxt [5] = {1,2,0,1,2}
 
double(* MMG2D_lencurv )(MMG5_pMesh, MMG5_pSol, int, int)
 
double(* MMG2D_caltri )(MMG5_pMesh, MMG5_pSol, MMG5_pTria)
 
int(* MMG2_optlen )(MMG5_pMesh, MMG5_pSol, double, int)
 
int(* MMG2D_intmet )(MMG5_pMesh, MMG5_pSol, int, char, int, double)
 
int(* MMG2D_gradsiz )(MMG5_pMesh, MMG5_pSol)
 
int(* MMG2D_defsiz )(MMG5_pMesh, MMG5_pSol)
 

Macro Definition Documentation

◆ _MMG2_ANGCORN

#define _MMG2_ANGCORN   -1.e-6

◆ _MMG2_EPSD

#define _MMG2_EPSD   1.e-10

◆ _MMG2_NULKAL

#define _MMG2_NULKAL   1.e-6

◆ _MMG2_SHORTMAX

#define _MMG2_SHORTMAX   0x7fff

◆ _MMG2D_ALPHA

#define _MMG2D_ALPHA   0.28867513459

◆ _MMG2D_ALPHAD

#define _MMG2D_ALPHAD   3.464101615137755 /* 6.0 / sqrt(3.0) */

◆ _MMG2D_BADKAL

#define _MMG2D_BADKAL   0.2

◆ _MMG2D_EDGE_REALLOC

#define _MMG2D_EDGE_REALLOC (   mesh,
  jel,
  wantedGap,
  law,
  retval 
)
Value:
do \
{ \
int klink; \
"larger edge table",law,retval); \
\
mesh->nanil = mesh->na+1; \
for (klink=mesh->nanil; klink<mesh->namax-1; klink++) \
mesh->edge[klink].b = klink+1; \
\
\
/* We try again to add the point */ \
jel = _MMG5_newEdge(mesh); \
if ( !jel ) {law;} \
}while(0)
#define _MMG5_TAB_RECALLOC(mesh, ptr, initSize, wantedGap, type, message, law, retval)
Definition: mmgcommon.h:253
int nanil
Definition: libmmgtypes.h:492
MMG5_pMesh * mesh
Definition: API_functionsf_2d.c:63
Structure to store edges of a MMG mesh.
Definition: libmmgtypes.h:234
int na
Definition: libmmgtypes.h:480
MMG5_pEdge edge
Definition: libmmgtypes.h:513
int _MMG5_newEdge(MMG5_pMesh mesh)
Definition: zaldy_2d.c:77
MMG5_pMesh char int int * retval
Definition: API_functionsf_2d.c:545
! int namax
Definition: libmmgtypesf.h:530
int namax
Definition: libmmgtypes.h:480

Reallocation of edge table and creation of edge jel

◆ _MMG2D_EPSA

#define _MMG2D_EPSA   1.e-12

◆ _MMG2D_NEDMAX

#define _MMG2D_NEDMAX   100000

◆ _MMG2D_NEMAX

#define _MMG2D_NEMAX   100000

◆ _MMG2D_NPMAX

#define _MMG2D_NPMAX   50000

◆ _MMG2D_POINT_REALLOC

#define _MMG2D_POINT_REALLOC (   mesh,
  sol,
  ip,
  wantedGap,
  law,
  o,
  tag,
  retval 
)
Value:
do \
{ \
int klink; \
"larger point table",law,retval); \
\
mesh->npnil = mesh->np+1; \
for (klink=mesh->npnil; klink<mesh->npmax-1; klink++) \
mesh->point[klink].tmp = klink+1; \
\
/* solution */ \
if ( sol->m ) { \
_MMG5_ADD_MEM(mesh,(sol->size*(mesh->npmax-sol->npmax))*sizeof(double), \
"larger solution",law); \
_MMG5_SAFE_REALLOC(sol->m,sol->size*(mesh->npmax+1), \
double,"larger solution",retval); \
} \
sol->npmax = mesh->npmax; \
\
/* We try again to add the point */ \
ip = _MMG2D_newPt(mesh,o,tag); \
if ( !ip ) {law;} \
}while(0)
MMG5_pPoint point
Definition: libmmgtypes.h:505
#define _MMG5_TAB_RECALLOC(mesh, ptr, initSize, wantedGap, type, message, law, retval)
Definition: mmgcommon.h:253
int npmax
Definition: libmmgtypes.h:480
int npnil
Definition: libmmgtypes.h:490
! int npmax
Definition: libmmgtypesf.h:530
int np
Definition: libmmgtypes.h:480
MMG5_pMesh MMG5_pSol * sol
Definition: API_functionsf_2d.c:63
MMG5_pMesh * mesh
Definition: API_functionsf_2d.c:63
Structure to store points of a MMG mesh.
Definition: libmmgtypes.h:205
! int16_t tag
Definition: libmmgtypesf.h:252
MMG5_pMesh char int int * retval
Definition: API_functionsf_2d.c:545
int _MMG2D_newPt(MMG5_pMesh mesh, double c[2], int16_t tag)
Definition: zaldy_2d.c:38

Reallocation of point table and sol table and creation of point ip with coordinates o and tag tag

◆ _MMG2D_PRECI

#define _MMG2D_PRECI   1.

◆ _MMG2D_RETURN_AND_FREE

#define _MMG2D_RETURN_AND_FREE (   mesh,
  met,
  disp,
  val 
)
Value:
do \
{ \
MMG5_ARG_end) ) { \
return MMG5_LOWFAILURE; \
} \
return(val); \
}while(0)
#define MMG5_ARG_start
Definition: libmmgtypes.h:73
int MMG2D_Free_all(const int starter,...)
Definition: API_functions_2d.c:1250
double val
Definition: mmgcommon.h:427
MMG5_pMesh * mesh
Definition: API_functionsf_2d.c:63
#define MMG5_LOWFAILURE
Definition: libmmgtypes.h:48
#define MMG5_ARG_end
Definition: libmmgtypes.h:159
#define MMG5_ARG_ppMet
Definition: libmmgtypes.h:102
#define MMG5_ARG_ppMesh
Definition: libmmgtypes.h:82

Free allocated pointers of mesh and sol structure and return value val

◆ _MMG2D_SIZE

#define _MMG2D_SIZE   0.75

◆ _MMG2D_TRIA_REALLOC

#define _MMG2D_TRIA_REALLOC (   mesh,
  jel,
  wantedGap,
  law,
  retval 
)
Value:
do \
{ \
int klink,oldSiz; \
\
oldSiz = mesh->ntmax; \
_MMG5_TAB_RECALLOC(mesh,mesh->tria,mesh->ntmax,wantedGap,MMG5_Tria, \
"larger tria table",law,retval); \
\
mesh->nenil = mesh->nt+1; \
for (klink=mesh->nenil; klink<mesh->ntmax-1; klink++) \
mesh->tria[klink].v[2] = klink+1; \
if ( mesh->adja ) { \
/* adja table */ \
_MMG5_ADD_MEM(mesh,3*(mesh->ntmax-oldSiz)*sizeof(int), \
"larger adja table",law); \
_MMG5_SAFE_RECALLOC(mesh->adja,3*oldSiz+5,3*mesh->ntmax+5,int \
,"larger adja table",retval); \
} \
\
/* We try again to add the point */ \
jel = _MMG2D_newElt(mesh); \
if ( !jel ) {law;} \
}while(0)
int ntmax
Definition: libmmgtypes.h:480
if(!ier) exit(EXIT_FAILURE)
! int ntmax
Definition: libmmgtypesf.h:530
int nt
Definition: libmmgtypes.h:480
int nenil
Definition: libmmgtypes.h:491
MMG5_pMesh * mesh
Definition: API_functionsf_2d.c:63
int * adja
Definition: libmmgtypes.h:493
int _MMG2D_newElt(MMG5_pMesh mesh)
Definition: zaldy_2d.c:107
MMG5_pTria tria
Definition: libmmgtypes.h:511
MMG5_pMesh char int int * retval
Definition: API_functionsf_2d.c:545
Definition: libmmgtypes.h:261

Reallocation of tria table and creation of tria jel

◆ M_LAMBDA

#define M_LAMBDA   0.34

◆ M_MAX

#define M_MAX (   a,
  b 
)    (((a) > (b)) ? (a) : (b))

◆ M_MIN

#define M_MIN (   a,
  b 
)    (((a) < (b)) ? (a) : (b))

◆ M_MU

#define M_MU   0.33

◆ MMG2_LLONG

#define MMG2_LLONG   2.0

◆ MMG2_LONMAX

#define MMG2_LONMAX   1024

◆ MMG2_LOPTL

#define MMG2_LOPTL   1.4

◆ MMG2_LOPTS

#define MMG2_LOPTS   0.71

◆ MMG2_LSHRT

#define MMG2_LSHRT   0.3

Typedef Documentation

◆ pBucket

typedef Bucket* pBucket

◆ pHashTable

◆ pQueue

typedef Queue* pQueue

◆ Queue

typedef struct squeue Queue

Function Documentation

◆ _MMG2_adpcol()

int _MMG2_adpcol ( MMG5_pMesh  ,
MMG5_pSol   
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _MMG2_adpspl()

int _MMG2_adpspl ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
Returns
-1 if failed or number of new points.

Analysis and splitting routine for edges in the final step of the algorithm; edges are only splitted on a one-by-one basis

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

◆ _MMG2_adptri()

int _MMG2_adptri ( MMG5_pMesh  ,
MMG5_pSol   
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _MMG2_anaelt()

int _MMG2_anaelt ( MMG5_pMesh  ,
MMG5_pSol  ,
int   
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _MMG2_analys()

int _MMG2_analys ( MMG5_pMesh  mesh)

preprocessing stage: mesh analysis

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

◆ _MMG2_anatri()

int _MMG2_anatri ( MMG5_pMesh  ,
MMG5_pSol  ,
char   
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _MMG2_bezierCurv()

int _MMG2_bezierCurv ( MMG5_pMesh  ,
int  ,
char  ,
double  ,
double *  ,
double *   
)
Here is the caller graph for this function:

◆ _MMG2_bouleendp()

int _MMG2_bouleendp ( MMG5_pMesh  mesh,
int  start,
char  ip,
int *  ip1,
int *  ip2 
)
Parameters
meshpointer toward the mesh structure.
startindex of triangle to start.
ipindex of point for wich we compute the ball.
Returns
1 if success, 0 if fail.

Find the two endpoints of the boundary curves joining ip and fill ip1 and ip2 with their indices.

Here is the caller graph for this function:

◆ _MMG2_boulen()

int _MMG2_boulen ( MMG5_pMesh  ,
int  ,
char  ,
int *  ,
int *  ,
double *   
)
Here is the caller graph for this function:

◆ _MMG2_boulet()

int _MMG2_boulet ( MMG5_pMesh  mesh,
int  start,
char  ip,
int *  list 
)
Parameters
meshpointer toward the mesh structure.
startindex of triangle to start.
ipindex of point for wich we compute the ball.
listpointer toward the computed ball of ip.
Returns
the size of the computed ball or 0 if fail.

Find all triangles sharing ip, $list[0] =$ start do not stop when crossing ridge.

Here is the caller graph for this function:

◆ _MMG2_caltri_ani()

double _MMG2_caltri_ani ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
MMG5_pTria   
)
Here is the caller graph for this function:

◆ _MMG2_caltri_iso()

double _MMG2_caltri_iso ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
MMG5_pTria   
)
Here is the caller graph for this function:

◆ _MMG2_cavity()

int _MMG2_cavity ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
int  ip,
int *  list 
)

Create the cavity point ip, starting from triangle list[0]; Return a negative value for ilist if one of the triangles of the cavity is required

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

◆ _MMG2_cenrad_iso()

int _MMG2_cenrad_iso ( MMG5_pMesh  mesh,
double *  ct,
double *  c,
double *  rad 
)
Parameters
meshPointer toward the mesh structure.
*ctcoordinates of vertices of the element.
*ccenter of circumscribing circle to the element.
*radradius of circumscribing circle to the element.
Returns
0 if failed, 1 otherwise.

Compute radius and center of circumscribing circle to the element.

Here is the caller graph for this function:

◆ _MMG2_chkcol()

int _MMG2_chkcol ( MMG5_pMesh  ,
MMG5_pSol  ,
int  ,
char  ,
int *  ,
char   
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _MMG2_chkedg()

int _MMG2_chkedg ( MMG5_pMesh  ,
int   
)
Here is the caller graph for this function:

◆ _MMG2_chkmanimesh()

int _MMG2_chkmanimesh ( MMG5_pMesh  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _MMG2_chkmsh()

int _MMG2_chkmsh ( MMG5_pMesh  )
Here is the call graph for this function:

◆ _MMG2_chkor()

int _MMG2_chkor ( MMG5_pMesh  )

◆ _MMG2_chkspl()

int _MMG2_chkspl ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  k,
char  i 
)
Parameters
meshpointer toward the mesh
metpointer toward the metric
ktriangle index
ilocal index of the edge to split
Returns
1 if we can split, 0 if not, -1 if fail.

Check whether splitting of edge i in tria k is possible and return the newly created point; possibly perform a dichotomy to find the latest valid position for the point.

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

◆ _MMG2_chkswp()

int _MMG2_chkswp ( MMG5_pMesh  ,
MMG5_pSol  ,
int  ,
char  ,
char   
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _MMG2_colelt()

int _MMG2_colelt ( MMG5_pMesh  ,
MMG5_pSol  ,
int   
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _MMG2_colver()

int _MMG2_colver ( MMG5_pMesh  ,
int  ,
int *   
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _MMG2_colver2()

int _MMG2_colver2 ( MMG5_pMesh  ,
int *   
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _MMG2_colver3()

int _MMG2_colver3 ( MMG5_pMesh  ,
int *   
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _MMG2_cuttri_ls()

int _MMG2_cuttri_ls ( MMG5_pMesh  mesh,
MMG5_pSol  sol 
)
Parameters
meshpointer toward the mesh
solpointer toward the level-set
Returns
1 if success, 0 otherwise

Effective discretization of the 0 level set encoded in sol in the mesh

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

◆ _MMG2_defaultmet_2d()

int _MMG2_defaultmet_2d ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  k,
char  i 
)
Parameters
meshpointer toward the mesh
metpointer toward the metric
kelt index
ivertex index in triangle k
Returns
0 if fail, 1 if success

Impose default metric (isotropic, with size hmax) at vertex i in triangle k.

Here is the caller graph for this function:

◆ _MMG2_defmetbdy_2d()

int _MMG2_defmetbdy_2d ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  k,
char  i 
)
Parameters
meshpointer toward the mesh
metpointer toward the metric
kindex of the tria in which we work
iindex of the point on which we want to compute the metric
Returns
1 if success, 0 if fail

Calculate anisotropic metric tensor at (boundary) vertex i in triangle k on account of geometric approximation of the corresponding curve

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

◆ _MMG2_defsiz_ani()

int _MMG2_defsiz_ani ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh
metpointer toward the metric
Returns
0 if fail, 1 if success

Definition of an anisotropic metric tensor field based on the geometry of the domain; this tensor field is intersected by a user-defined tensor field

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

◆ _MMG2_defsiz_iso()

int _MMG2_defsiz_iso ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh
metpointer toward the metric
Returns
0 if fail, 1 otherwise

New version for the definition of a size map; takes into account the curvature of the external and internal curves present in the mesh

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

◆ _MMG2_delone()

int _MMG2_delone ( MMG5_pMesh  ,
MMG5_pSol  ,
int  ,
int *  ,
int   
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _MMG2_dichoto()

int _MMG2_dichoto ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  k,
int *  vx 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
kelement index.
vxpointer toward table of edges to split.
Returns
1.

Find acceptable position for splitting.

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

◆ _MMG2_excfun()

static void _MMG2_excfun ( int  sigid)
inlinestatic
Parameters
sigidsignal number.

Signal handling: specify error messages depending from catched signal.

Here is the caller graph for this function:

◆ _MMG2_getIniRef()

int _MMG2_getIniRef ( MMG5_pMesh  ,
int   
)
Here is the caller graph for this function:

◆ _MMG2_grad2met_ani()

int _MMG2_grad2met_ani ( MMG5_pMesh  mesh,
MMG5_pSol  met,
double *  m,
double *  n,
double  difsiz 
)
Parameters
meshpointer toward the mesh
metpointer toward the metric
mfrist metric
nsecond metric
difsizmaximal size gap authorized by the gradation.
Returns
0 if fail or we don't need to modify the sizes. ier, where (ier & 1) if metric m is altered, and (ier & 2) if metric n is altered.

Perform simultaneous reduction of matrices m1 and m2, and truncate characteristic sizes so that the difference between two corresponding sizes is less than difsiz.

Ref : https://www.rocq.inria.fr/gamma/Frederic.Alauzet/cours/cea2010_V2.pdf

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

◆ _MMG2_gradsiz_ani()

int _MMG2_gradsiz_ani ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh
metpointer toward the metric
Returns
0 if fail, 1 otherwise

Anisotropic mesh gradation routine

Here is the call graph for this function:

◆ _MMG2_gradsiz_iso()

int _MMG2_gradsiz_iso ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh
metpointer toward the metric
Returns
0 if fail, 1 otherwise

Isotropic mesh gradation routine

Here is the caller graph for this function:

◆ _MMG2_Init_parameters()

void _MMG2_Init_parameters ( MMG5_pMesh  mesh)

◆ _MMG2_intmet_ani()

int _MMG2_intmet_ani ( MMG5_pMesh  ,
MMG5_pSol  ,
int  ,
char  ,
int  ,
double   
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _MMG2_intmet_iso()

int _MMG2_intmet_iso ( MMG5_pMesh  ,
MMG5_pSol  ,
int  ,
char  ,
int  ,
double   
)
Here is the caller graph for this function:

◆ _MMG2_ismaniball()

int _MMG2_ismaniball ( MMG5_pMesh  ,
MMG5_pSol  ,
int  ,
char   
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _MMG2_isSplit()

int _MMG2_isSplit ( MMG5_pMesh  mesh,
int  ref,
int *  refint,
int *  refext 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the sol structure.
Returns
1 if success.

Isosurface discretization

Here is the caller graph for this function:

◆ _MMG2_lencurv_ani()

double _MMG2_lencurv_ani ( MMG5_pMesh  ,
MMG5_pSol  ,
int  ,
int   
)
Here is the caller graph for this function:

◆ _MMG2_lencurv_iso()

double _MMG2_lencurv_iso ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  ip1,
int  ip2 
)

Calculate length of a curve in the considered isotropic metric

Here is the caller graph for this function:

◆ _MMG2_movedgpt()

int _MMG2_movedgpt ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  ilist,
int *  list,
char  improve 
)
Parameters
meshpointer toward the mesh
metpointer toward the metric structure.
listpointer toward the ball of the point.
ilistsize of the ball.
improveforce the new minimum element quality to be greater or equal than 0.9 of the old minimum element quality.
Returns
0 if we can't move the point (or if we fail), 1 if we can.

Relocate boundary vertex whose ball is passed; routine works both in the isotropic and anisotropic case

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

◆ _MMG2_movintpt()

int _MMG2_movintpt ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  ilist,
int *  list,
char  improve 
)
Parameters
meshpointer toward the mesh
metpointer toward the metric structure.
listpointer toward the ball of the point.
ilistsize of the ball.
improveforce the new minimum element quality to be greater or equal than 0.9 of the old minimum element quality.
Returns
0 if we can't move the point (or if we fail), 1 if we can.

Relocate internal vertex whose ball is passed.

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

◆ _MMG2_movintpt_ani()

int _MMG2_movintpt_ani ( MMG5_pMesh  ,
MMG5_pSol  ,
int  ,
int *  ,
char   
)
Here is the caller graph for this function:

◆ _MMG2_movtri()

int _MMG2_movtri ( MMG5_pMesh  ,
MMG5_pSol  ,
int  ,
char   
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _MMG2_norver()

int _MMG2_norver ( MMG5_pMesh  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _MMG2_quickcal()

double _MMG2_quickcal ( MMG5_pMesh  mesh,
MMG5_pTria  pt 
)
Parameters
meshpointer toward the mesh
ptpointer toward the tria
Returns
the oriented area of the triangle.

Compute oriented area of tria pt

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

◆ _MMG2_regnor()

int _MMG2_regnor ( MMG5_pMesh  mesh)
Parameters
meshpointer toward the mesh
Returns
0 if fail, 1 if success

Regularize normal vectors at boundary non singular edges with a Laplacian / antilaplacian smoothing

Here is the call graph for this function:

◆ _MMG2_resetRef()

int _MMG2_resetRef ( MMG5_pMesh  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _MMG2_savedisp_db()

int _MMG2_savedisp_db ( MMG5_pMesh  mesh,
MMG5_pSol  ,
char *  ,
char   
)
Here is the call graph for this function:

◆ _MMG2_savemesh_db()

int _MMG2_savemesh_db ( MMG5_pMesh  ,
char *  ,
char   
)
Here is the caller graph for this function:

◆ _MMG2_savemet_db()

int _MMG2_savemet_db ( MMG5_pMesh  ,
MMG5_pSol  ,
char *  ,
char   
)
Here is the call graph for this function:

◆ _MMG2_savenor_db()

int _MMG2_savenor_db ( MMG5_pMesh  ,
char *  ,
char   
)
Here is the call graph for this function:

◆ _MMG2_setadj()

int _MMG2_setadj ( MMG5_pMesh  mesh)
Parameters
meshpointer toward the mesh
Returns
1 if success, 0 if fail

Set tags GEO and REF to triangles and points by traveling the mesh; count number of subdomains or connected components

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

◆ _MMG2_setref_ls()

int _MMG2_setref_ls ( MMG5_pMesh  ,
MMG5_pSol   
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _MMG2_singul()

int _MMG2_singul ( MMG5_pMesh  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _MMG2_snapval()

int _MMG2_snapval ( MMG5_pMesh  ,
MMG5_pSol  ,
double *   
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _MMG2_split1()

int _MMG2_split1 ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
int  k,
int  vx[3] 
)
Parameters
meshpointer toward the mesh
solpointer toward the metric
ktriangle index
vxlist of new point indices for each edge
Returns
0 if fail, 1 if success

Split 1 edge of triangle k

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

◆ _MMG2_split1_sim()

int _MMG2_split1_sim ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
int  k,
int  vx[3] 
)
Parameters
meshpointer toward the mesh
solpointer toward the metric
ktriangle index
vxlist of new point indices for each edge
Returns
0 if fail, 1 if success

Simulate the split of one edge in triangle k

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

◆ _MMG2_split1b()

int _MMG2_split1b ( MMG5_pMesh  mesh,
int  k,
char  i,
int  ip 
)

mesh pointer toward the mesh

Parameters
kindex of the tria to split
ilocal index of the edge to split
ipglobal index of the new point
Returns
1 if success, 0 if fail

Effective splitting of edge i in tria k: point ip is introduced and the adjacency structure in the mesh is preserved

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

◆ _MMG2_split2()

int _MMG2_split2 ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
int  k,
int  vx[3] 
)
Parameters
meshpointer toward the mesh
solpointer toward the metric
ktriangle index
vxlist of new point indices for each edge
Returns
0 if fail, 1 if success

Split 2 edges of triangle k

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

◆ _MMG2_split2_sim()

int _MMG2_split2_sim ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
int  k,
int  vx[3] 
)
Parameters
meshpointer toward the mesh
solpointer toward the metric
ktriangle index
vxlist of new point indices for each edge
Returns
0 if fail, 1 if success

Simulate the split of two edges in triangle k

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

◆ _MMG2_split3()

int _MMG2_split3 ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
int  k,
int  vx[3] 
)
Parameters
meshpointer toward the mesh
solpointer toward the metric
ktriangle index
vxlist of new point indices for each edge
Returns
0 if fail, 1 if success

Split the three edges of triangle k

Here is the call graph for this function:

◆ _MMG2_split3_sim()

int _MMG2_split3_sim ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
int  k,
int  vx[3] 
)
Parameters
meshpointer toward the mesh
solpointer toward the metric
ktriangle index
vxlist of new point indices for each edge
Returns
0 if fail, 1 if success

Simulate the split of three edges in triangle k

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

◆ _MMG2_splitbar()

int _MMG2_splitbar ( MMG5_pMesh  mesh,
int  k,
int  ip 
)
Parameters
meshpointer toward the mesh
kindex of the tria to split
ipglobal index of the new point
Returns
1 if success, 0 if fail

Insert the point ip inside the tria k

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

◆ _MMG2_swapar()

int _MMG2_swapar ( MMG5_pMesh  ,
int  ,
char   
)
Here is the caller graph for this function:

◆ _MMG2_swapdelone()

int _MMG2_swapdelone ( MMG5_pMesh  ,
MMG5_pSol  ,
int  ,
char  ,
double  ,
int *   
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _MMG2_swpmsh()

int _MMG2_swpmsh ( MMG5_pMesh  ,
MMG5_pSol  ,
int   
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _MMG2_velextLS()

int _MMG2_velextLS ( MMG5_pMesh  ,
MMG5_pSol   
)
Here is the caller graph for this function:

◆ _MMG2D_delElt()

int _MMG2D_delElt ( MMG5_pMesh  mesh,
int  iel 
)
Here is the caller graph for this function:

◆ _MMG2D_delPt()

void _MMG2D_delPt ( MMG5_pMesh  mesh,
int  ip 
)
Here is the caller graph for this function:

◆ _MMG2D_Free_all_var()

int _MMG2D_Free_all_var ( va_list  argptr)
Parameters
argptrlist of the mmg structures that must be deallocated. Each structure must follow one of the MMG5_ARG preprocessor variable that allow to identify it.

argptr contains at least a pointer toward a MMG5_pMesh structure (that will contain the mesh and identified by the MMG5_ARG_ppMesh keyword)

To call the MMG2D_mmg2dlib function, you must also provide a pointer toward a MMG5_pSol structure (that will contain the ouput metric (and the input one, if provided) and identified by the MMG5_ARG_ppMet keyword).

To call the MMG2D_mmg2dls function, you must also provide a pointer toward a MMG5_pSol structure (that will contain the level-set function and identified by the MMG5_ARG_ppLs keyword).

To call the MMG2D_mmg2dmov library, you must also provide a pointer toward a MMG5_pSol structure storing the displacement (and identified by the MMG5_ARG_ppDisp keyword).

Returns
0 if fail, 1 if success

Internal function for deallocations before return (taking a va_list as argument).

Remarks
we pass the structures by reference in order to have argument compatibility between the library call from a Fortran code and a C code.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _MMG2D_Free_names_var()

int _MMG2D_Free_names_var ( va_list  argptr)
Parameters
argptrlist of the mmg structures for whose we want to deallocate the name. Each structure must follow one of the MMG5_ARG* preprocessor variable that allow to identify it. argptr contains at least a pointer toward a MMG5_pMesh structure (that will contain the mesh and identified by the MMG5_ARG_ppMesh keyword) and a pointer toward a MMG5_pSol structure (that will contain the ouput metric (and the input one, if provided) and identified by the MMG5_ARG_ppMet keyword).

Internal function for name deallocations before return (taking a va_list as argument).

Returns
0 if fail, 1 if success
Remarks
we pass the structures by reference in order to have argument compatibility between the library call from a Fortran code and a C code.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _MMG2D_Free_structures_var()

int _MMG2D_Free_structures_var ( va_list  argptr)
Parameters
argptrlist of the mmg structures that must be deallocated. Each structure must follow one of the MMG5_ARG* preprocessor variable that allow to identify it. argptr contains at least a pointer toward a MMG5_pMesh structure (that will contain the mesh and identified by the MMG5_ARG_ppMesh keyword) and a pointer toward a MMG5_pSol structure (that will contain the ouput metric (and the input one, if provided) and identified by the MMG5_ARG_ppMet keyword).

To call the MMG2D_mmg2dls function, you must also provide a pointer toward a MMG5_pSol structure (that will contain the level-set function and identified by the MMG5_ARG_ppLs keyword).

To call the MMG2D_mmg2dmov library, you must also provide a pointer toward a MMG5_pSol structure storing the displacement (and identified by the MMG5_ARG_ppDisp keyword).

Returns
1 if success, 0 if fail

Internal function for structures deallocations before return (taking a va_list as argument).

Remarks
we pass the structures by reference in order to have argument compatibility between the library call from a Fortran code and a C code.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _MMG2D_indElt()

int _MMG2D_indElt ( MMG5_pMesh  mesh,
int  kel 
)
Parameters
meshpointer toward the mesh structure.
kelindex of the element in the unpacked mesh
Returns
0 if fail, index of the element in packed numerotation otherwise.

find the element index in packed numerotation

Here is the caller graph for this function:

◆ _MMG2D_indPt()

int _MMG2D_indPt ( MMG5_pMesh  mesh,
int  kp 
)
Parameters
meshpointer toward the mesh structure.
kpindex of the point in the unpacked mesh
Returns
0 if fail, index of the point in packed numerotation otherwise.

find the point index in packed numerotation

Here is the caller graph for this function:

◆ _MMG2D_Init_mesh_var()

int _MMG2D_Init_mesh_var ( va_list  argptr)
Parameters
argptrlist of the mmg structures that must be initialized. Each structure must follow one of the MMG5_ARG* preprocessor variable that allow to identify it.

argptr contains at least a pointer toward a MMG5_pMesh structure (that will contain the mesh and identified by the MMG5_ARG_ppMesh keyword)

To call the MMG2D_mmg2dlib function, you must also provide a pointer toward a MMG5_pSol structure (that will contain the ouput metric (and the input one, if provided) and identified by the MMG5_ARG_ppMet keyword).

To call the MMG2D_mmg2dls function, you must also provide a pointer toward a MMG5_pSol structure (that will contain the level-set function and identified by the MMG5_ARG_ppLs keyword).

To call the MMG2D_mmg2dmov library, you must also provide a pointer toward a MMG5_pSol structure storing the displacement (and identified by the MMG5_ARG_ppDisp keyword).

Returns
0 if fail, 1 otherwise

Internal function for structure allocations (taking a va_list argument).

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

◆ _MMG2D_memOption()

int _MMG2D_memOption ( MMG5_pMesh  mesh)

memory repartition for the -m option

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

◆ _MMG2D_newElt()

int _MMG2D_newElt ( MMG5_pMesh  mesh)
Here is the caller graph for this function:

◆ _MMG2D_newPt()

int _MMG2D_newPt ( MMG5_pMesh  mesh,
double  c[2],
int16_t  tag 
)
Here is the caller graph for this function:

◆ _MMG2D_Set_commonFunc()

static void _MMG2D_Set_commonFunc ( )
inlinestatic

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

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

◆ _MMG5_delEdge()

void _MMG5_delEdge ( MMG5_pMesh  mesh,
int  iel 
)
Here is the caller graph for this function:

◆ _MMG5_getnElt()

int _MMG5_getnElt ( MMG5_pMesh  mesh,
int  n 
)

◆ _MMG5_interpmet22()

int _MMG5_interpmet22 ( MMG5_pMesh  ,
double *  ,
double *  ,
double  ,
double *   
)
Here is the caller graph for this function:

◆ _MMG5_memSize()

long long _MMG5_memSize ( void  )
Returns
the available memory size of the computer.

Compute the available memory size of the computer.

◆ _MMG5_mmg2dChkmsh()

int _MMG5_mmg2dChkmsh ( MMG5_pMesh  mesh,
int  severe,
int  base 
)
Parameters
meshpointer toward the mesh structure.
severelevel of performed check
baseunused argument.
Returns
0 if fail, 1 if success.

Check the mesh validity

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

◆ _MMG5_newEdge()

int _MMG5_newEdge ( MMG5_pMesh  mesh)

◆ interp_ani()

int interp_ani ( double *  ,
double *  ,
double *  ,
double   
)

◆ interp_iso()

int interp_iso ( double *  ,
double *  ,
double *  ,
double   
)

◆ lissmet_ani()

int lissmet_ani ( MMG5_pMesh  mesh,
MMG5_pSol  sol 
)
Parameters
meshpointer toward the mesh
solpointer toward the metric
Returns
0 if fail, 1 if success

Anisotropic gradation (h-gradation procedure). See: http://www.ann.jussieu.fr/frey/publications/ijnme4398.pdf

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

◆ lissmet_iso()

int lissmet_iso ( MMG5_pMesh  mesh,
MMG5_pSol  sol 
)

◆ long_ani()

double long_ani ( double *  ca,
double *  cb,
double *  ma,
double *  mb 
)

◆ long_iso()

double long_iso ( double *  ca,
double *  cb,
double *  ma,
double *  mb 
)

◆ MMG2_assignEdge()

int MMG2_assignEdge ( MMG5_pMesh  mesh)
Parameters
meshpointer toward the mesh
Returns
0 if fail, 1 otherwise

Transfer some input edge data to the corresponding triangles fields

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

◆ MMG2_baseBdry()

int MMG2_baseBdry ( MMG5_pMesh  mesh)

◆ MMG2_bdryEdge()

int MMG2_bdryEdge ( MMG5_pMesh  mesh)
Parameters
meshpointer toward the mesh
Returns
1 if success, 0 if fail

Create the edges in the mesh from the information stored in the triangles, or by identifying the different components of the mesh.

Remarks
Possible extension needed to take into account constrained edges
Here is the caller graph for this function:

◆ MMG2_bdryenforcement()

int MMG2_bdryenforcement ( MMG5_pMesh  mesh,
MMG5_pSol  sol 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the sol structure.
Returns
0 if fail, 1 otherwise.

Check if all edges exist in the mesh and if not force them.

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

◆ MMG2_boulep()

int MMG2_boulep ( MMG5_pMesh  ,
int  ,
int  ,
int *   
)
Here is the caller graph for this function:

◆ MMG2_coorbary()

int MMG2_coorbary ( MMG5_pMesh  ,
MMG5_pTria  ,
double  c[2],
double *  ,
double *  ,
double *   
)
Here is the caller graph for this function:

◆ MMG2_cutEdge()

int MMG2_cutEdge ( MMG5_pMesh  ,
MMG5_pTria  ,
MMG5_pPoint  ,
MMG5_pPoint   
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2_cutEdgeTriangle()

int MMG2_cutEdgeTriangle ( MMG5_pMesh  ,
int  ,
int  ,
int   
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2_findTria()

int MMG2_findTria ( MMG5_pMesh  mesh,
int  ip 
)

Return the index of one triangle containing ip

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

◆ MMG2_findtrianglestate()

int MMG2_findtrianglestate ( MMG5_pMesh  ,
int  ,
int  ,
int  ,
int  ,
int  ,
int   
)
Here is the caller graph for this function:

◆ MMG2_hashEdge()

int MMG2_hashEdge ( pHashTable  edgeTable,
int  iel,
int  ia,
int  ib 
)
Here is the caller graph for this function:

◆ MMG2_hashNew()

int MMG2_hashNew ( HashTable hash,
int  hsize,
int  hmax 
)
Here is the caller graph for this function:

◆ MMG2_hashTria()

int MMG2_hashTria ( MMG5_pMesh  mesh)
Parameters
meshpointer toward the mesh
Returns
1 if success, 0 if fail

Create adjacency relations between the triangles in the mesh

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

◆ MMG2_invmat()

int MMG2_invmat ( double *  m,
double *  minv 
)

◆ MMG2_isInTriangle()

int MMG2_isInTriangle ( MMG5_pMesh  mesh,
int  k,
double  c[2] 
)

Check whether c lies in triangle k; return k if so, 0 otherwise

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

◆ MMG2_kiudel()

int MMG2_kiudel ( pQueue  q,
int  iel 
)

◆ MMG2_kiufree()

void MMG2_kiufree ( pQueue  q)

◆ MMG2_kiuini()

pQueue MMG2_kiuini ( MMG5_pMesh  mesh,
int  nbel,
double  declic,
int  base 
)

◆ MMG2_kiupop()

int MMG2_kiupop ( pQueue  q)

◆ MMG2_kiuput()

int MMG2_kiuput ( pQueue  q,
int  iel 
)

◆ MMG2_locateEdge()

int MMG2_locateEdge ( MMG5_pMesh  mesh,
int  ia,
int  ib,
int *  kdep,
int *  list 
)
Parameters
meshpointer toward the mesh
iaindex of first extremity of the edge
ibindex of second extremity of the edge
kdeppointer toward the index of the first element intersecting the edge
listpointer toward the list of elts intersected by the edge
Returns
4 if the edge exist in the mesh, 0 if fail, ??? otherwise

Calculate the list of all the triangles intersected by edge (ia,ib), starting from kdep = one triangle in the ball of ia; List lon starts at index 0 and goes to lon-1 and stores 3*k + iare, where iare is one intersected edge; return 4 if edge exists in the mesh

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

◆ MMG2_mmg2d1()

int MMG2_mmg2d1 ( MMG5_pMesh  ,
MMG5_pSol   
)

◆ MMG2_mmg2d1n()

int MMG2_mmg2d1n ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the sol structure.
Returns
1 if success, 0 if strongly fail.

Mesh adaptation – new version of mmg2d1.c

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

◆ MMG2_mmg2d2()

int MMG2_mmg2d2 ( MMG5_pMesh  mesh,
MMG5_pSol  sol 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the sol structure.
Returns
0 if fail, 1 if success.

Mesh triangulation.

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

◆ MMG2_mmg2d6()

int MMG2_mmg2d6 ( MMG5_pMesh  ,
MMG5_pSol   
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2_mmg2d9()

int MMG2_mmg2d9 ( MMG5_pMesh  ,
MMG5_pSol  ,
MMG5_pSol   
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2_outqua()

int MMG2_outqua ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
Returns
0 if the worst element has a nul quality, 1 otherwise.

Print histogram of mesh qualities.

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

◆ MMG2_pack()

int MMG2_pack ( MMG5_pMesh  mesh,
MMG5_pSol  sol 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the solution structure.
Returns
0 if memory problem (uncomplete mesh), 1 otherwise.

Pack the mesh and metric and create explicitly all the mesh structures (edges).

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

◆ MMG2_parsop()

int MMG2_parsop ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh
metpointer toward the metric
Returns
1 if success, 0 if fail

Read parameter file DEFAULT.mmg2d

Here is the caller graph for this function:

◆ MMG2_prilen()

int MMG2_prilen ( MMG5_pMesh  ,
MMG5_pSol   
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2_scaleMesh()

int MMG2_scaleMesh ( MMG5_pMesh  mesh,
MMG5_pSol  sol 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the metric or solution structure.
Returns
1 if success, 0 if fail (computed bounding box too small or one af the anisotropic input metric is not valid).

Scale the mesh and the size informations between 0 and 1. Compute a default value for the hmin/hmax parameters if needed. Truncate the metric sizes between hmin/hmax

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

◆ MMG2_settagtriangles()

int MMG2_settagtriangles ( MMG5_pMesh  ,
MMG5_pSol   
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2_unscaleMesh()

int MMG2_unscaleMesh ( MMG5_pMesh  ,
MMG5_pSol   
)
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:

◆ MMG2D_zaldy()

int MMG2D_zaldy ( MMG5_pMesh  mesh)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ optlen_ani()

int optlen_ani ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
double  declic,
int  base 
)

◆ optlen_iso()

int optlen_iso ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
double  declic,
int  base 
)

◆ optlen_iso_bar()

int optlen_iso_bar ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
double  declic,
int  base 
)

◆ simred()

int simred ( double *  m1,
double *  m2,
double *  m 
)
Here is the call graph for this function:

Variable Documentation

◆ MMG2_iare

const int MMG2_iare[3][2] = {{1,2},{2,0},{0,1}}
static

◆ MMG2_idir

const unsigned int MMG2_idir[5] = {0,1,2,0,1}
static

◆ MMG2_inxt

const unsigned int MMG2_inxt[5] = {1,2,0,1,2}
static

◆ MMG2_iopp

const int MMG2_iopp[3][2] = {{1,2},{0,2},{0,1}}
static

◆ MMG2_optlen

int(* MMG2_optlen) (MMG5_pMesh,MMG5_pSol,double,int)

◆ MMG2D_caltri

double(* MMG2D_caltri) (MMG5_pMesh,MMG5_pSol,MMG5_pTria)

◆ MMG2D_defsiz

int(* MMG2D_defsiz) (MMG5_pMesh,MMG5_pSol)

◆ MMG2D_gradsiz

int(* MMG2D_gradsiz) (MMG5_pMesh,MMG5_pSol)

◆ MMG2D_intmet

int(* MMG2D_intmet) (MMG5_pMesh,MMG5_pSol,int,char,int,double)

◆ MMG2D_lencurv

double(* MMG2D_lencurv) (MMG5_pMesh,MMG5_pSol,int,int)