Mmg
Simplicial remeshers (mesh adaptation, isovalue discretization, lagrangian movement)
mmgcommon_private.h
Go to the documentation of this file.
1/* =============================================================================
2** This file is part of the mmg software package for the tetrahedral
3** mesh modification.
4** Copyright (c) Bx INP/Inria/UBordeaux/UPMC, 2004- .
5**
6** mmg is free software: you can redistribute it and/or modify it
7** under the terms of the GNU Lesser General Public License as published
8** by the Free Software Foundation, either version 3 of the License, or
9** (at your option) any later version.
10**
11** mmg is distributed in the hope that it will be useful, but WITHOUT
12** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13** FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14** License for more details.
15**
16** You should have received a copy of the GNU Lesser General Public
17** License and of the GNU General Public License along with mmg (in
18** files COPYING.LESSER and COPYING). If not, see
19** <http://www.gnu.org/licenses/>. Please read their terms carefully and
20** use this copy of the mmg distribution only if you accept them.
21** =============================================================================
22*/
23
24#ifndef MMGCOMMON_H
25#define MMGCOMMON_H
26
27#include <assert.h>
28#include <stdlib.h>
29#include <stdio.h>
30#include <limits.h>
31#include <string.h>
32#include <signal.h>
33#include <ctype.h>
34#include <float.h>
35#include <math.h>
36#include <complex.h>
37#include "mmg/common/mmgcmakedefines.h"
38
39#if (defined(__APPLE__) && defined(__MACH__))
40#include <sys/sysctl.h>
41#elif defined(__unix__) || defined(__unix) || defined(unix)
42#include <unistd.h>
43#elif defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(__TOS_WIN__) || defined(__WINDOWS__)
44#include <windows.h>
45#endif
46
47#ifdef __cplusplus
48extern "C" {
49#endif
50
51#include "eigenv_private.h"
53
54#define MG_STR "&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"
55
59#define MMG5_TRIA_LMAX 1024
60
64#define MMG5_LMAX 10240
65
67#define MMG5_LPARMAX 200
68
70#define MG_SMSGN(a,b) (((double)(a)*(double)(b) > (0.0)) ? (1) : (0))
71
73#define MMG5_BOXSIZE 500
74
76#define MMG5_MEMMAX 800
77#define MMG5_BITWIZE_MB_TO_B 20
78#define MMG5_MEMPERCENT 0.5
80/* Macro for unset or unititialized mark */
81#define MMG5_UNSET -1
82
83/* reference of the boundary that moves in lagrangian mode */
84#define MMG5_DISPREF 10
85
86/* million */
87#define MMG5_MILLION 1048576
88
89/* numerical accuracy */
90#define MMG5_ANGEDG 0.707106781186548 /*0.573576436351046 */
91#define MMG5_ANGLIM -0.999999
92#define MMG5_ATHIRD 0.333333333333333
93
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
99
100#define MMG5_SQR32 0.866025403784439
101
102#ifndef M_PI
103#define M_PI 3.14159265358979323846
104#define M_PI_2 1.57079632679489661923
105#endif
106
107#define A64TH 0.015625
108#define A16TH 0.0625
109#define A32TH 0.03125
110
111#define MMG5_MEMMIN 38
113#define MMG5_PATHSEP '/'
114
115/* Variables for option initialization */
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
125#define MMG5_LAG -1
126#define MMG5_NR -1
127#define MMG5_LS 0.0
128#define MMG5_XREG 0.4
129#define MMG5_PROCTREE 32
130#define MMG5_OFF 0
131#define MMG5_ON 1
132#define MMG5_GAP 0.2
133#define MMG5_HMINCOE 0.001
134#define MMG5_HMAXCOE 2
135#define MMG5_HMINMAXGAP 5
136#define MMG5_FEM 1
137#define MMG5_FILESTR_LGTH 128
139/* Macros */
140#define MG_MAX(a,b) (((a) > (b)) ? (a) : (b))
141#define MG_MIN(a,b) (((a) < (b)) ? (a) : (b))
142
143/* tags */
144#define MG_NOTAG (0)
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)
159/* binary tags for local parameters */
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)))
184#define MMG5_KA 7
185#define MMG5_KB 11
187/* file reading */
188#define MMG5_SW 4
189#define MMG5_SD 8
190
194#define _LIBMMG5_RETURN(mesh,sol,met,val)do \
195 { \
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; \
206 mesh->xt = 0; \
207 if ( sol ) { sol->npi = sol->np; } \
208 if ( met ) { met->npi = met->np; } \
209 return val; \
210 }while(0)
211
212/* Macros for memory management */
215#define MMG5_CHK_MEM(mesh,size,string,law) do \
216 { \
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); \
223 law; \
224 } \
225 }while(0)
226
227static inline
228void * mycalloc(size_t c, size_t s) {
229 char *ptr;
230 ptr = (char *)calloc(c*s+sizeof(size_t),1);
231 if (ptr == NULL)
232 return NULL;
233 else {
234 *((size_t*)ptr)=c*s;
235 ptr+=sizeof(size_t);
236 return (void*)ptr;
237 }
238}
239
240static inline
241void * mymalloc(size_t s) {
242 char *ptr;
243 ptr = (char *)malloc(s+sizeof(size_t));
244 if (ptr == NULL)
245 return NULL;
246 else {
247 *((size_t*)ptr)=s;
248 ptr+=sizeof(size_t);
249 return (void*)ptr;
250 }
251}
252
253static inline
254void * myrealloc(void * ptr_in, size_t s, size_t oldsize) {
255 char *ptr;
256 char *ptr_in_c = (char*)ptr_in;
257
258 if ( !ptr_in ) {
259 assert ( !oldsize );
260 return mymalloc( s );
261 }
262
263 ptr_in_c -= sizeof(size_t);
264 if (oldsize != *((size_t*)ptr_in_c)) {
265 fprintf(stderr, "myrealloc: Error: freed memory mismatch\n");
266 assert(0);
267 }
268 ptr = (char *)realloc(ptr_in_c, s+sizeof(size_t));
269 if (ptr == NULL)
270 return NULL;
271 else {
272 *((size_t*)ptr)=s;
273 ptr+=sizeof(size_t);
274 return (void*)ptr;
275 }
276}
277
278static inline
279size_t myfree(void *ptr) {
280 size_t s;
281 char * ptr_c = (char*)ptr;
282
283 if ( !ptr ) return 0;
284
285 ptr_c = ptr_c-sizeof(size_t);
286 s = *((size_t*)ptr_c);
287 free(ptr_c);
288
289 return s;
290}
291
293#define MMG5_DEL_MEM(mesh,ptr) do \
294 { \
295 size_t size_to_free = myfree(ptr); \
296 (mesh)->memCur -= size_to_free; \
297 ptr = NULL; \
298 }while(0)
299
302#define MMG5_ADD_MEM(mesh,size,message,law) do \
303 { \
304 (mesh)->memCur += (size); \
305 MMG5_CHK_MEM(mesh,size,message,law); \
306 }while(0)
307
309#define MMG5_SAFE_FREE(ptr) do \
310 { \
311 myfree(ptr); \
312 ptr = NULL; \
313 }while(0)
314
316#define MMG5_SAFE_CALLOC(ptr,size,type,law) do \
317 { \
318 ptr = (type*)mycalloc(size,sizeof(type)); \
319 if ( !ptr ) { \
320 perror(" ## Memory problem: calloc"); \
321 law; \
322 } \
323 }while(0)
324
326#define MMG5_SAFE_MALLOC(ptr,size,type,law) do \
327 { \
328 size_t size_to_allocate = (size)*sizeof(type); \
329 ptr = (type*)mymalloc(size_to_allocate); \
330 if ( !ptr ) { \
331 perror(" ## Memory problem: malloc"); \
332 law; \
333 } \
334 }while(0)
335
337#define MMG5_SAFE_REALLOC(ptr,prevSize,newSize,type,message,law) do \
338 { \
339 type* tmp; \
340 size_t size_to_allocate = (newSize)*sizeof(type); \
341 \
342 tmp = (type *)myrealloc((ptr),size_to_allocate,(prevSize)*sizeof(type)); \
343 if ( !tmp ) { \
344 MMG5_SAFE_FREE(ptr); \
345 perror(" ## Memory problem: realloc"); \
346 law; \
347 } \
348 \
349 (ptr) = tmp; \
350 }while(0)
351
353#define MMG5_CHK_INT32_OVERFLOW(wantedGap,oldSiz,coef,shift,law) do \
354 { \
355 /* Check for int32 overflow */ \
356 if ( sizeof(MMG5_int) == sizeof(int32_t) ) { \
357 MMG5_int gap_loc = (MMG5_int)((wantedGap) * (oldSiz)); \
358 if ( !gap_loc ) gap_loc = 1; \
359 \
360 int32_t max_ne = (INT32_MAX-(shift))/(coef); \
361 if ( max_ne < (oldSiz)+gap_loc ) { \
362 /* Detected overflow, target maximal possible size */ \
363 gap_loc = max_ne-(oldSiz); \
364 if ( gap_loc <=0 ) { \
365 /* No possibe realloc without int overflow */ \
366 fprintf(stderr," ## Error: %s: %d: Unable to reallocate adja array" \
367 " without int overflow.\n",__func__,__LINE__); \
368 gap_loc = 0; \
369 law; \
370 } \
371 else { \
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); \
376 } \
377 } \
378 } \
379 }while(0)
380
381
383#define MMG5_SAFE_RECALLOC(ptr,prevSize,newSize,type,message,law) do \
384 { \
385 type* tmp; \
386 size_t size_to_allocate = (newSize)*sizeof(type); \
387 \
388 tmp = (type *)myrealloc((ptr),size_to_allocate,(prevSize)*sizeof(type)); \
389 if ( !tmp ) { \
390 MMG5_SAFE_FREE(ptr); \
391 perror(" ## Memory problem: realloc"); \
392 law; \
393 } \
394 else { \
395 (ptr) = tmp; \
396 assert(ptr); \
397 if ( newSize > prevSize ) { \
398 memset(&((ptr)[prevSize]),0,((newSize)-(prevSize))*sizeof(type)); \
399 } \
400 } \
401 }while(0)
402
406#define MMG5_TAB_RECALLOC(mesh,ptr,initSize,wantedGap,type,message,law) do \
407 { \
408 MMG5_int gap; \
409 \
410 assert ( mesh->memCur < mesh->memMax ); \
411 \
412 gap = (MMG5_int)(floor(wantedGap * initSize)); \
413 if ( !gap ) gap = 1; \
414 \
415 if ( mesh->memMax < mesh->memCur + gap*sizeof(type) ) { \
416 gap = (MMG5_int)((mesh->memMax-mesh->memCur)/sizeof(type)); \
417 if(gap<1) { \
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"); \
422 law; \
423 } \
424 } \
425 \
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; \
429 }while(0);
430
432#define MMG5_INCREASE_MEM_MESSAGE() do \
433 { \
434 printf(" ## Check the mesh size or increase maximal"); \
435 printf(" authorized memory with the -m option.\n"); \
436 } while(0)
437
438#define MMG5_SAFELL2LCAST(longlongval) (((longlongval) > (LONG_MAX)) ? 0 : ((long)(longlongval)))
439#define MMG5_SAFELL2ICAST(longlongval) (((longlongval) > (INT_MAX)) ? 0 : ((int)(longlongval)))
440
442#define MMG_FREAD(ptr,size,count,stream) do \
443 { \
444 \
445 if ( count != fread(ptr,size,count,stream) ) { \
446 fputs ( "Reading error", stderr ); \
447 return -1; \
448 } \
449 } while(0);
450
452#define CV_VA_NUM_ARGS_HELPER(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) N
453
455#define CV_VA_NUM_ARGS(...) CV_VA_NUM_ARGS_HELPER(__VA_ARGS__, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0)
456
463#ifdef MMG_POSIX
464#define MMG_FSCANF(stream,format,...) do \
465 { \
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 ); \
470 return -1; \
471 } \
472 } while(0);
473#else
474#define MMG_FSCANF(stream,format,...) do \
475 { \
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); \
480 return -1; \
481 } \
482 } while(0);
483#endif
484
486#ifdef USE_SCOTCH
488static inline
490 if ( mesh->info.imprim > 4 || mesh->info.ddebug ) {
491 if ( mesh->info.mem >= 0 ) {
492 fprintf(stdout," ## Warning: we will overflow the memory asked with \"-m\"");
493 fprintf(stdout," option during Scotch call.\n" );
494 }
495 }
496}
497#endif
504static inline
505void MMG5_excfun(int sigid) {
506 fprintf(stdout,"\n Unexpected error:"); fflush(stdout);
507 switch(sigid) {
508 case SIGABRT:
509 fprintf(stdout," *** potential lack of memory.\n"); break;
510 case SIGFPE:
511 fprintf(stdout," *** Floating-point exception\n"); break;
512 case SIGILL:
513 fprintf(stdout," *** Illegal instruction\n"); break;
514 case SIGSEGV:
515 fprintf(stdout," *** Segmentation fault\n"); break;
516 case SIGTERM:
517 case SIGINT:
518 fprintf(stdout," *** Program killed\n"); break;
519 }
520 exit(EXIT_FAILURE);
521}
522
532#define FUNCTION_POINTER(fproto)\
533 MMG_EXTERN fproto MMG_ASSIGN_NULL
534
535
536
537/* Macro for fortran function generation */
551#define FORTRAN_NAME(nu,nl,pl,pc) \
552 void nu pl; \
553 void nl pl \
554 { nu pc; } \
555 void nl##_ pl \
556 { nu pc; } \
557 void nl##__ pl \
558 { nu pc; } \
559 void nu pl
560
573#define FORTRAN_VARIADIC(nu,nl,pl,body) \
574 void nu pl \
575 { body } \
576 void nl pl \
577 { body } \
578 void nl##_ pl \
579 { body } \
580 void nl##__ pl \
581 { body } \
582
583
584/* Global variables */
585 static const uint8_t MMG5_inxt2[6] = {1,2,0,1,2};
586 static const uint8_t MMG5_iprv2[3] = {2,0,1};
588/* Private structures */
611typedef struct {
612 double b[10][3];
613 double n[6][3];
614 double t[6][3];
618
623typedef struct MMG5_iNode_s {
624 MMG5_int val;
627
628/* Functions declarations */
629 void MMG5_version(MMG5_pMesh,char*);
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]);
634 int MMG5_devangle(double* n1, double *n2, double crit);
635 extern double MMG5_orvol(MMG5_pPoint point,MMG5_int *v);
636 int MMG5_Add_inode( MMG5_pMesh mesh, MMG5_iNode **liLi, int val );
637 int MMG5_eigenvmatsym2d(MMG5_pMesh mesh,double m[],double lambda[],double v[][2]);
638 int MMG5_eigenvmatsym3d(MMG5_pMesh mesh,double m[],double lambda[],double v[][3]);
639 int MMG5_eigenvmatnonsym2d(MMG5_pMesh mesh,double m[],double lambda[],double v[][2]);
640 int MMG5_eigenvmatnonsym3d(MMG5_pMesh mesh,double m[],double lambda[],double v[][3]);
641 extern void MMG5_bezierEdge(MMG5_pMesh, MMG5_int, MMG5_int, double*, double*, int8_t,double*);
642 int MMG5_buildridmet(MMG5_pMesh,MMG5_pSol,MMG5_int,double,double,double,double*,double[3][3]);
643 extern int MMG5_buildridmetfic(MMG5_pMesh,double*,double*,double,double,double,double*);
644 int MMG5_buildridmetnor(MMG5_pMesh, MMG5_pSol, MMG5_int,double*, double*,double[3][3]);
645 void MMG5_check_hminhmax(MMG5_pMesh mesh, int8_t sethmin, int8_t sethmax);
646 int MMG5_paratmet(double c0[3],double n0[3],double m[6],double c1[3],double n1[3],double mt[6]);
647 void MMG5_transpose3d(double m[3][3]);
648 void MMG5_dotprod(int8_t dim,double *a,double *b,double *result);
649 void MMG5_crossprod3d(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]);
653 int MMG5_boulep(MMG5_pMesh mesh,MMG5_int start,int ip,MMG5_int*,MMG5_int *list, MMG5_int *tlist);
654 int MMG5_boulec(MMG5_pMesh, MMG5_int*, MMG5_int,int ip,double *tt);
655 int MMG5_boulen(MMG5_pMesh, MMG5_int*, MMG5_int,int ip,double *nn);
656 int MMG5_bouler(MMG5_pMesh, MMG5_int*, MMG5_int,int ip,MMG5_int *,MMG5_int *,int *, int*, int);
657 int MMG5_boulet(MMG5_pMesh mesh,MMG5_int start,int ip,MMG5_int *list,int8_t s,int8_t *opn);
659 extern double MMG5_caltri_ani(MMG5_pMesh mesh,MMG5_pSol met,MMG5_pTria ptt);
660 extern double MMG5_caltri_iso(MMG5_pMesh mesh,MMG5_pSol met,MMG5_pTria ptt);
661 void MMG5_defUninitSize(MMG5_pMesh mesh,MMG5_pSol met,int8_t ismet);
662 void MMG5_displayLengthHisto(MMG5_pMesh,MMG5_int,double*,MMG5_int,MMG5_int,double,
663 MMG5_int,MMG5_int,double,int,double*,MMG5_int*,int8_t);
664 void MMG5_displayLengthHisto_internal( MMG5_int,MMG5_int,MMG5_int,double,
665 MMG5_int,MMG5_int,double, MMG5_int,double*,
666 MMG5_int*,int8_t,int);
667 short MMG5_dikmov(MMG5_pMesh,MMG5_pSol,short*,short,
668 MMG5_int chkmovmesh(MMG5_pMesh,MMG5_pSol,short,MMG5_int*));
669 int MMG5_minQualCheck ( MMG5_int iel, double minqual, double alpha );
671 MMG5_Bezier*,double r[3][3],double gv[2]);
672 void MMG5_fillDefmetregSys( MMG5_int, MMG5_pPoint, int, MMG5_Bezier,double r[3][3],
673 double *, double *, double *, double *);
675 MMG5_int MMG5_grad2metSurf(MMG5_pMesh,MMG5_pSol,MMG5_pTria,MMG5_int,MMG5_int);
677 MMG5_int MMG5_hashFace(MMG5_pMesh,MMG5_Hash*,MMG5_int,MMG5_int,MMG5_int,MMG5_int);
678 int MMG5_hashEdge(MMG5_pMesh mesh,MMG5_Hash *hash,MMG5_int a,MMG5_int b,MMG5_int k);
679 int MMG5_hashUpdate(MMG5_Hash *hash,MMG5_int a,MMG5_int b,MMG5_int k);
680 int MMG5_hashEdgeTag(MMG5_pMesh mesh,MMG5_Hash *hash,MMG5_int a,MMG5_int b,uint16_t k);
681 MMG5_int MMG5_hashGet(MMG5_Hash *hash,MMG5_int a,MMG5_int b);
682 int MMG5_hashNew(MMG5_pMesh mesh, MMG5_Hash *hash,MMG5_int hsiz,MMG5_int hmax);
683 int MMG5_intmetsavedir(MMG5_pMesh mesh, double *m,double *n,double *mr);
684 int MMG5_intridmet(MMG5_pMesh,MMG5_pSol,MMG5_int,MMG5_int,double,double*,double*);
685 int MMG5_mmgIntmet33_ani(double*,double*,double*,double);
686 int MMG5_ismaniball(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_int start, int8_t istart);
687 int MMG5_mmgIntextmet(MMG5_pMesh,MMG5_pSol,MMG5_int,double *,double *);
688 size_t MMG5_memSize(void);
691 int MMG5_mmgHashTria(MMG5_pMesh mesh, MMG5_int *adja, MMG5_Hash*, int chkISO);
693 void MMG5_mmgUsage(char *prog);
694 void MMG5_paramUsage1(void);
695 void MMG5_paramUsage2(void);
696 void MMG5_2d3dUsage(void);
697 void MMG5_lagUsage(void);
698 void MMG5_advancedUsage(void);
699 extern int MMG5_nonUnitNorPts(MMG5_pMesh,MMG5_int,MMG5_int,MMG5_int,double*);
700 extern double MMG5_nonorsurf(MMG5_pMesh mesh,MMG5_pTria pt);
701 extern int MMG5_norpts(MMG5_pMesh,MMG5_int,MMG5_int,MMG5_int,double *);
702 extern int MMG5_nortri(MMG5_pMesh mesh,MMG5_pTria pt,double *n);
703 void MMG5_printTria(MMG5_pMesh mesh,char* fileName);
704 extern int MMG5_rotmatrix(double n[3],double r[3][3]);
705 int MMG5_invmat(double *m,double *mi);
706 int MMG5_invmatg(double m[9],double mi[9]);
707 int MMG5_invmat33(double m[3][3],double mi[3][3]);
708 int MMG5_invmat22(double m[2][2],double mi[2][2]);
710 double MMG5_ridSizeInNormalDir(MMG5_pMesh,int,double*,MMG5_pBezier,double,double);
711 double MMG5_ridSizeInTangentDir(MMG5_pMesh, MMG5_pPoint,MMG5_int,MMG5_int*,double,double);
714 int MMG5_scotchCall(MMG5_pMesh mesh, MMG5_pSol sol,MMG5_pSol fields,MMG5_int*);
719 int MMG5_truncate_met3d(MMG5_pSol met, MMG5_int ip, double isqhmin, double isqhmax);
720 int MMG5_solveDefmetregSys( MMG5_pMesh, double r[3][3], double *, double *,
721 double *, double *, double, double, double);
722 int MMG5_solveDefmetrefSys( MMG5_pMesh,MMG5_pPoint,MMG5_int*, double r[3][3],
723 double *, double *, double *, double *,
724 double, double, double);
726 double MMG5_surftri33_ani(MMG5_pMesh,MMG5_pTria,double*,double*,double*);
728 extern int MMG5_sys33sym(double a[6], double b[3], double r[3]);
729 int MMG5_interpreg_ani(MMG5_pMesh,MMG5_pSol,MMG5_pTria,int8_t,double,double *mr);
730 int MMG5_interp_iso(double *ma,double *mb,double *mp,double t);
731 int MMG5_intersecmet22(MMG5_pMesh mesh, double *m,double *n,double *mr);
734 double MMG2D_quickarea(double a[2],double b[2],double c[2]);
735 void MMG5_build3DMetric(MMG5_pMesh mesh,MMG5_pSol sol,MMG5_int ip,double dbuf[6]);
738 FILE **inm,long *posNodes, long *posElts,
739 long **posNodeData, int *bin, int *iswp,
740 MMG5_int *nelts,int *nsols);
741 int MMG5_check_readedMesh(MMG5_pMesh mesh,MMG5_int nref);
743 const long posNodes,const long posElts,
744 const long *posNodeData,const int bin,
745 const int iswp,const MMG5_int nelts,
746 const int nsols);
747int MMG5_saveMshMesh(MMG5_pMesh,MMG5_pSol*,const char*, int);
749int MMG5_loadSolHeader(const char*,int,FILE**,int*,int*,int*,MMG5_int*,
750 int*,int*,int**,long*,int);
751int MMG5_chkMetricType(MMG5_pMesh mesh,int *type,int*, FILE *inm);
752int MMG5_readFloatSol3D(MMG5_pSol,FILE*,int,int,int);
753int MMG5_readDoubleSol3D(MMG5_pSol,FILE*,int,int,MMG5_int);
754int MMG5_saveSolHeader( MMG5_pMesh,const char*,FILE**,int,int*,MMG5_int*,MMG5_int,
755 int,int,int*,int*,int*);
756int MMG5_saveSolAtTrianglesHeader( MMG5_pMesh,FILE *,int,int,MMG5_int*,int,
757 int,int*,int*,int*);
758int MMG5_saveSolAtTetrahedraHeader( MMG5_pMesh,FILE *,int,int,MMG5_int*,int,
759 int,int*,int*,int*);
760void MMG5_writeDoubleSol3D(MMG5_pMesh,MMG5_pSol,FILE*,int,MMG5_int,int);
763
764int MMG5_defsiz_startingMessage (MMG5_pMesh,MMG5_pSol,const char * funcname );
766int MMG5_sum_reqEdgeLengthsAtPoint ( MMG5_pMesh,MMG5_pSol,MMG5_int ip0,MMG5_int ip1 );
769
774MMG5_int MMG5_gradsiz_ani(MMG5_pMesh mesh,MMG5_pSol met,int *it);
776int MMG5_simred2d(MMG5_pMesh,double*,double*,double dm[2],double dn[2],double vp[2][2]);
777int MMG5_simred3d(MMG5_pMesh mesh,double *m,double *n,double dm[3],double dn[3],double vp[3][3]);
778extern int MMG5_updatemet2d_ani(double *m,double *n,double dm[2],double dn[2],double vp[2][2],int8_t ier );
779int MMG5_updatemet3d_ani(double *m,double *n,double dm[3],double dn[3],double vp[3][3],int8_t ier );
780void MMG5_gradEigenvreq(double *dm,double *dn,double,int8_t,int8_t *);
781int MMG5_updatemetreq_ani(double *n,double dn[2],double vp[2][2]);
782int MMG5_swapbin(int sbin);
783MMG5_int MMG5_swapbin_int(MMG5_int sbin);
784float MMG5_swapf(float sbin);
785double MMG5_swapd(double sbin);
787int MMG5_isLevelSet(MMG5_pMesh,MMG5_int,MMG5_int);
788int MMG5_isSplit(MMG5_pMesh ,MMG5_int ,MMG5_int *,MMG5_int *);
789int MMG5_isNotSplit(MMG5_pMesh ,MMG5_int);
790int MMG5_getStartRef(MMG5_pMesh ,MMG5_int, MMG5_int *);
798int MMG5_chkmaniball(MMG5_pMesh mesh, MMG5_int start, int8_t istart);
800
801/* test functions */
802extern double MMG5_test_mat_error( int8_t nelem,double m1[],double m2[] );
805int MMG5_test_eigenvmatsym2d(MMG5_pMesh mesh,double *mex,double lambdaex[],
806 double vpex[][2]);
807int MMG5_test_eigenvmatnonsym2d(MMG5_pMesh mesh,double *mex,double lambdaex[],
808 double vpex[][2],double ivpex[][2]);
809int MMG5_test_eigenvmatsym3d(MMG5_pMesh mesh,double *mex,double lambdaex[],
810 double vpex[][3]);
811int MMG5_test_eigenvmatnonsym3d(MMG5_pMesh mesh,double *mex,double lambdaex[],
812 double vpex[][3],double ivpex[][3]);
816int MMG5_test_mn();
817extern int MMG5_test_rmtr();
819int MMG5_test_simred2d(MMG5_pMesh mesh,double *mex,double *nex,double *dmex,double *dnex,double vpex[][2]);
820int MMG5_test_simred3d(MMG5_pMesh mesh,double *mex,double *nex,double *dmex,double *dnex,double vpex[][3]);
825
826/* tools */
828void MMG5_mark_usedVertices ( MMG5_pMesh mesh,void (*delPt)(MMG5_pMesh,MMG5_int) );
829void MMG5_keep_subdomainElts ( MMG5_pMesh,int,int (*delElt)(MMG5_pMesh,MMG5_int) );
830
832
833#ifdef __cplusplus
834}
835#endif
836
837#endif
int ier
MMG5_pMesh MMG5_pSol * sol
MMG5_pMesh * mesh
MMG5_pMesh char * filename
int MMG5_test_transpose3d()
Definition: tools.c:236
int MMG5_gradsizreq_ani(MMG5_pMesh mesh, MMG5_pSol met)
Definition: anisosiz.c:2322
void MMG5_mmgInit_parameters(MMG5_pMesh mesh)
int MMG5_readFloatSol3D(MMG5_pSol, FILE *, int, int, int)
Definition: inout.c:2222
int MMG5_test_rmtr()
Definition: tools.c:435
int MMG5_minQualCheck(MMG5_int iel, double minqual, double alpha)
Definition: quality.c:343
void MMG5_gradEigenvreq(double *dm, double *dn, double, int8_t, int8_t *)
Definition: anisosiz.c:1883
int MMG5_simred2d(MMG5_pMesh, double *, double *, double dm[2], double dn[2], double vp[2][2])
Definition: anisosiz.c:1326
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)
Definition: inout.c:2076
int MMG5_test_intersecmet33(MMG5_pMesh mesh)
Definition: mettools.c:1047
int MMG5_3dSolTruncature_ani(MMG5_pMesh mesh, MMG5_pSol met)
Definition: scalem.c:453
short MMG5_dikmov(MMG5_pMesh, MMG5_pSol, short *, short, MMG5_int chkmovmesh(MMG5_pMesh, MMG5_pSol, short, MMG5_int *))
common functions for lagrangian meshing.
Definition: mmg3.c:49
void MMG5_advancedUsage(void)
Definition: libtools.c:305
int MMG5_test_updatemet3d_ani()
Definition: anisosiz.c:1841
void MMG5_mn(double m[6], double n[6], double mn[9])
Definition: tools.c:337
size_t MMG5_memSize(void)
Definition: tools.c:852
int MMG5_countLocalParamAtTri(MMG5_pMesh, MMG5_iNode **)
Definition: apptools.c:142
void MMG5_writeDoubleSol3D(MMG5_pMesh, MMG5_pSol, FILE *, int, MMG5_int, int)
Definition: inout.c:2320
int MMG5_saveSolAtTrianglesHeader(MMG5_pMesh, FILE *, int, int, MMG5_int *, int, int, int *, int *, int *)
Definition: inout.c:2526
int MMG5_gradsizreq_iso(MMG5_pMesh, MMG5_pSol)
Definition: isosiz.c:372
double MMG5_caltri_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTria ptt)
Definition: quality.c:115
double MMG2D_quickarea(double a[2], double b[2], double c[2])
Definition: tools.c:971
void MMG5_build3DMetric(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_int ip, double dbuf[6])
Definition: inout.c:1524
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])
Definition: anisosiz.c:1585
int MMG5_isSplit(MMG5_pMesh, MMG5_int, MMG5_int *, MMG5_int *)
Definition: mmg2.c:412
void MMG5_printSolStats(MMG5_pMesh mesh, MMG5_pSol *sol)
Definition: inout.c:2725
void MMG5_memOption_memSet(MMG5_pMesh mesh)
Definition: tools.c:891
int MMG5_eigenvmatsym3d(MMG5_pMesh mesh, double m[], double lambda[], double v[][3])
Definition: mettools.c:164
float MMG5_swapf(float sbin)
Definition: inout.c:80
double MMG5_nonorsurf(MMG5_pMesh mesh, MMG5_pTria pt)
Definition: tools.c:160
int MMG5_isLevelSet(MMG5_pMesh, MMG5_int, MMG5_int)
Definition: mmg2.c:472
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 *)
Definition: librnbg.c:231
int MMG5_check_readedMesh(MMG5_pMesh mesh, MMG5_int nref)
Definition: inout.c:526
int MMG5_resetRef_ls(MMG5_pMesh)
Definition: mmg2.c:1189
int MMG5_boundingBox(MMG5_pMesh mesh)
Definition: scalem.c:46
static void MMG5_excfun(int sigid)
double MMG5_test_mat_error(int8_t nelem, double m1[], double m2[])
Definition: tools.c:1123
int MMG5_test_rotmatrix()
Definition: tools.c:512
int MMG5_Add_inode(MMG5_pMesh mesh, MMG5_iNode **liLi, int val)
Definition: apptools.c:68
MMG5_int MMG5_hashFace(MMG5_pMesh, MMG5_Hash *, MMG5_int, MMG5_int, MMG5_int, MMG5_int)
Definition: hash.c:286
int MMG5_updatemetreq_ani(double *n, double dn[2], double vp[2][2])
Definition: anisosiz.c:1914
int MMG5_regnor(MMG5_pMesh mesh)
Definition: analys.c:46
void MMG5_mmgUsage(char *prog)
Definition: libtools.c:212
int MMG5_writeLocalParamAtTri(MMG5_pMesh, MMG5_iNode *, FILE *)
Definition: apptools.c:186
void MMG5_keep_subdomainElts(MMG5_pMesh, int, int(*delElt)(MMG5_pMesh, MMG5_int))
Definition: tools.c:1072
int MMG5_test_crossprod3d()
Definition: tools.c:311
int MMG5_interp_iso(double *ma, double *mb, double *mp, double t)
Definition: intmet.c:484
double MMG5_surftri_iso(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTria ptt)
Definition: isosiz.c:42
int MMG5_rmc(MMG5_pMesh, MMG5_pSol)
Definition: mmg2.c:912
void MMG5_check_hminhmax(MMG5_pMesh mesh, int8_t sethmin, int8_t sethmax)
Definition: scalem.c:89
int MMG5_eigenvmatnonsym2d(MMG5_pMesh mesh, double m[], double lambda[], double v[][2])
Definition: mettools.c:184
int MMG5_compute_meanMetricAtMarkedPoints_ani(MMG5_pMesh mesh, MMG5_pSol met)
Definition: anisosiz.c:2205
int MMG5_intersecmet22(MMG5_pMesh mesh, double *m, double *n, double *mr)
Definition: mettools.c:814
void MMG5_paramUsage1(void)
Definition: libtools.c:242
void MMG5_2d3dUsage(void)
Definition: libtools.c:294
static const uint8_t MMG5_iprv2[3]
int MMG5_hashUpdate(MMG5_Hash *hash, MMG5_int a, MMG5_int b, MMG5_int k)
Definition: hash.c:404
double MMG5_det3pt1vec(double c0[3], double c1[3], double c2[3], double v[3])
Definition: tools.c:920
int MMG5_truncate_met3d(MMG5_pSol met, MMG5_int ip, double isqhmin, double isqhmax)
Definition: scalem.c:148
int MMG5_mmgIntmet33_ani(double *, double *, double *, double)
Definition: intmet.c:50
double MMG5_det4pt(double c0[3], double c1[3], double c2[3], double c3[3])
Definition: tools.c:932
int MMG5_test_eigenvmatsym3d(MMG5_pMesh mesh, double *mex, double lambdaex[], double vpex[][3])
Definition: mettools.c:456
int MMG5_saveMshMesh(MMG5_pMesh, MMG5_pSol *, const char *, int)
Definition: inout.c:1583
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)
Definition: inout.c:278
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])
Definition: mettools.c:379
int MMG5_test_updatemet2d_ani()
Definition: anisosiz.c:1805
int MMG5_boulep(MMG5_pMesh mesh, MMG5_int start, int ip, MMG5_int *, MMG5_int *list, MMG5_int *tlist)
Definition: boulep.c:52
int MMG5_boulet(MMG5_pMesh mesh, MMG5_int start, int ip, MMG5_int *list, int8_t s, int8_t *opn)
Definition: boulep.c:363
void MMG5_version(MMG5_pMesh, char *)
Functions needed by libraries API.
Definition: libtools.c:43
int MMG5_readDoubleSol3D(MMG5_pSol, FILE *, int, int, MMG5_int)
Definition: inout.c:2271
int MMG5_simred3d(MMG5_pMesh mesh, double *m, double *n, double dm[3], double dn[3], double vp[3][3])
Definition: anisosiz.c:1416
int MMG5_boulen(MMG5_pMesh, MMG5_int *, MMG5_int, int ip, double *nn)
Definition: boulep.c:119
void MMG5_mark_pointsOnReqEdge_fromTria(MMG5_pMesh mesh)
Definition: isosiz.c:243
MMG5_int MMG5_swapbin_int(MMG5_int sbin)
Definition: inout.c:61
void MMG5_mark_usedVertices(MMG5_pMesh mesh, void(*delPt)(MMG5_pMesh, MMG5_int))
Definition: tools.c:1018
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)
Definition: mmg2.c:623
int MMG5_isNotSplit(MMG5_pMesh, MMG5_int)
Definition: mmg2.c:448
int MMG5_buildridmetnor(MMG5_pMesh, MMG5_pSol, MMG5_int, double *, double *, double[3][3])
int MMG5_scale_scalarMetric(MMG5_pMesh, MMG5_pSol, double)
Definition: scalem.c:206
void MMG5_mmgDefaultValues(MMG5_pMesh mesh)
Definition: libtools.c:70
int MMG5_nonUnitNorPts(MMG5_pMesh, MMG5_int, MMG5_int, MMG5_int, double *)
Definition: tools.c:127
int MMG5_rmtr(double r[3][3], double m[6], double mr[6])
Definition: tools.c:405
int MMG5_invmat33(double m[3][3], double mi[3][3])
Definition: tools.c:653
int MMG5_saveSolHeader(MMG5_pMesh, const char *, FILE **, int, int *, MMG5_int *, MMG5_int, int, int, int *, int *, int *)
Definition: inout.c:2389
void MMG5_lagUsage(void)
Definition: libtools.c:278
double MMG5_swapd(double sbin)
Definition: inout.c:97
int MMG5_loadVtuMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
void MMG5_defUninitSize(MMG5_pMesh mesh, MMG5_pSol met, int8_t ismet)
Definition: anisosiz.c:228
int MMG5_hashNew(MMG5_pMesh mesh, MMG5_Hash *hash, MMG5_int hsiz, MMG5_int hmax)
Definition: hash.c:532
int MMG5_resetRef_lssurf(MMG5_pMesh)
Definition: mmg2s.c:129
void MMG5_displayLengthHisto(MMG5_pMesh, MMG5_int, double *, MMG5_int, MMG5_int, double, MMG5_int, MMG5_int, double, int, double *, MMG5_int *, int8_t)
Definition: quality.c:252
int MMG5_paratmet(double c0[3], double n0[3], double m[6], double c1[3], double n1[3], double mt[6])
Definition: mettools.c:1390
struct MMG5_iNode_s MMG5_iNode
int MMG5_eigenvmatsym2d(MMG5_pMesh mesh, double m[], double lambda[], double v[][2])
Definition: mettools.c:144
void MMG5_Free_ilinkedList(MMG5_pMesh mesh, MMG5_iNode *liLi)
Definition: apptools.c:120
static const uint8_t MMG5_inxt2[6]
void MMG5_mark_verticesAsUnused(MMG5_pMesh mesh)
Definition: tools.c:994
int MMG5_chkMetricType(MMG5_pMesh mesh, int *type, int *, FILE *inm)
Definition: inout.c:2663
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)
Definition: inout.c:664
int MMG5_snpval_ls(MMG5_pMesh mesh, MMG5_pSol sol)
Definition: mmg2.c:503
static size_t myfree(void *ptr)
double MMG5_surftri_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTria ptt)
Definition: anisosiz.c:124
int MMG5_updatemet2d_ani(double *m, double *n, double dm[2], double dn[2], double vp[2][2], int8_t ier)
Definition: anisosiz.c:1742
double MMG5_ridSizeInNormalDir(MMG5_pMesh, int, double *, MMG5_pBezier, double, double)
int MMG5_eigenvmatnonsym3d(MMG5_pMesh mesh, double m[], double lambda[], double v[][3])
Definition: mettools.c:209
void MMG5_printTria(MMG5_pMesh mesh, char *fileName)
Definition: tools.c:825
void MMG5_printMetStats(MMG5_pMesh mesh, MMG5_pSol met)
Definition: inout.c:2707
int MMG5_test_mn()
Definition: tools.c:357
int MMG5_devangle(double *n1, double *n2, double crit)
Definition: tools.c:103
int MMG5_elementWeight(MMG5_pMesh, MMG5_pSol, MMG5_pTria, MMG5_pPoint, MMG5_Bezier *, double r[3][3], double gv[2])
Definition: anisomovpt.c:53
int MMG5_sum_reqEdgeLengthsAtPoint(MMG5_pMesh, MMG5_pSol, MMG5_int ip0, MMG5_int ip1)
Definition: isosiz.c:129
int MMG5_MultiMat_init(MMG5_pMesh)
Definition: mmg2.c:326
void MMG5_displayLengthHisto_internal(MMG5_int, MMG5_int, MMG5_int, double, MMG5_int, MMG5_int, double, MMG5_int, double *, MMG5_int *, int8_t, int)
Definition: quality.c:294
void MMG5_dotprod(int8_t dim, double *a, double *b, double *result)
Definition: tools.c:265
int MMG5_test_dotprod()
Definition: tools.c:276
static void MMG5_warnScotch(MMG5_pMesh mesh)
MMG5_int MMG5_hashGet(MMG5_Hash *hash, MMG5_int a, MMG5_int b)
Definition: hash.c:501
int MMG5_solTruncature_iso(MMG5_pMesh mesh, MMG5_pSol met)
Definition: scalem.c:299
void MMG5_paramUsage2(void)
Definition: libtools.c:261
int MMG5_nortri(MMG5_pMesh mesh, MMG5_pTria pt, double *n)
Definition: tools.c:209
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)
Definition: hash.c:346
double MMG5_orvol(MMG5_pPoint point, MMG5_int *v)
Definition: tools.c:951
int MMG5_rotmatrix(double n[3], double r[3][3])
Definition: tools.c:467
int MMG5_sys33sym(double a[6], double b[3], double r[3])
Definition: tools.c:769
int MMG5_updatemet3d_ani(double *m, double *n, double dm[3], double dn[3], double vp[3][3], int8_t ier)
Definition: anisosiz.c:1783
void MMG5_gradation_info(MMG5_pMesh)
Definition: isosiz.c:96
int MMG5_test_invmat33()
Definition: tools.c:1165
double MMG5_ridSizeInTangentDir(MMG5_pMesh, MMG5_pPoint, MMG5_int, MMG5_int *, double, double)
Definition: anisosiz.c:764
int MMG5_defsiz_startingMessage(MMG5_pMesh, MMG5_pSol, const char *funcname)
Definition: isosiz.c:77
void MMG5_transpose3d(double m[3][3])
Definition: tools.c:220
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)
Definition: isosiz.c:278
int MMG5_test_invmat22()
Definition: tools.c:1140
int MMG5_saveDisp(MMG5_pMesh, MMG5_pSol)
Definition: mmg3.c:114
int MMG5_compute_meanMetricAtMarkedPoints_iso(MMG5_pMesh mesh, MMG5_pSol met)
Definition: isosiz.c:167
int MMG5_invmatg(double m[9], double mi[9])
Definition: tools.c:613
void MMG5_nsort(int8_t, double *, int8_t *)
Definition: tools.c:49
int MMG5_snpval_lssurf(MMG5_pMesh mesh, MMG5_pSol sol)
Definition: mmg2s.c:45
int MMG5_swapbin(int sbin)
Definition: inout.c:42
static void * mymalloc(size_t s)
int MMG5_grad2metSurfreq(MMG5_pMesh, MMG5_pSol, MMG5_pTria, MMG5_int, MMG5_int)
Definition: anisosiz.c:1951
int MMG5_check_setted_hminhmax(MMG5_pMesh mesh)
Definition: scalem.c:116
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])
Definition: anisosiz.c:1663
int MMG5_chkmaniball(MMG5_pMesh mesh, MMG5_int start, int8_t istart)
Definition: mmg2.c:1304
void MMG5_crossprod3d(double *a, double *b, double *result)
Definition: tools.c:300
void MMG5_nperm(int8_t n, int8_t shift, int8_t stride, double *val, double *oldval, int8_t *perm)
Definition: tools.c:80
int MMG5_test_eigenvmatsym2d(MMG5_pMesh mesh, double *mex, double lambdaex[], double vpex[][2])
Definition: mettools.c:301
int MMG5_scale_meshAndSol(MMG5_pMesh, MMG5_pSol, MMG5_pSol, double *)
Definition: scalem.c:561
MMG5_int MMG5_gradsiz_ani(MMG5_pMesh mesh, MMG5_pSol met, int *it)
Definition: anisosiz.c:2259
int MMG5_norpts(MMG5_pMesh, MMG5_int, MMG5_int, MMG5_int, double *)
Definition: tools.c:183
int MMG5_mmgHashTria(MMG5_pMesh mesh, MMG5_int *adja, MMG5_Hash *, int chkISO)
Definition: hash.c:58
int MMG5_hashEdgeTag(MMG5_pMesh mesh, MMG5_Hash *hash, MMG5_int a, MMG5_int b, uint16_t k)
Definition: hash.c:441
void MMG5_Set_commonFunc(void)
double MMG5_caltri_iso(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTria ptt)
Definition: quality.c:199
int MMG5_reset_metricAtReqEdges_surf(MMG5_pMesh, MMG5_pSol, int8_t)
Definition: isosiz.c:204
int MMG5_setref_lssurf(MMG5_pMesh mesh, MMG5_pSol sol)
Definition: mmg2s.c:160
int MMG5_chkmanimesh(MMG5_pMesh mesh)
Definition: mmg2.c:1424
int MMG5_invmat22(double m[2][2], double mi[2][2])
Definition: tools.c:745
int MMG5_boulec(MMG5_pMesh, MMG5_int *, MMG5_int, int ip, double *tt)
Definition: boulep.c:199
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)
Definition: scalem.c:365
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 *)
Definition: inout.c:2595
int MMG5_test_eigenvmatnonsym3d(MMG5_pMesh mesh, double *mex, double lambdaex[], double vpex[][3], double ivpex[][3])
Definition: mettools.c:536
int MMG5_test_intersecmet22(MMG5_pMesh mesh)
Definition: mettools.c:962
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)
Definition: boulep.c:287
int MMG5_setref_ls(MMG5_pMesh mesh, MMG5_pSol sol)
Definition: mmg2.c:1225
MMG5_int MMG5_grad2metSurf(MMG5_pMesh, MMG5_pSol, MMG5_pTria, MMG5_int, MMG5_int)
Definition: anisosiz.c:975
double MMG5_caltri33_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTria pt)
Definition: quality.c:47
int MMG5_getStartRef(MMG5_pMesh, MMG5_int, MMG5_int *)
Definition: mmg2.c:213
int MMG5_intmetsavedir(MMG5_pMesh mesh, double *m, double *n, double *mr)
Definition: mettools.c:635
int MMG5_invmat(double *m, double *mi)
Definition: tools.c:562
Identic as MMG5_HGeom but use MMG5_hedge to store edges instead of MMG5_hgeom (memory economy).
Definition: libmmgtypes.h:603
int8_t ddebug
Definition: libmmgtypes.h:539
MMG mesh structure.
Definition: libmmgtypes.h:613
MMG5_Info info
Definition: libmmgtypes.h:659
Structure to store vertices of an MMG mesh.
Definition: libmmgtypes.h:276
Structure to store triangles of a MMG mesh.
Definition: libmmgtypes.h:338
struct MMG5_iNode_s * nxt
Cell for linked list of integer value.