37#include "mmg/common/mmgcmakedefines.h"
39#if (defined(__APPLE__) && defined(__MACH__))
40#include <sys/sysctl.h>
41#elif defined(__unix__) || defined(__unix) || defined(unix)
43#elif defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(__TOS_WIN__) || defined(__WINDOWS__)
54#define MG_STR "&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"
59#define MMG5_TRIA_LMAX 1024
64#define MMG5_LMAX 10240
67#define MMG5_LPARMAX 200
70#define MG_SMSGN(a,b) (((double)(a)*(double)(b) > (0.0)) ? (1) : (0))
73#define MMG5_BOXSIZE 500
76#define MMG5_MEMMAX 800
77#define MMG5_BITWIZE_MB_TO_B 20
78#define MMG5_MEMPERCENT 0.5
84#define MMG5_DISPREF 10
87#define MMG5_MILLION 1048576
90#define MMG5_ANGEDG 0.707106781186548
91#define MMG5_ANGLIM -0.999999
92#define MMG5_ATHIRD 0.333333333333333
94#define MMG5_EPSD 1.e-30
95#define MMG5_EPSD2 1.0e-200
96#define MMG5_EPS 1.e-06
97#define MMG5_EPSOK 1.e-15
98#define MMG5_NULKAL 1.e-30
100#define MMG5_SQR32 0.866025403784439
103#define M_PI 3.14159265358979323846
104#define M_PI_2 1.57079632679489661923
107#define A64TH 0.015625
111#define MMG5_MEMMIN 38
113#define MMG5_PATHSEP '/'
116#define MMG5_NONSET_MEM -1
117#define MMG5_NONSET_HMIN -1
118#define MMG5_NONSET_HMAX -1
119#define MMG5_NONSET_HSIZ -1
120#define MMG5_NONSET -1
121#define MMG5_HAUSD 0.01
122#define MMG5_HGRAD 0.26236426446
123#define MMG5_HGRADREQ 0.83290912294
124#define MMG5_NOHGRAD -1
129#define MMG5_PROCTREE 32
133#define MMG5_HMINCOE 0.001
134#define MMG5_HMAXCOE 2
135#define MMG5_HMINMAXGAP 5
137#define MMG5_FILESTR_LGTH 128
140#define MG_MAX(a,b) (((a) > (b)) ? (a) : (b))
141#define MG_MIN(a,b) (((a) < (b)) ? (a) : (b))
145#define MG_REF (1 << 0)
146#define MG_GEO (1 << 1)
147#define MG_REQ (1 << 2)
148#define MG_NOM (1 << 3)
149#define MG_BDY (1 << 4)
150#define MG_CRN (1 << 5)
151#define MG_NOSURF (1 << 6)
152#define MG_OPNBDY (1 << 7)
153#define MG_OLDPARBDY (1 << 11)
154#define MG_PARBDYBDY (1 << 12)
155#define MG_PARBDY (1 << 13)
156#define MG_OVERLAP (1 << 14)
157#define MG_NUL (1 << 15)
160#define MG_Vert (1 << 0 )
161#define MG_Tria (1 << 1 )
162#define MG_Tetra (1 << 2 )
163#define MG_Edge (1 << 3 )
166#define MG_VOK(ppt) (ppt && ((ppt)->tag < MG_NUL))
167#define MG_EOK(pt) (pt && ((pt)->v[0] > 0))
169#define MG_SIN(tag) ((tag & MG_CRN) || (tag & MG_REQ))
170#define MG_SIN_OR_NOM(tag) ( MG_SIN(tag) || (tag & MG_NOM) )
171#define MG_RID(tag) ( ( !( MG_SIN_OR_NOM(tag)) ) && ( tag & MG_GEO ) )
173#define MG_EDG(tag) ((tag & MG_GEO) || (tag & MG_REF))
174#define MG_GEO_OR_NOM(tag) (( tag & MG_GEO ) || ( tag & MG_NOM ))
175#define MG_EDG_OR_NOM(tag) ( MG_EDG(tag) || (tag & MG_NOM ) )
176#define MG_TRUE_BDY(tag) ( (tag & MG_BDY) && !(tag & MG_PARBDY) )
180#define MG_SET(flag,bit) ((flag) |= (1 << (bit)))
181#define MG_CLR(flag,bit) ((flag) &= ~(1 << (bit)))
182#define MG_GET(flag,bit) ((flag) & (1 << (bit)))
194#define _LIBMMG5_RETURN(mesh,sol,met,val)do \
196 signal(SIGABRT,SIG_DFL); \
197 signal(SIGFPE,SIG_DFL); \
198 signal(SIGILL,SIG_DFL); \
199 signal(SIGSEGV,SIG_DFL); \
200 signal(SIGTERM,SIG_DFL); \
201 signal(SIGINT,SIG_DFL); \
202 mesh->npi = mesh->np; \
203 mesh->nti = mesh->nt; \
204 mesh->nai = mesh->na; \
205 mesh->nei = mesh->ne; \
207 if ( sol ) { sol->npi = sol->np; } \
208 if ( met ) { met->npi = met->np; } \
215#define MMG5_CHK_MEM(mesh,size,string,law) do \
217 if ( (mesh)->memCur > (mesh)->memMax ) { \
218 fprintf(stderr," ## Error:"); \
219 fprintf(stderr," unable to allocate %s.\n",string); \
220 fprintf(stderr," ## Check the mesh size or "); \
221 fprintf(stderr,"increase maximal authorized memory with the -m option.\n"); \
222 (mesh)->memCur -= (size); \
230 ptr = (
char *)calloc(c*s+
sizeof(
size_t),1);
243 ptr = (
char *)malloc(s+
sizeof(
size_t));
254void *
myrealloc(
void * ptr_in,
size_t s,
size_t oldsize) {
256 char *ptr_in_c = (
char*)ptr_in;
263 ptr_in_c -=
sizeof(size_t);
264 if (oldsize != *((
size_t*)ptr_in_c)) {
265 fprintf(stderr,
"myrealloc: Error: freed memory mismatch\n");
268 ptr = (
char *)realloc(ptr_in_c, s+
sizeof(
size_t));
281 char * ptr_c = (
char*)ptr;
283 if ( !ptr )
return 0;
285 ptr_c = ptr_c-
sizeof(size_t);
286 s = *((
size_t*)ptr_c);
293#define MMG5_DEL_MEM(mesh,ptr) do \
295 size_t size_to_free = myfree(ptr); \
296 (mesh)->memCur -= size_to_free; \
302#define MMG5_ADD_MEM(mesh,size,message,law) do \
304 (mesh)->memCur += (size); \
305 MMG5_CHK_MEM(mesh,size,message,law); \
309#define MMG5_SAFE_FREE(ptr) do \
316#define MMG5_SAFE_CALLOC(ptr,size,type,law) do \
318 ptr = (type*)mycalloc(size,sizeof(type)); \
320 perror(" ## Memory problem: calloc"); \
326#define MMG5_SAFE_MALLOC(ptr,size,type,law) do \
328 size_t size_to_allocate = (size)*sizeof(type); \
329 ptr = (type*)mymalloc(size_to_allocate); \
331 perror(" ## Memory problem: malloc"); \
337#define MMG5_SAFE_REALLOC(ptr,prevSize,newSize,type,message,law) do \
340 size_t size_to_allocate = (newSize)*sizeof(type); \
342 tmp = (type *)myrealloc((ptr),size_to_allocate,(prevSize)*sizeof(type)); \
344 MMG5_SAFE_FREE(ptr); \
345 perror(" ## Memory problem: realloc"); \
353#define MMG5_CHK_INT32_OVERFLOW(wantedGap,oldSiz,coef,shift,law) do \
356 if ( sizeof(MMG5_int) == sizeof(int32_t) ) { \
357 MMG5_int gap_loc = (MMG5_int)((wantedGap) * (oldSiz)); \
358 if ( !gap_loc ) gap_loc = 1; \
360 int32_t max_ne = (INT32_MAX-(shift))/(coef); \
361 if ( max_ne < (oldSiz)+gap_loc ) { \
363 gap_loc = max_ne-(oldSiz); \
364 if ( gap_loc <=0 ) { \
366 fprintf(stderr," ## Error: %s: %d: Unable to reallocate adja array" \
367 " without int overflow.\n",__func__,__LINE__); \
372 wantedGap = (float)gap_loc/(float)oldSiz; \
373 printf("wantGap has been modified %15f\n",wantedGap); \
374 wantedGap = (double)gap_loc/(double)oldSiz; \
375 printf("DwantGap has been modified %15fl\n",wantedGap); \
383#define MMG5_SAFE_RECALLOC(ptr,prevSize,newSize,type,message,law) do \
386 size_t size_to_allocate = (newSize)*sizeof(type); \
388 tmp = (type *)myrealloc((ptr),size_to_allocate,(prevSize)*sizeof(type)); \
390 MMG5_SAFE_FREE(ptr); \
391 perror(" ## Memory problem: realloc"); \
397 if ( newSize > prevSize ) { \
398 memset(&((ptr)[prevSize]),0,((newSize)-(prevSize))*sizeof(type)); \
406#define MMG5_TAB_RECALLOC(mesh,ptr,initSize,wantedGap,type,message,law) do \
410 assert ( mesh->memCur < mesh->memMax ); \
412 gap = (MMG5_int)(floor(wantedGap * initSize)); \
413 if ( !gap ) gap = 1; \
415 if ( mesh->memMax < mesh->memCur + gap*sizeof(type) ) { \
416 gap = (MMG5_int)((mesh->memMax-mesh->memCur)/sizeof(type)); \
418 fprintf(stderr," ## Error:"); \
419 fprintf(stderr," unable to allocate %s.\n",message); \
420 fprintf(stderr," ## Check the mesh size or "); \
421 fprintf(stderr,"increase maximal authorized memory with the -m option.\n"); \
426 MMG5_ADD_MEM(mesh,gap*sizeof(type),message,law); \
427 MMG5_SAFE_RECALLOC((ptr),initSize+1,initSize+gap+1,type,message,law); \
428 initSize = initSize+gap; \
432#define MMG5_INCREASE_MEM_MESSAGE() do \
434 printf(" ## Check the mesh size or increase maximal"); \
435 printf(" authorized memory with the -m option.\n"); \
438#define MMG5_SAFELL2LCAST(longlongval) (((longlongval) > (LONG_MAX)) ? 0 : ((long)(longlongval)))
439#define MMG5_SAFELL2ICAST(longlongval) (((longlongval) > (INT_MAX)) ? 0 : ((int)(longlongval)))
442#define MMG_FREAD(ptr,size,count,stream) do \
445 if ( count != fread(ptr,size,count,stream) ) { \
446 fputs ( "Reading error", stderr ); \
452#define CV_VA_NUM_ARGS_HELPER(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) N
455#define CV_VA_NUM_ARGS(...) CV_VA_NUM_ARGS_HELPER(__VA_ARGS__, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0)
464#define MMG_FSCANF(stream,format,...) do \
466 int io_count = fscanf(stream,format,__VA_ARGS__); \
467 int args_count = CV_VA_NUM_ARGS(__VA_ARGS__); \
468 if ( args_count != io_count ) { \
469 fprintf (stderr, "Reading error: fscanf counts %d args while %d provided\n",io_count,args_count ); \
474#define MMG_FSCANF(stream,format,...) do \
476 int io_count = fscanf(stream,format,__VA_ARGS__); \
477 int args_count = CV_VA_NUM_ARGS(__VA_ARGS__); \
478 if ( 0 > io_count ) { \
479 fprintf (stderr, "Reading error: fscanf counts %d args\n",io_count); \
492 fprintf(stdout,
" ## Warning: we will overflow the memory asked with \"-m\"");
493 fprintf(stdout,
" option during Scotch call.\n" );
506 fprintf(stdout,
"\n Unexpected error:"); fflush(stdout);
509 fprintf(stdout,
" *** potential lack of memory.\n");
break;
511 fprintf(stdout,
" *** Floating-point exception\n");
break;
513 fprintf(stdout,
" *** Illegal instruction\n");
break;
515 fprintf(stdout,
" *** Segmentation fault\n");
break;
518 fprintf(stdout,
" *** Program killed\n");
break;
532#define FUNCTION_POINTER(fproto)\
533 MMG_EXTERN fproto MMG_ASSIGN_NULL
551#define FORTRAN_NAME(nu,nl,pl,pc) \
573#define FORTRAN_VARIADIC(nu,nl,pl,body) \
630 extern void MMG5_nsort(int8_t ,
double *,int8_t *);
631 extern void MMG5_nperm(int8_t n,int8_t shift,int8_t stride,
double *
val,
double *oldval,int8_t *perm);
632 extern double MMG5_det3pt1vec(
double c0[3],
double c1[3],
double c2[3],
double v[3]);
633 extern double MMG5_det4pt(
double c0[3],
double c1[3],
double c2[3],
double c3[3]);
646 int MMG5_paratmet(
double c0[3],
double n0[3],
double m[6],
double c1[3],
double n1[3],
double mt[6]);
648 void MMG5_dotprod(int8_t dim,
double *a,
double *b,
double *result);
650 void MMG5_mn(
double m[6],
double n[6],
double mn[9] );
651 extern int MMG5_rmtr(
double r[3][3],
double m[6],
double mr[6]);
663 MMG5_int,MMG5_int,
double,
int,
double*,MMG5_int*,int8_t);
665 MMG5_int,MMG5_int,
double, MMG5_int,
double*,
666 MMG5_int*,int8_t,
int);
673 double *,
double *,
double *,
double *);
721 double *,
double *,
double,
double,
double);
723 double *,
double *,
double *,
double *,
724 double,
double,
double);
728 extern int MMG5_sys33sym(
double a[6],
double b[3],
double r[3]);
738 FILE **inm,
long *posNodes,
long *posElts,
739 long **posNodeData,
int *bin,
int *iswp,
740 MMG5_int *nelts,
int *nsols);
743 const long posNodes,
const long posElts,
744 const long *posNodeData,
const int bin,
745 const int iswp,
const MMG5_int nelts,
750 int*,
int*,
int**,
long*,
int);
755 int,
int,
int*,
int*,
int*);
808 double vpex[][2],
double ivpex[][2]);
812 double vpex[][3],
double ivpex[][3]);
MMG5_pMesh MMG5_pSol * sol
MMG5_pMesh char * filename
int MMG5_test_transpose3d()
int MMG5_gradsizreq_ani(MMG5_pMesh mesh, MMG5_pSol met)
void MMG5_mmgInit_parameters(MMG5_pMesh mesh)
int MMG5_readFloatSol3D(MMG5_pSol, FILE *, int, int, int)
int MMG5_minQualCheck(MMG5_int iel, double minqual, double alpha)
void MMG5_gradEigenvreq(double *dm, double *dn, double, int8_t, int8_t *)
int MMG5_simred2d(MMG5_pMesh, double *, double *, double dm[2], double dn[2], double vp[2][2])
int MMG5_intridmet(MMG5_pMesh, MMG5_pSol, MMG5_int, MMG5_int, double, double *, double *)
int MMG5_loadSolHeader(const char *, int, FILE **, int *, int *, int *, MMG5_int *, int *, int *, int **, long *, int)
int MMG5_test_intersecmet33(MMG5_pMesh mesh)
int MMG5_3dSolTruncature_ani(MMG5_pMesh mesh, MMG5_pSol met)
short MMG5_dikmov(MMG5_pMesh, MMG5_pSol, short *, short, MMG5_int chkmovmesh(MMG5_pMesh, MMG5_pSol, short, MMG5_int *))
common functions for lagrangian meshing.
void MMG5_advancedUsage(void)
int MMG5_test_updatemet3d_ani()
void MMG5_mn(double m[6], double n[6], double mn[9])
size_t MMG5_memSize(void)
int MMG5_countLocalParamAtTri(MMG5_pMesh, MMG5_iNode **)
void MMG5_writeDoubleSol3D(MMG5_pMesh, MMG5_pSol, FILE *, int, MMG5_int, int)
int MMG5_saveSolAtTrianglesHeader(MMG5_pMesh, FILE *, int, int, MMG5_int *, int, int, int *, int *, int *)
int MMG5_gradsizreq_iso(MMG5_pMesh, MMG5_pSol)
double MMG5_caltri_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTria ptt)
double MMG2D_quickarea(double a[2], double b[2], double c[2])
void MMG5_build3DMetric(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_int ip, double dbuf[6])
static void * mycalloc(size_t c, size_t s)
int MMG5_buildridmet(MMG5_pMesh, MMG5_pSol, MMG5_int, double, double, double, double *, double[3][3])
int MMG5_test_simred2d(MMG5_pMesh mesh, double *mex, double *nex, double *dmex, double *dnex, double vpex[][2])
int MMG5_isSplit(MMG5_pMesh, MMG5_int, MMG5_int *, MMG5_int *)
void MMG5_printSolStats(MMG5_pMesh mesh, MMG5_pSol *sol)
void MMG5_memOption_memSet(MMG5_pMesh mesh)
int MMG5_eigenvmatsym3d(MMG5_pMesh mesh, double m[], double lambda[], double v[][3])
float MMG5_swapf(float sbin)
double MMG5_nonorsurf(MMG5_pMesh mesh, MMG5_pTria pt)
int MMG5_isLevelSet(MMG5_pMesh, MMG5_int, MMG5_int)
static void * myrealloc(void *ptr_in, size_t s, size_t oldsize)
int MMG5_scotchCall(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_pSol fields, MMG5_int *)
int MMG5_check_readedMesh(MMG5_pMesh mesh, MMG5_int nref)
int MMG5_resetRef_ls(MMG5_pMesh)
int MMG5_boundingBox(MMG5_pMesh mesh)
static void MMG5_excfun(int sigid)
double MMG5_test_mat_error(int8_t nelem, double m1[], double m2[])
int MMG5_test_rotmatrix()
int MMG5_Add_inode(MMG5_pMesh mesh, MMG5_iNode **liLi, int val)
MMG5_int MMG5_hashFace(MMG5_pMesh, MMG5_Hash *, MMG5_int, MMG5_int, MMG5_int, MMG5_int)
int MMG5_updatemetreq_ani(double *n, double dn[2], double vp[2][2])
int MMG5_regnor(MMG5_pMesh mesh)
void MMG5_mmgUsage(char *prog)
int MMG5_writeLocalParamAtTri(MMG5_pMesh, MMG5_iNode *, FILE *)
void MMG5_keep_subdomainElts(MMG5_pMesh, int, int(*delElt)(MMG5_pMesh, MMG5_int))
int MMG5_test_crossprod3d()
int MMG5_interp_iso(double *ma, double *mb, double *mp, double t)
double MMG5_surftri_iso(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTria ptt)
int MMG5_rmc(MMG5_pMesh, MMG5_pSol)
void MMG5_check_hminhmax(MMG5_pMesh mesh, int8_t sethmin, int8_t sethmax)
int MMG5_eigenvmatnonsym2d(MMG5_pMesh mesh, double m[], double lambda[], double v[][2])
int MMG5_compute_meanMetricAtMarkedPoints_ani(MMG5_pMesh mesh, MMG5_pSol met)
int MMG5_intersecmet22(MMG5_pMesh mesh, double *m, double *n, double *mr)
void MMG5_paramUsage1(void)
void MMG5_2d3dUsage(void)
static const uint8_t MMG5_iprv2[3]
int MMG5_hashUpdate(MMG5_Hash *hash, MMG5_int a, MMG5_int b, MMG5_int k)
double MMG5_det3pt1vec(double c0[3], double c1[3], double c2[3], double v[3])
int MMG5_truncate_met3d(MMG5_pSol met, MMG5_int ip, double isqhmin, double isqhmax)
int MMG5_mmgIntmet33_ani(double *, double *, double *, double)
double MMG5_det4pt(double c0[3], double c1[3], double c2[3], double c3[3])
int MMG5_test_eigenvmatsym3d(MMG5_pMesh mesh, double *mex, double lambdaex[], double vpex[][3])
int MMG5_saveMshMesh(MMG5_pMesh, MMG5_pSol *, const char *, int)
int MMG5_loadMshMesh_part1(MMG5_pMesh mesh, const char *filename, FILE **inm, long *posNodes, long *posElts, long **posNodeData, int *bin, int *iswp, MMG5_int *nelts, int *nsols)
int MMG5_mmgIntextmet(MMG5_pMesh, MMG5_pSol, MMG5_int, double *, double *)
int MMG5_test_eigenvmatnonsym2d(MMG5_pMesh mesh, double *mex, double lambdaex[], double vpex[][2], double ivpex[][2])
int MMG5_test_updatemet2d_ani()
int MMG5_boulep(MMG5_pMesh mesh, MMG5_int start, int ip, MMG5_int *, MMG5_int *list, MMG5_int *tlist)
int MMG5_boulet(MMG5_pMesh mesh, MMG5_int start, int ip, MMG5_int *list, int8_t s, int8_t *opn)
void MMG5_version(MMG5_pMesh, char *)
Functions needed by libraries API.
int MMG5_readDoubleSol3D(MMG5_pSol, FILE *, int, int, MMG5_int)
int MMG5_simred3d(MMG5_pMesh mesh, double *m, double *n, double dm[3], double dn[3], double vp[3][3])
int MMG5_boulen(MMG5_pMesh, MMG5_int *, MMG5_int, int ip, double *nn)
void MMG5_mark_pointsOnReqEdge_fromTria(MMG5_pMesh mesh)
MMG5_int MMG5_swapbin_int(MMG5_int sbin)
void MMG5_mark_usedVertices(MMG5_pMesh mesh, void(*delPt)(MMG5_pMesh, MMG5_int))
int MMG5_buildridmetfic(MMG5_pMesh, double *, double *, double, double, double, double *)
MMG5_Bezier * MMG5_pBezier
int MMG5_ismaniball(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_int start, int8_t istart)
int MMG5_isNotSplit(MMG5_pMesh, MMG5_int)
int MMG5_buildridmetnor(MMG5_pMesh, MMG5_pSol, MMG5_int, double *, double *, double[3][3])
int MMG5_scale_scalarMetric(MMG5_pMesh, MMG5_pSol, double)
void MMG5_mmgDefaultValues(MMG5_pMesh mesh)
int MMG5_nonUnitNorPts(MMG5_pMesh, MMG5_int, MMG5_int, MMG5_int, double *)
int MMG5_rmtr(double r[3][3], double m[6], double mr[6])
int MMG5_invmat33(double m[3][3], double mi[3][3])
int MMG5_saveSolHeader(MMG5_pMesh, const char *, FILE **, int, int *, MMG5_int *, MMG5_int, int, int, int *, int *, int *)
double MMG5_swapd(double sbin)
int MMG5_loadVtuMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
void MMG5_defUninitSize(MMG5_pMesh mesh, MMG5_pSol met, int8_t ismet)
int MMG5_hashNew(MMG5_pMesh mesh, MMG5_Hash *hash, MMG5_int hsiz, MMG5_int hmax)
int MMG5_resetRef_lssurf(MMG5_pMesh)
void MMG5_displayLengthHisto(MMG5_pMesh, MMG5_int, double *, MMG5_int, MMG5_int, double, MMG5_int, MMG5_int, double, int, double *, MMG5_int *, int8_t)
int MMG5_paratmet(double c0[3], double n0[3], double m[6], double c1[3], double n1[3], double mt[6])
struct MMG5_iNode_s MMG5_iNode
int MMG5_eigenvmatsym2d(MMG5_pMesh mesh, double m[], double lambda[], double v[][2])
void MMG5_Free_ilinkedList(MMG5_pMesh mesh, MMG5_iNode *liLi)
static const uint8_t MMG5_inxt2[6]
void MMG5_mark_verticesAsUnused(MMG5_pMesh mesh)
int MMG5_chkMetricType(MMG5_pMesh mesh, int *type, int *, FILE *inm)
int MMG5_loadMshMesh_part2(MMG5_pMesh mesh, MMG5_pSol *sol, FILE **inm, const long posNodes, const long posElts, const long *posNodeData, const int bin, const int iswp, const MMG5_int nelts, const int nsols)
int MMG5_snpval_ls(MMG5_pMesh mesh, MMG5_pSol sol)
static size_t myfree(void *ptr)
double MMG5_surftri_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTria ptt)
int MMG5_updatemet2d_ani(double *m, double *n, double dm[2], double dn[2], double vp[2][2], int8_t ier)
double MMG5_ridSizeInNormalDir(MMG5_pMesh, int, double *, MMG5_pBezier, double, double)
int MMG5_eigenvmatnonsym3d(MMG5_pMesh mesh, double m[], double lambda[], double v[][3])
void MMG5_printTria(MMG5_pMesh mesh, char *fileName)
void MMG5_printMetStats(MMG5_pMesh mesh, MMG5_pSol met)
int MMG5_devangle(double *n1, double *n2, double crit)
int MMG5_elementWeight(MMG5_pMesh, MMG5_pSol, MMG5_pTria, MMG5_pPoint, MMG5_Bezier *, double r[3][3], double gv[2])
int MMG5_sum_reqEdgeLengthsAtPoint(MMG5_pMesh, MMG5_pSol, MMG5_int ip0, MMG5_int ip1)
int MMG5_MultiMat_init(MMG5_pMesh)
void MMG5_displayLengthHisto_internal(MMG5_int, MMG5_int, MMG5_int, double, MMG5_int, MMG5_int, double, MMG5_int, double *, MMG5_int *, int8_t, int)
void MMG5_dotprod(int8_t dim, double *a, double *b, double *result)
static void MMG5_warnScotch(MMG5_pMesh mesh)
MMG5_int MMG5_hashGet(MMG5_Hash *hash, MMG5_int a, MMG5_int b)
int MMG5_solTruncature_iso(MMG5_pMesh mesh, MMG5_pSol met)
void MMG5_paramUsage2(void)
int MMG5_nortri(MMG5_pMesh mesh, MMG5_pTria pt, double *n)
int MMG5_interpreg_ani(MMG5_pMesh, MMG5_pSol, MMG5_pTria, int8_t, double, double *mr)
int MMG5_hashEdge(MMG5_pMesh mesh, MMG5_Hash *hash, MMG5_int a, MMG5_int b, MMG5_int k)
double MMG5_orvol(MMG5_pPoint point, MMG5_int *v)
int MMG5_rotmatrix(double n[3], double r[3][3])
int MMG5_sys33sym(double a[6], double b[3], double r[3])
int MMG5_updatemet3d_ani(double *m, double *n, double dm[3], double dn[3], double vp[3][3], int8_t ier)
void MMG5_gradation_info(MMG5_pMesh)
double MMG5_ridSizeInTangentDir(MMG5_pMesh, MMG5_pPoint, MMG5_int, MMG5_int *, double, double)
int MMG5_defsiz_startingMessage(MMG5_pMesh, MMG5_pSol, const char *funcname)
void MMG5_transpose3d(double m[3][3])
int MMG5_solveDefmetrefSys(MMG5_pMesh, MMG5_pPoint, MMG5_int *, double r[3][3], double *, double *, double *, double *, double, double, double)
int MMG5_gradsiz_iso(MMG5_pMesh mesh, MMG5_pSol met)
int MMG5_saveDisp(MMG5_pMesh, MMG5_pSol)
int MMG5_compute_meanMetricAtMarkedPoints_iso(MMG5_pMesh mesh, MMG5_pSol met)
int MMG5_invmatg(double m[9], double mi[9])
void MMG5_nsort(int8_t, double *, int8_t *)
int MMG5_snpval_lssurf(MMG5_pMesh mesh, MMG5_pSol sol)
int MMG5_swapbin(int sbin)
static void * mymalloc(size_t s)
int MMG5_grad2metSurfreq(MMG5_pMesh, MMG5_pSol, MMG5_pTria, MMG5_int, MMG5_int)
int MMG5_check_setted_hminhmax(MMG5_pMesh mesh)
void MMG5_fillDefmetregSys(MMG5_int, MMG5_pPoint, int, MMG5_Bezier, double r[3][3], double *, double *, double *, double *)
int MMG5_test_simred3d(MMG5_pMesh mesh, double *mex, double *nex, double *dmex, double *dnex, double vpex[][3])
int MMG5_chkmaniball(MMG5_pMesh mesh, MMG5_int start, int8_t istart)
void MMG5_crossprod3d(double *a, double *b, double *result)
void MMG5_nperm(int8_t n, int8_t shift, int8_t stride, double *val, double *oldval, int8_t *perm)
int MMG5_test_eigenvmatsym2d(MMG5_pMesh mesh, double *mex, double lambdaex[], double vpex[][2])
int MMG5_scale_meshAndSol(MMG5_pMesh, MMG5_pSol, MMG5_pSol, double *)
MMG5_int MMG5_gradsiz_ani(MMG5_pMesh mesh, MMG5_pSol met, int *it)
int MMG5_norpts(MMG5_pMesh, MMG5_int, MMG5_int, MMG5_int, double *)
int MMG5_mmgHashTria(MMG5_pMesh mesh, MMG5_int *adja, MMG5_Hash *, int chkISO)
int MMG5_hashEdgeTag(MMG5_pMesh mesh, MMG5_Hash *hash, MMG5_int a, MMG5_int b, uint16_t k)
void MMG5_Set_commonFunc(void)
double MMG5_caltri_iso(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTria ptt)
int MMG5_reset_metricAtReqEdges_surf(MMG5_pMesh, MMG5_pSol, int8_t)
int MMG5_setref_lssurf(MMG5_pMesh mesh, MMG5_pSol sol)
int MMG5_chkmanimesh(MMG5_pMesh mesh)
int MMG5_invmat22(double m[2][2], double mi[2][2])
int MMG5_boulec(MMG5_pMesh, MMG5_int *, MMG5_int, int ip, double *tt)
int MMG5_solveDefmetregSys(MMG5_pMesh, double r[3][3], double *, double *, double *, double *, double, double, double)
int MMG5_2dSolTruncature_ani(MMG5_pMesh mesh, MMG5_pSol met)
double MMG5_surftri33_ani(MMG5_pMesh, MMG5_pTria, double *, double *, double *)
int MMG5_saveSolAtTetrahedraHeader(MMG5_pMesh, FILE *, int, int, MMG5_int *, int, int, int *, int *, int *)
int MMG5_test_eigenvmatnonsym3d(MMG5_pMesh mesh, double *mex, double lambdaex[], double vpex[][3], double ivpex[][3])
int MMG5_test_intersecmet22(MMG5_pMesh mesh)
void MMG5_bezierEdge(MMG5_pMesh, MMG5_int, MMG5_int, double *, double *, int8_t, double *)
int MMG5_bouler(MMG5_pMesh, MMG5_int *, MMG5_int, int ip, MMG5_int *, MMG5_int *, int *, int *, int)
int MMG5_setref_ls(MMG5_pMesh mesh, MMG5_pSol sol)
MMG5_int MMG5_grad2metSurf(MMG5_pMesh, MMG5_pSol, MMG5_pTria, MMG5_int, MMG5_int)
double MMG5_caltri33_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTria pt)
int MMG5_getStartRef(MMG5_pMesh, MMG5_int, MMG5_int *)
int MMG5_intmetsavedir(MMG5_pMesh mesh, double *m, double *n, double *mr)
int MMG5_invmat(double *m, double *mi)
Identic as MMG5_HGeom but use MMG5_hedge to store edges instead of MMG5_hgeom (memory economy).
Structure to store vertices of an MMG mesh.
Structure to store triangles of a MMG mesh.
struct MMG5_iNode_s * nxt
Cell for linked list of integer value.