|
mmg2d
|
#include <assert.h>#include <stdlib.h>#include <stdio.h>#include <limits.h>#include <string.h>#include <signal.h>#include <ctype.h>#include <float.h>#include <math.h>#include <complex.h>#include "eigenv.h"#include "libmmgcommon.h"

Go to the source code of this file.
Data Structures | |
| struct | MMG5_Bezier |
| struct | MMG5_iNode_s |
| struct | MMG5_dNode_s |
Macros | |
| #define | MG_STR "&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&" |
| #define | MG_SMSGN(a, b) (((double)(a)*(double)(b) > (0.0)) ? (1) : (0)) |
| #define | MMG5_BOXSIZE 500 |
| #define | MMG5_MEMMAX 800 |
| #define | MMG5_BITWIZE_MB_TO_B 20 |
| #define | MMG5_MEMPERCENT 0.5 |
| #define | MG_PLUS 2 |
| #define | MG_MINUS 3 |
| #define | MMG5_UNSET -1 |
| #define | MMG5_DISPREF 10 |
| #define | MMG5_MILLION 1048576 |
| #define | MMG5_ANGEDG 0.707106781186548 /*0.573576436351046 */ |
| #define | MMG5_ANGLIM -0.999999 |
| #define | MMG5_ATHIRD 0.333333333333333 |
| #define | MMG5_EPSD 1.e-30 |
| #define | MMG5_EPSD2 1.0e-200 |
| #define | MMG5_EPS 1.e-06 |
| #define | MMG5_EPSOK 1.e-15 |
| #define | MMG5_NULKAL 1.e-30 |
| #define | MMG5_SQR32 0.866025403784439 |
| #define | A64TH 0.015625 |
| #define | A16TH 0.0625 |
| #define | A32TH 0.03125 |
| #define | MMG5_MEMMIN 38 |
| #define | MMG5_LMAX 10240 |
| #define | MMG5_PATHSEP '/' |
| #define | MMG5_NONSET_MEM -1 |
| #define | MMG5_NONSET_HMIN -1 |
| #define | MMG5_NONSET_HMAX -1 |
| #define | MMG5_NONSET_HSIZ -1 |
| #define | MMG5_NONSET -1 |
| #define | MMG5_HAUSD 0.01 |
| #define | MMG5_HGRAD 0.26236426446 |
| #define | MMG5_HGRADREQ 0.83290912294 |
| #define | MMG5_NOHGRAD -1 |
| #define | MMG5_LAG -1 |
| #define | MMG5_NR -1 |
| #define | MMG5_LS 0.0 |
| #define | MMG5_PROCTREE 32 |
| #define | MMG5_OFF 0 |
| #define | MMG5_ON 1 |
| #define | MMG5_GAP 0.2 |
| #define | MMG5_HMINCOE 0.001 |
| #define | MMG5_HMAXCOE 2 |
| #define | MMG5_HMINMAXGAP 5 |
| #define | MMG5_FEM 1 |
| #define | MMG5_FILESTR_LGTH 128 /** Maximal length of a line in input file */ |
| #define | MG_MAX(a, b) (((a) > (b)) ? (a) : (b)) |
| #define | MG_MIN(a, b) (((a) < (b)) ? (a) : (b)) |
| #define | MG_NOTAG (0) |
| #define | MG_REF (1 << 0) |
| #define | MG_GEO (1 << 1) |
| #define | MG_REQ (1 << 2) |
| #define | MG_NOM (1 << 3) |
| #define | MG_BDY (1 << 4) |
| #define | MG_CRN (1 << 5) |
| #define | MG_NOSURF (1 << 6) |
| #define | MG_OPNBDY (1 << 7) |
| #define | MG_OLDPARBDY (1 << 11) |
| #define | MG_PARBDYBDY (1 << 12) |
| #define | MG_PARBDY (1 << 13) |
| #define | MG_NUL (1 << 14) |
| #define | MG_Vert (1 << 0 ) |
| #define | MG_Tria (1 << 1 ) |
| #define | MG_Tetra (1 << 2 ) |
| #define | MG_Edge (1 << 3 ) |
| #define | MG_VOK(ppt) (ppt && ((ppt)->tag < MG_NUL)) |
| #define | MG_EOK(pt) (pt && ((pt)->v[0] > 0)) |
| #define | MG_EDG(tag) ((tag & MG_GEO) || (tag & MG_REF)) |
| #define | MG_SIN(tag) ((tag & MG_CRN) || (tag & MG_REQ)) |
| #define | MG_RID(tag) ((!( MG_SIN(tag)||(tag & MG_NOM))) && tag & MG_GEO ) |
| #define | MG_SET(flag, bit) ((flag) |= (1 << (bit))) |
| #define | MG_CLR(flag, bit) ((flag) &= ~(1 << (bit))) |
| #define | MG_GET(flag, bit) ((flag) & (1 << (bit))) |
| #define | MMG5_KA 7 |
| #define | MMG5_KB 11 |
| #define | MMG5_SW 4 |
| #define | MMG5_SD 8 |
| #define | _LIBMMG5_RETURN(mesh, sol, met, val) |
| #define | MMG5_CHK_MEM(mesh, size, string, law) |
| #define | MMG5_DEL_MEM(mesh, ptr) |
| #define | MMG5_ADD_MEM(mesh, size, message, law) |
| #define | MMG5_SAFE_FREE(ptr) |
| #define | MMG5_SAFE_CALLOC(ptr, size, type, law) |
| #define | MMG5_SAFE_MALLOC(ptr, size, type, law) |
| #define | MMG5_SAFE_REALLOC(ptr, prevSize, newSize, type, message, law) |
| #define | MMG5_SAFE_RECALLOC(ptr, prevSize, newSize, type, message, law) |
| #define | MMG5_TAB_RECALLOC(mesh, ptr, initSize, wantedGap, type, message, law) |
| #define | MMG5_INCREASE_MEM_MESSAGE() |
| #define | MMG5_SAFELL2LCAST(longlongval) (((longlongval) > (LONG_MAX)) ? 0 : ((long)(longlongval))) |
| #define | MMG5_SAFELL2ICAST(longlongval) (((longlongval) > (INT_MAX)) ? 0 : ((int)(longlongval))) |
| #define | MMG_FREAD(ptr, size, count, stream) |
| #define | CV_VA_NUM_ARGS_HELPER(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) N |
| #define | CV_VA_NUM_ARGS(...) CV_VA_NUM_ARGS_HELPER(__VA_ARGS__, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0) |
| #define | MMG_FSCANF(stream, format, ...) |
| #define | FORTRAN_NAME(nu, nl, pl, pc) |
| Adds function definitions. More... | |
| #define | FORTRAN_VARIADIC(nu, nl, pl, body) |
| Adds function definitions. More... | |
Typedefs | |
| typedef MMG5_Bezier * | MMG5_pBezier |
| typedef struct MMG5_iNode_s | MMG5_iNode |
| typedef struct MMG5_dNode_s | MMG5_dNode |
Enumerations | |
| enum | MMG5_Format { MMG5_FMT_MeditASCII, MMG5_FMT_MeditBinary, MMG5_FMT_GmshASCII, MMG5_FMT_GmshBinary, MMG5_FMT_VtkPvtp, MMG5_FMT_VtkPvtu, MMG5_FMT_VtkVtu, MMG5_FMT_VtkVtp, MMG5_FMT_VtkVtk, MMG5_FMT_Tetgen, MMG5_FMT_Unknown } |
| Type of supported file format. More... | |
Functions | |
| static void * | mycalloc (size_t c, size_t s) |
| static void * | mymalloc (size_t s) |
| static void * | myrealloc (void *ptr_in, size_t s, size_t oldsize) |
| static size_t | myfree (void *ptr) |
| static void | MMG5_excfun (int sigid) |
| double | MMG5_det3pt1vec (double c0[3], double c1[3], double c2[3], double v[3]) |
| double | MMG5_det4pt (double c0[3], double c1[3], double c2[3], double c3[3]) |
| int | MMG5_devangle (double *n1, double *n2, double crit) |
| double | MMG5_orvol (MMG5_pPoint point, int *v) |
| int | MMG5_Add_inode (MMG5_pMesh mesh, MMG5_iNode **liLi, int val) |
| int | MMG5_Add_dnode (MMG5_pMesh mesh, MMG5_dNode **liLi, int, double) |
| void | MMG5_bezierEdge (MMG5_pMesh, int, int, double *, double *, int8_t, double *) |
| int | MMG5_buildridmet (MMG5_pMesh, MMG5_pSol, int, double, double, double, double *, double[3][3]) |
| int | MMG5_buildridmetfic (MMG5_pMesh, double *, double *, double, double, double, double *) |
| int | MMG5_buildridmetnor (MMG5_pMesh, MMG5_pSol, int, double *, double *, double[3][3]) |
| void | MMG5_check_hminhmax (MMG5_pMesh mesh, int8_t sethmin, int8_t sethmax) |
| int | MMG5_paratmet (double c0[3], double n0[3], double m[6], double c1[3], double n1[3], double mt[6]) |
| void | MMG5_mn (double m[6], double n[6], double mn[9]) |
| int | MMG5_rmtr (double r[3][3], double m[6], double mr[6]) |
| int | MMG5_boundingBox (MMG5_pMesh mesh) |
| int | MMG5_boulep (MMG5_pMesh mesh, int start, int ip, int *, int *list) |
| int | MMG5_boulec (MMG5_pMesh, int *, int, int i, double *tt) |
| int | MMG5_boulen (MMG5_pMesh, int *, int, int i, double *nn) |
| int | MMG5_bouler (MMG5_pMesh, int *, int, int i, int *, int *, int *, int *, int) |
| double | MMG5_caltri33_ani (MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTria pt) |
| double | MMG5_caltri_ani (MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTria ptt) |
| double | MMG5_caltri_iso (MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTria ptt) |
| void | MMG5_defUninitSize (MMG5_pMesh mesh, MMG5_pSol met, int8_t ismet) |
| void | MMG5_displayLengthHisto (MMG5_pMesh, int, double *, int, int, double, int, int, double, int, double *, int *, int8_t) |
| void | MMG5_displayLengthHisto_internal (int, int, int, double, int, int, double, int, double *, int *, int8_t, int) |
| int | MMG5_minQualCheck (int iel, double minqual, double alpha) |
| int | MMG5_elementWeight (MMG5_pMesh, MMG5_pSol, MMG5_pTria, MMG5_pPoint, MMG5_Bezier *, double r[3][3], double gv[2]) |
| void | MMG5_fillDefmetregSys (int, MMG5_pPoint, int, MMG5_Bezier, double r[3][3], double *, double *, double *, double *) |
| void | MMG5_Free_ilinkedList (MMG5_pMesh mesh, MMG5_iNode *liLi) |
| void | MMG5_Free_dlinkedList (MMG5_pMesh mesh, MMG5_dNode *liLi) |
| int | MMG5_grad2metSurf (MMG5_pMesh, MMG5_pSol, MMG5_pTria, int, int) |
| int | MMG5_grad2metSurfreq (MMG5_pMesh, MMG5_pSol, MMG5_pTria, int, int) |
| char * | MMG5_Get_filenameExt (char *filename) |
| char * | MMG5_Get_basename (char *path) |
| char * | MMG5_Get_path (char *path) |
| char * | MMG5_Remove_ext (char *path, char *) |
| const char * | MMG5_Get_formatName (enum MMG5_Format fmt) |
| int | MMG5_Get_format (char *ptr, int) |
| int | MMG5_hashEdge (MMG5_pMesh mesh, MMG5_Hash *hash, int a, int b, int k) |
| int | MMG5_hashUpdate (MMG5_Hash *hash, int a, int b, int k) |
| int | MMG5_hashEdgeTag (MMG5_pMesh mesh, MMG5_Hash *hash, int a, int b, int16_t k) |
| int | MMG5_hashGet (MMG5_Hash *hash, int a, int b) |
| int | MMG5_hashNew (MMG5_pMesh mesh, MMG5_Hash *hash, int hsiz, int hmax) |
| int | MMG5_intmetsavedir (MMG5_pMesh mesh, double *m, double *n, double *mr) |
| int | MMG5_intridmet (MMG5_pMesh, MMG5_pSol, int, int, double, double *, double *) |
| int | MMG5_mmgIntmet33_ani (double *, double *, double *, double) |
| int | MMG5_mmgIntextmet (MMG5_pMesh, MMG5_pSol, int, double *, double *) |
| size_t | MMG5_memSize (void) |
| void | MMG5_memOption_memSet (MMG5_pMesh mesh) |
| void | MMG5_mmgDefaultValues (MMG5_pMesh mesh) |
| int | MMG5_mmgHashTria (MMG5_pMesh mesh, int *adja, MMG5_Hash *, int chkISO) |
| void | MMG5_mmgInit_parameters (MMG5_pMesh mesh) |
| void | MMG5_mmgUsage (char *prog) |
| void | MMG5_paramUsage1 (void) |
| void | MMG5_paramUsage2 (void) |
| void | MMG5_2d3dUsage (void) |
| void | MMG5_lagUsage (void) |
| void | MMG5_advancedUsage (void) |
| int | MMG5_nonUnitNorPts (MMG5_pMesh, int, int, int, double *) |
| double | MMG5_nonorsurf (MMG5_pMesh mesh, MMG5_pTria pt) |
| int | MMG5_norpts (MMG5_pMesh, int, int, int, double *) |
| int | MMG5_nortri (MMG5_pMesh mesh, MMG5_pTria pt, double *n) |
| void | MMG5_printTria (MMG5_pMesh mesh, char *fileName) |
| int | MMG5_rotmatrix (double n[3], double r[3][3]) |
| int | MMG5_invmat (double *m, double *mi) |
| int | MMG5_invmatg (double m[9], double mi[9]) |
| int | MMG5_invmat33 (double m[3][3], double mi[3][3]) |
| int | MMG5_regnor (MMG5_pMesh mesh) |
| double | MMG5_ridSizeInNormalDir (MMG5_pMesh, int, double *, MMG5_pBezier, double, double) |
| double | MMG5_ridSizeInTangentDir (MMG5_pMesh, MMG5_pPoint, int, int *, double, double) |
| int | MMG5_scale_meshAndSol (MMG5_pMesh, MMG5_pSol, MMG5_pSol, double *, int8_t *, int8_t *) |
| int | MMG5_scale_scalarMetric (MMG5_pMesh, MMG5_pSol, double, int8_t, int8_t) |
| int | MMG5_scaleMesh (MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol ls) |
| int | MMG5_scotchCall (MMG5_pMesh mesh, MMG5_pSol sol, MMG5_pSol fields, int *) |
| void | MMG5_solTruncatureForOptim (MMG5_pMesh mesh, MMG5_pSol met) |
| int | MMG5_solveDefmetregSys (MMG5_pMesh, double r[3][3], double *, double *, double *, double *, double, double, double) |
| int | MMG5_solveDefmetrefSys (MMG5_pMesh, MMG5_pPoint, int *, double r[3][3], double *, double *, double *, double *, double, double, double) |
| double | MMG5_surftri_ani (MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTria ptt) |
| double | MMG5_surftri33_ani (MMG5_pMesh, MMG5_pTria, double *, double *, double *) |
| double | MMG5_surftri_iso (MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTria ptt) |
| int | MMG5_sys33sym (double a[6], double b[3], double r[3]) |
| int | MMG5_unscaleMesh (MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol ls) |
| int | MMG5_interpreg_ani (MMG5_pMesh, MMG5_pSol, MMG5_pTria, int8_t, double, double *mr) |
| int | MMG5_interp_iso (double *ma, double *mb, double *mp, double t) |
| int | MMG5_intersecmet22 (MMG5_pMesh mesh, double *m, double *n, double *mr) |
| int | MMG5_countLocalParamAtTri (MMG5_pMesh, MMG5_iNode **) |
| int | MMG5_writeLocalParamAtTri (MMG5_pMesh, MMG5_iNode *, FILE *) |
| double | MMG2D_quickarea (double a[2], double b[2], double c[2]) |
| void | MMG5_build3DMetric (MMG5_pMesh mesh, MMG5_pSol sol, int ip, double dbuf[6]) |
| int | MMG5_loadVtuMesh (MMG5_pMesh mesh, MMG5_pSol sol, const char *filename) |
| int | MMG5_loadMshMesh_part1 (MMG5_pMesh mesh, const char *filename, FILE **inm, long *posNodes, long *posElts, long **posNodeData, int *bin, int *iswp, int *nelts, int *nsols) |
| int | MMG5_check_readedMesh (MMG5_pMesh mesh, int nref) |
| 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 int nelts, const int nsols) |
| int | MMG5_saveMshMesh (MMG5_pMesh, MMG5_pSol *, const char *, int) |
| int | MMG5_loadSolHeader (const char *, int, FILE **, int *, int *, int *, int *, int *, int *, int **, long *, int) |
| int | MMG5_chkMetricType (MMG5_pMesh mesh, int *type, FILE *inm) |
| int | MMG5_readFloatSol3D (MMG5_pSol, FILE *, int, int, int) |
| int | MMG5_readDoubleSol3D (MMG5_pSol, FILE *, int, int, int) |
| int | MMG5_saveSolHeader (MMG5_pMesh, const char *, FILE **, int, int *, int, int, int, int *, int *) |
| void | MMG5_writeDoubleSol3D (MMG5_pMesh, MMG5_pSol, FILE *, int, int, int) |
| void | MMG5_printMetStats (MMG5_pMesh mesh, MMG5_pSol met) |
| void | MMG5_printSolStats (MMG5_pMesh mesh, MMG5_pSol *sol) |
| int | MMG5_defsiz_startingMessage (MMG5_pMesh, MMG5_pSol, const char *funcname) |
| void | MMG5_gradation_info (MMG5_pMesh) |
| int | MMG5_sum_reqEdgeLengthsAtPoint (MMG5_pMesh, MMG5_pSol, int ip0, int ip1) |
| int | MMG5_compute_meanMetricAtMarkedPoints_iso (MMG5_pMesh mesh, MMG5_pSol met) |
| int | MMG5_compute_meanMetricAtMarkedPoints_ani (MMG5_pMesh mesh, MMG5_pSol met) |
| int | MMG5_reset_metricAtReqEdges_surf (MMG5_pMesh, MMG5_pSol, int8_t) |
| void | MMG5_mark_pointsOnReqEdge_fromTria (MMG5_pMesh mesh) |
| int | MMG5_gradsiz_iso (MMG5_pMesh mesh, MMG5_pSol met) |
| int | MMG5_gradsizreq_iso (MMG5_pMesh, MMG5_pSol) |
| int | MMG5_gradsiz_ani (MMG5_pMesh mesh, MMG5_pSol met, int *it) |
| int | MMG5_gradsizreq_ani (MMG5_pMesh mesh, MMG5_pSol met) |
| int | MMG5_simred (MMG5_pMesh, double *, double *, double dm[2], double dn[2], double vp[2][2]) |
| void | MMG5_gradEigenvreq (double *dm, double *dn, double, int8_t, int8_t *) |
| int | MMG5_updatemetreq_ani (double *n, double dn[2], double vp[2][2]) |
| int | MMG5_swapbin (int sbin) |
| float | MMG5_swapf (float sbin) |
| double | MMG5_swapd (double sbin) |
| int | MMG5_isSplit (MMG5_pMesh, int, int *, int *) |
| int | MMG5_getIniRef (MMG5_pMesh, int) |
| void | MMG5_mark_verticesAsUnused (MMG5_pMesh mesh) |
| void | MMG5_mark_usedVertices (MMG5_pMesh mesh, void(*delPt)(MMG5_pMesh, int)) |
| void | MMG5_keep_subdomainElts (MMG5_pMesh, int, int(*delElt)(MMG5_pMesh, int)) |
| void | MMG5_Set_commonFunc (void) |
Variables | |
| static const uint8_t | MMG5_inxt2 [6] = {1,2,0,1,2} |
| static const uint8_t | MMG5_iprv2 [3] = {2,0,1} |
| int(* | MMG5_chkmsh )(MMG5_pMesh, int, int) |
| int(* | MMG5_bezierCP )(MMG5_pMesh, MMG5_Tria *, MMG5_pBezier, int8_t) |
| double(* | MMG5_lenSurfEdg )(MMG5_pMesh mesh, MMG5_pSol sol, int, int, int8_t) |
| int(* | MMG5_grad2met_ani )(MMG5_pMesh, MMG5_pSol, MMG5_pTria, int, int) |
| int(* | MMG5_grad2metreq_ani )(MMG5_pMesh, MMG5_pSol, MMG5_pTria, int, int) |
| int(* | MMG5_compute_meanMetricAtMarkedPoints )(MMG5_pMesh, MMG5_pSol) |
| int(* | MMG5_indElt )(MMG5_pMesh mesh, int kel) |
| int(* | MMG5_indPt )(MMG5_pMesh mesh, int kp) |
Reset the customized signals and set the internal counters of points, edges, tria and tetra to the suitable value (needed by users to recover their mesh using the API)
| #define A16TH 0.0625 |
| #define A32TH 0.03125 |
| #define A64TH 0.015625 |
| #define CV_VA_NUM_ARGS | ( | ... | ) | CV_VA_NUM_ARGS_HELPER(__VA_ARGS__, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0) |
count the number of variadic arguments provided to the macro
| #define CV_VA_NUM_ARGS_HELPER | ( | _1, | |
| _2, | |||
| _3, | |||
| _4, | |||
| _5, | |||
| _6, | |||
| _7, | |||
| _8, | |||
| _9, | |||
| _10, | |||
| N, | |||
| ... | |||
| ) | N |
macro to help to count the number of variadic arguments
| #define FORTRAN_NAME | ( | nu, | |
| nl, | |||
| pl, | |||
| pc | |||
| ) |
Adds function definitions.
| nu | function name in upper case. |
| nl | function name in lower case. |
| pl | type of arguments. |
| pc | name of arguments. |
Adds function definitions with upcase, underscore and double underscore to match any fortran compiler.
| #define FORTRAN_VARIADIC | ( | nu, | |
| nl, | |||
| pl, | |||
| body | |||
| ) |
Adds function definitions.
| nu | function name in upper case. |
| nl | function name in lower case. |
| pl | type of arguments. |
| body | body of the function. |
Adds function definitions with upcase, underscore and double underscore to match any fortran compiler.
| #define MG_BDY (1 << 4) |
16 boundary entity
| #define MG_CLR | ( | flag, | |
| bit | |||
| ) | ((flag) &= ~(1 << (bit))) |
bit number bit is set to 0
| #define MG_CRN (1 << 5) |
32 corner
| #define MG_Edge (1 << 3 ) |
8 local parameter applied over edge
| #define MG_EOK | ( | pt | ) | (pt && ((pt)->v[0] > 0)) |
Element OK
| #define MG_GEO (1 << 1) |
2 geometric ridge
| #define MG_GET | ( | flag, | |
| bit | |||
| ) | ((flag) & (1 << (bit))) |
return bit number bit value
| #define MG_MAX | ( | a, | |
| b | |||
| ) | (((a) > (b)) ? (a) : (b)) |
| #define MG_MIN | ( | a, | |
| b | |||
| ) | (((a) < (b)) ? (a) : (b)) |
| #define MG_MINUS 3 |
| #define MG_NOM (1 << 3) |
8 non manifold
| #define MG_NOSURF (1 << 6) |
64 freezed boundary
| #define MG_NOTAG (0) |
| #define MG_NUL (1 << 14) |
16384 vertex removed
| #define MG_OLDPARBDY (1 << 11) |
2048 old parallel boundary
| #define MG_OPNBDY (1 << 7) |
128 open boundary
| #define MG_PARBDY (1 << 13) |
8192 parallel boundary
| #define MG_PARBDYBDY (1 << 12) |
4096 parallel boundary over a boundary
| #define MG_PLUS 2 |
| #define MG_REF (1 << 0) |
1 edge reference
| #define MG_REQ (1 << 2) |
4 required entity
Non-singular ridge point (so ridge metric in aniso mode)
| #define MG_SET | ( | flag, | |
| bit | |||
| ) | ((flag) |= (1 << (bit))) |
bit number bit is set to 1
| #define MG_SMSGN | ( | a, | |
| b | |||
| ) | (((double)(a)*(double)(b) > (0.0)) ? (1) : (0)) |
Check if a and b have the same sign
| #define MG_STR "&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&" |
| #define MG_Tetra (1 << 2 ) |
4 local parameter applied over tetrahedron
| #define MG_Tria (1 << 1 ) |
2 local parameter applied over triangle
| #define MG_Vert (1 << 0 ) |
1 local parameter applied over vertex
| #define MG_VOK | ( | ppt | ) | (ppt && ((ppt)->tag < MG_NUL)) |
Vertex OK
| #define MMG5_ADD_MEM | ( | mesh, | |
| size, | |||
| message, | |||
| law | |||
| ) |
| #define MMG5_ANGEDG 0.707106781186548 /*0.573576436351046 */ |
| #define MMG5_ANGLIM -0.999999 |
| #define MMG5_ATHIRD 0.333333333333333 |
| #define MMG5_BITWIZE_MB_TO_B 20 |
Bitwise convertion from Mo to O
| #define MMG5_BOXSIZE 500 |
size of box for renumbering with scotch.
| #define MMG5_CHK_MEM | ( | mesh, | |
| size, | |||
| string, | |||
| law | |||
| ) |
Check if used memory overflow maximal authorized memory. Execute the command law if lack of memory.
| #define MMG5_DEL_MEM | ( | mesh, | |
| ptr | |||
| ) |
| #define MMG5_DISPREF 10 |
| #define MMG5_EPS 1.e-06 |
| #define MMG5_EPSD 1.e-30 |
| #define MMG5_EPSD2 1.0e-200 |
| #define MMG5_EPSOK 1.e-15 |
| #define MMG5_FEM 1 |
defaut value for FEM mode
| #define MMG5_FILESTR_LGTH 128 /** Maximal length of a line in input file */ |
| #define MMG5_GAP 0.2 |
gap value for reallocation
| #define MMG5_HAUSD 0.01 |
default value for hausdorff param
| #define MMG5_HGRAD 0.26236426446 |
default value for gradation (1.3)
| #define MMG5_HGRADREQ 0.83290912294 |
default value for required gradation (2.3)
| #define MMG5_HMAXCOE 2 |
coefficient to compute the default hmax value
| #define MMG5_HMINCOE 0.001 |
coefficient to compute the default hmin value
| #define MMG5_HMINMAXGAP 5 |
imposed gap between hmin and hmax if hmax<hmin
| #define MMG5_INCREASE_MEM_MESSAGE | ( | ) |
Error message when lack of memory
| #define MMG5_KA 7 |
Key for hash tables.
| #define MMG5_KB 11 |
Key for hash tables.
| #define MMG5_LAG -1 |
default value for lagrangian option
| #define MMG5_LMAX 10240 |
| #define MMG5_LS 0.0 |
default level-set to discretize
| #define MMG5_MEMMAX 800 |
Maximal memory used if available memory compitation fail. Default mem if unable to compute memMax
| #define MMG5_MEMMIN 38 |
minimal memory needed to store the mesh/sol names
| #define MMG5_MEMPERCENT 0.5 |
Percent of RAM used by default
| #define MMG5_MILLION 1048576 |
| #define MMG5_NOHGRAD -1 |
disable gradation
| #define MMG5_NONSET -1 |
| #define MMG5_NONSET_HMAX -1 |
hmax value for unspecified hmax size
| #define MMG5_NONSET_HMIN -1 |
hmin value for unspecified hmin size
| #define MMG5_NONSET_HSIZ -1 |
hsiz value for unspecified hsiz map
| #define MMG5_NONSET_MEM -1 |
mem value for unspecified max memory
| #define MMG5_NR -1 |
no ridge detection
| #define MMG5_NULKAL 1.e-30 |
| #define MMG5_OFF 0 |
0
| #define MMG5_ON 1 |
1
| #define MMG5_PATHSEP '/' |
| #define MMG5_PROCTREE 32 |
default size of the PROctree
| #define MMG5_SAFE_CALLOC | ( | ptr, | |
| size, | |||
| type, | |||
| law | |||
| ) |
Safe allocation with calloc
| #define MMG5_SAFE_FREE | ( | ptr | ) |
Safe deallocation
| #define MMG5_SAFE_MALLOC | ( | ptr, | |
| size, | |||
| type, | |||
| law | |||
| ) |
Safe allocation with malloc
| #define MMG5_SAFE_REALLOC | ( | ptr, | |
| prevSize, | |||
| newSize, | |||
| type, | |||
| message, | |||
| law | |||
| ) |
| #define MMG5_SAFE_RECALLOC | ( | ptr, | |
| prevSize, | |||
| newSize, | |||
| type, | |||
| message, | |||
| law | |||
| ) |
safe reallocation with memset at 0 for the new values of tab
| #define MMG5_SAFELL2ICAST | ( | longlongval | ) | (((longlongval) > (INT_MAX)) ? 0 : ((int)(longlongval))) |
| #define MMG5_SAFELL2LCAST | ( | longlongval | ) | (((longlongval) > (LONG_MAX)) ? 0 : ((long)(longlongval))) |
| #define MMG5_SD 8 |
| #define MMG5_SQR32 0.866025403784439 |
| #define MMG5_SW 4 |
| #define MMG5_TAB_RECALLOC | ( | mesh, | |
| ptr, | |||
| initSize, | |||
| wantedGap, | |||
| type, | |||
| message, | |||
| law | |||
| ) |
Reallocation of ptr of type type at size (initSize+wantedGap*initSize) if possible or at maximum available size if not. Execute the command law if reallocation failed. Memset to 0 for the new values of table.
| #define MMG5_UNSET -1 |
| #define MMG_FREAD | ( | ptr, | |
| size, | |||
| count, | |||
| stream | |||
| ) |
| #define MMG_FSCANF | ( | stream, | |
| format, | |||
| ... | |||
| ) |
check the return value of fscanf
| typedef struct MMG5_dNode_s MMG5_dNode |
| typedef struct MMG5_iNode_s MMG5_iNode |
| typedef MMG5_Bezier* MMG5_pBezier |
| enum MMG5_Format |
Type of supported file format.
| double MMG2D_quickarea | ( | double | a[2], |
| double | b[2], | ||
| double | c[2] | ||
| ) |
| a | point coordinates |
| b | point coor |
| c | point coor |
Compute tria area.

| void MMG5_2d3dUsage | ( | void | ) |
Print help for common options between 2D and 3D.

| int MMG5_Add_dnode | ( | MMG5_pMesh | mesh, |
| MMG5_dNode ** | liLi, | ||
| int | k, | ||
| double | val | ||
| ) |
| mesh | pointer toward the mesh structure (for count of used memory). |
| liLi | pointer toward the address of the root of the linked list. |
| k | integer value to add to the linked list. |
| val | real value to add to the linked list. |
Add a node with integer value k and real value val to a sorted linked list with unique entries.

| int MMG5_Add_inode | ( | MMG5_pMesh | mesh, |
| MMG5_iNode ** | liLi, | ||
| int | val | ||
| ) |
| mesh | pointer toward the mesh structure (for count of used memory). |
| liLi | pointer toward the address of the root of the linked list. |
| val | value to add to the linked list. |
Add a node with value val to a sorted linked list with unique entries.


| void MMG5_advancedUsage | ( | void | ) |
Print help for advanced users of mmg.

| void MMG5_bezierEdge | ( | MMG5_pMesh | , |
| int | , | ||
| int | , | ||
| double * | , | ||
| double * | , | ||
| int8_t | , | ||
| double * | |||
| ) |
| int MMG5_boulec | ( | MMG5_pMesh | mesh, |
| int * | adjt, | ||
| int | start, | ||
| int | ip, | ||
| double * | tt | ||
| ) |
| mesh | pointer toward the mesh structure. |
| adjt | pointer toward the table of triangle adjacency. |
| start | index of triangle where we start to work. |
| ip | index of vertex where the tangent is computed. |
| tt | pointer toward the computed tangent. |
Compute the tangent to the curve at point ip.
| int MMG5_boulen | ( | MMG5_pMesh | mesh, |
| int * | adjt, | ||
| int | start, | ||
| int | ip, | ||
| double * | nn | ||
| ) |
| mesh | pointer toward the mesh structure. |
| adjt | pointer toward the table of triangle adjacency. |
| start | index of triangle where we start to work. |
| ip | index of vertex where the normal is computed. |
| nn | pointer toward the computed tangent. |
Compute average normal of triangles sharing P without crossing ridge.

| int MMG5_boulep | ( | MMG5_pMesh | mesh, |
| int | start, | ||
| int | ip, | ||
| int * | adja, | ||
| int * | list | ||
| ) |
| mesh | pointer toward mesh structure. |
| start | a triangle to which ip belongs. |
| ip | point index |
| adja | pointer toward the adjacency array. |
| list | pointer toward the list of points connected to ip. |
Return all vertices connected to ip (with list[0] = ip).

| int MMG5_bouler | ( | MMG5_pMesh | mesh, |
| int * | adjt, | ||
| int | start, | ||
| int | ip, | ||
| int * | list, | ||
| int * | listref, | ||
| int * | ng, | ||
| int * | nr, | ||
| int | lmax | ||
| ) |
| mesh | pointer toward the mesh structure. |
| adjt | pointer toward the table of triangle adjacency. |
| start | index of triangle where we start to work. |
| ip | index of vertex on which we work. |
| list | pointer toward the computed list of GEO vertices incident to ip. |
| listref | pointer toward the corresponding edge references |
| ng | pointer toward the number of ridges. |
| nr | pointer toward the number of reference edges. |
| lmax | maxmum size for the ball of the point ip. |
Store edges and count the number of ridges and reference edges incident to the vertex ip.

| int MMG5_boundingBox | ( | MMG5_pMesh | mesh | ) |
| mesh | pointer toward the mesh structure. |
Compute the mesh bounding box and fill the min, max and delta fields of the MMG5_info structure.

| void MMG5_build3DMetric | ( | MMG5_pMesh | mesh, |
| MMG5_pSol | sol, | ||
| int | ip, | ||
| double | dbuf[6] | ||
| ) |
| mesh | pointer toward the mesh structure |
| sol | pointer toward the sol structure. |
| index | of point in which we want to build the metric |
| dbuf | builded metric |
Build the metric at point ip depending with its type (ridge/not ridge).

| int MMG5_buildridmet | ( | MMG5_pMesh | , |
| MMG5_pSol | , | ||
| int | , | ||
| double | , | ||
| double | , | ||
| double | , | ||
| double * | , | ||
| double | [3][3] | ||
| ) |
| int MMG5_buildridmetfic | ( | MMG5_pMesh | , |
| double * | , | ||
| double * | , | ||
| double | , | ||
| double | , | ||
| double | , | ||
| double * | |||
| ) |
| int MMG5_buildridmetnor | ( | MMG5_pMesh | , |
| MMG5_pSol | , | ||
| int | , | ||
| double * | , | ||
| double * | , | ||
| double | [3][3] | ||
| ) |
| double MMG5_caltri33_ani | ( | MMG5_pMesh | mesh, |
| MMG5_pSol | met, | ||
| MMG5_pTria | pt | ||
| ) |
| mesh | pointer toward the mesh structure. |
| met | pointer toward the meric structure. |
| pt | pointer toward the triangle structure. |
Compute the quality of the surface triangle ptt with respect to an anisotropic metric and a classic storage of the ridges metrics.

| double MMG5_caltri_ani | ( | MMG5_pMesh | mesh, |
| MMG5_pSol | met, | ||
| MMG5_pTria | ptt | ||
| ) |
| mesh | pointer toward the mesh structure. |
| met | pointer toward the meric structure. |
| ptt | pointer toward the triangle structure. |
Compute the quality of the surface triangle ptt with respect to an anisotropic metric.

|
inline |
| mesh | pointer toward the mesh structure. |
| met | pointer toward the meric structure. |
| ptt | pointer toward the triangle structure. |
Compute the quality of the surface triangle ptt with respect to an isotropic metric.
| void MMG5_check_hminhmax | ( | MMG5_pMesh | mesh, |
| int8_t | sethmin, | ||
| int8_t | sethmax | ||
| ) |
| mesh | pointer toward the mesh structure. |
| sethmin | 1 if hmin is setted by the user. |
| sethmax | 1 if hmax is setted by the user. |
Check the compatibility between the automatically computed hmin/hmax values and the user settings.

| int MMG5_check_readedMesh | ( | MMG5_pMesh | mesh, |
| int | nref | ||
| ) |
| mesh | pointer toward an Mmg mesh |
| nref | pointer toward the number of negative refs (replaced by abolute values). |
Check the tetra orientation, print warning it negative refs have been detected, mark points as used and remove elt refs in iso mode.


| int MMG5_chkMetricType | ( | MMG5_pMesh | mesh, |
| int * | type, | ||
| FILE * | inm | ||
| ) |
| mesh | pointer toward the mesh structure. |
| type | type of the metric |
| inm | metric file |
Check if the type of the metric is compatible with the remeshing mode. If not, deallocate the type array and close the metric file.


| int MMG5_compute_meanMetricAtMarkedPoints_ani | ( | MMG5_pMesh | mesh, |
| MMG5_pSol | met | ||
| ) |
| mesh | pointer toward the mesh structure. |
| met | pointer toward the metric structure. |
Compute the mean metric at mesh points with a non-nul s field. At the beginning, for a given point ip,
contains the sum of n metrics and the s field of ip contains the number of metrics summed in the point. Set the flag of the processed points to 3.

| int MMG5_compute_meanMetricAtMarkedPoints_iso | ( | MMG5_pMesh | mesh, |
| MMG5_pSol | met | ||
| ) |
| mesh | pointer toward the mesh structure. |
| met | pointer toward the metric structure. |
Compute the mean metric at mesh points with a non-nul s field. At the beginning, the metric of a given point contains the sum of n metrics and the s field of the point the number of metrics summed in the point. Set the flag of the processed points to 3.

|
inline |
| mesh | pointer toward the mesh structure. |
| bdryRefs | pointer toward the list of the boundary references. |
Count the local default values at triangles and fill the list of the boundary references.
Count the number of different boundary references and list it


| int MMG5_defsiz_startingMessage | ( | MMG5_pMesh | mesh, |
| MMG5_pSol | met, | ||
| const char * | funcname | ||
| ) |
| mesh | pointer toward the mesh structure. |
| met | pointer toward the metric structure. |
| funcname | name of the calling function |
Print that we enter in the defsiz function in high verbosity level and check the hmax value.

| void MMG5_defUninitSize | ( | MMG5_pMesh | mesh, |
| MMG5_pSol | met, | ||
| int8_t | ismet | ||
| ) |
| mesh | pointer toward the mesh structure. |
| met | pointer toward the metric structure. |
| ismet | 1 if user provided metric. |
Search for points with unintialized metric and define anisotropic size at this points.

|
inline |
Compute 3 * 3 determinant : det(c1-c0,c2-c0,v)

|
inline |
Compute 3 * 3 determinant : det(c1-c0,c2-c0,c3-c0)


| int MMG5_devangle | ( | double * | n1, |
| double * | n2, | ||
| double | crit | ||
| ) |
| n1 | first normal |
| n2 | second normal |
| crit | ridge threshold |
Check if the angle between n1 and n2 is larger than the ridge criterion. If yes, return 1, 0 otherwise (ridge creation).
| void MMG5_displayLengthHisto | ( | MMG5_pMesh | mesh, |
| int | ned, | ||
| double * | avlen, | ||
| int | amin, | ||
| int | bmin, | ||
| double | lmin, | ||
| int | amax, | ||
| int | bmax, | ||
| double | lmax, | ||
| int | nullEdge, | ||
| double * | bd, | ||
| int * | hl, | ||
| int8_t | shift | ||
| ) |
| mesh | pointer toward the mesh structure. |
| ned | edges number. |
| avlen | pointer toward the average edges lengths. |
| amin | index of first extremity of the smallest edge. |
| bmin | index of second extremity of the smallest edge. |
| lmin | smallest edge length. |
| amax | index of first extremity of the largest edge. |
| bmax | index of second extremity of the largest edge. |
| lmax | largest edge length. |
| nullEdge | number of edges for which we are unable to compute the length |
| bd | pointer toward the table of the quality span. |
| hl | pointer toward the table that store the number of edges for eac |
| shift | value to shift the target lenght interval span of quality |
Display histogram of edge length.


| void MMG5_displayLengthHisto_internal | ( | int | ned, |
| int | amin, | ||
| int | bmin, | ||
| double | lmin, | ||
| int | amax, | ||
| int | bmax, | ||
| double | lmax, | ||
| int | nullEdge, | ||
| double * | bd, | ||
| int * | hl, | ||
| int8_t | shift, | ||
| int | imprim | ||
| ) |
| ned | edges number. |
| amin | index of first extremity of the smallest edge. |
| bmin | index of second extremity of the smallest edge. |
| lmin | smallest edge length. |
| amax | index of first extremity of the largest edge. |
| bmax | index of second extremity of the largest edge. |
| lmax | largest edge length. |
| nullEdge | number of edges for which we are unable to compute the length |
| bd | pointer toward the table of the quality span. |
| hl | pointer toward the table that store the number of edges for eac |
| shift | value to shift the target lenght interval span of quality |
| imprim | verbosity level |
Display histogram of edge length without the histo header

| int MMG5_elementWeight | ( | MMG5_pMesh | mesh, |
| MMG5_pSol | met, | ||
| MMG5_pTria | pt, | ||
| MMG5_pPoint | p0, | ||
| MMG5_Bezier * | pb, | ||
| double | r[3][3], | ||
| double | gv[2] | ||
| ) |
| mesh | pointer toward the mesh structure. |
| met | pointer toward the metric structure. |
| pt | pointer toward the tria on which we integrate. |
| p0 | pointer toward the point that we want to move. |
| pb | bezier patch of the triangle. |
| r | rotation matrix that sends the normal at point p0 to e_z. |
| gv | centre of mass that we want to update using the computed element weight. |
Compute integral of sqrt(T^J(xi) M(P(xi)) J(xi)) * P(xi) over the triangle.

|
inlinestatic |
Inlined functions for libraries and executables
| sigid | signal number. |
Signal handling: specify error messages depending from catched signal.
| void MMG5_fillDefmetregSys | ( | int | , |
| MMG5_pPoint | , | ||
| int | , | ||
| MMG5_Bezier | , | ||
| double | r[3][3], | ||
| double * | , | ||
| double * | , | ||
| double * | , | ||
| double * | |||
| ) |
| void MMG5_Free_dlinkedList | ( | MMG5_pMesh | mesh, |
| MMG5_dNode * | liLi | ||
| ) |
| mesh | pointer toward the mesh structure (for count of used memory). |
| liLi | pointer toward the root of the linked list. |
Free the memory used by the linked list whose root is liLi.
| void MMG5_Free_ilinkedList | ( | MMG5_pMesh | mesh, |
| MMG5_iNode * | liLi | ||
| ) |
| mesh | pointer toward the mesh structure (for count of used memory). |
| liLi | pointer toward the root of the linked list. |
Free the memory used by the linked list whose root is liLi.

| char* MMG5_Get_basename | ( | char * | path | ) |
| path | string containing a filename and its path |
Extract basename from a path (allocate a string to store it).

| char* MMG5_Get_filenameExt | ( | char * | filename | ) |
| filename | string containing a filename |
Get the extension of the filename string. Do not consider '.o' as an extension.

| int MMG5_Get_format | ( | char * | ptr, |
| int | fmt | ||
| ) |
| ptr | pointer toward the file extension (dot included) |
| fmt | default file format. |
Get the wanted file format from the mesh extension. If fmt is provided, it is used as default file format (ptr==NULL), otherwise, the default file format is the medit one.

| const char* MMG5_Get_formatName | ( | enum MMG5_Format | fmt | ) |
| fmt | file format. |
Print the name of the file format associated to fmt.

| char* MMG5_Get_path | ( | char * | path | ) |
| path | string containing a filename and its path |
Remove filename from a path and return the path in a newly allocated string.

| int MMG5_getIniRef | ( | MMG5_pMesh | mesh, |
| int | ref | ||
| ) |
| mesh | pointer toward the mesh |
| ref | final reference for which we are searching the initial one |
Retrieve the initial domain reference associated to the (split) reference ref.

| int MMG5_grad2metSurf | ( | MMG5_pMesh | mesh, |
| MMG5_pSol | met, | ||
| MMG5_pTria | pt, | ||
| int | np1, | ||
| int | np2 | ||
| ) |
| mesh | pointer toward the mesh. |
| met | pointer toward the metric structure. |
| pt | pointer toward a triangle. |
| np1 | global index of the first extremity of the edge. |
| np2 | global index of the second extremity of the edge. |
Enforces gradation of metric in one extremity of edge $f[ np1; np2]$f in tria pt with respect to the other, along the direction of the associated support curve first, then along the normal direction.

| int MMG5_grad2metSurfreq | ( | MMG5_pMesh | mesh, |
| MMG5_pSol | met, | ||
| MMG5_pTria | pt, | ||
| int | npmaster, | ||
| int | npslave | ||
| ) |
| mesh | pointer toward the mesh. |
| met | pointer toward the metric structure. |
| pt | pointer toward the processed triangle. |
| npmaster | edge extremity that cannot be modified |
| npslave | edge extremity to modify to respect the gradation. |
Enforces gradation of metric of the extremity ±a npslave of edge $f[ npmaster; npslave]$f in tria pt with respect to the other, along the direction of the associated support curve first, then along the normal direction.

| void MMG5_gradation_info | ( | MMG5_pMesh | mesh | ) |
| mesh | pointer toward the mesh structure. |
Print gradation values (depending on the verbosity).

| void MMG5_gradEigenvreq | ( | double * | dm, |
| double * | dn, | ||
| double | difsiz, | ||
| int8_t | dir, | ||
| int8_t * | ier | ||
| ) |
| dm | eigenvalues of the first matrix (not modified) |
| dn | eigenvalues of the second matrix (modified) |
| difsiz | maximal size gap authorized by the gradation. |
| dir | direction in which the sizes are graded. |
| ier | 2 if dn has been updated, 0 otherwise. |
Gradation of size dn = 1/sqrt(eigenv of the tensor) for required points in the idir direction.

| int MMG5_gradsiz_ani | ( | MMG5_pMesh | mesh, |
| MMG5_pSol | met, | ||
| int * | it | ||
| ) |
| mesh | pointer toward the mesh structure. |
| met | pointer toward the metric structure. |
| it | number of performed iteration (to fill) |
Standard gradation procedure.
Mark the edges belonging to a required entity

| int MMG5_gradsiz_iso | ( | MMG5_pMesh | mesh, |
| MMG5_pSol | met | ||
| ) |
| mesh | pointer toward the mesh |
| met | pointer toward the metric |
Isotropic mesh gradation routine. The points belonging to a required edge are treated in gradsizreq_iso.


| int MMG5_gradsizreq_ani | ( | MMG5_pMesh | mesh, |
| MMG5_pSol | met | ||
| ) |
| mesh | pointer toward the mesh structure. |
| met | pointer toward the metric structure. |
Enforces mesh gradation (on required entities) by truncating metric field.
Mark the edges belonging to a required entity (already done if the classic gradation is enabled)


| int MMG5_gradsizreq_iso | ( | MMG5_pMesh | mesh, |
| MMG5_pSol | met | ||
| ) |
| mesh | pointer toward the mesh |
| met | pointer toward the metric |
Isotropic mesh gradation routine. The points belonging to a required entity are treated in gradsizreq_iso.
Mark the edges belonging to a required entity
Update the sizes and mark the treated points


| int MMG5_hashEdge | ( | MMG5_pMesh | mesh, |
| MMG5_Hash * | hash, | ||
| int | a, | ||
| int | b, | ||
| int | k | ||
| ) |
| mesh | pointer toward the mesh structure. |
| hash | pointer toward the hash table of edges. |
| a | index of the first extremity of the edge. |
| b | index of the second extremity of the edge. |
| k | index of point along the edge. |
Add edge
to the hash table.


| int MMG5_hashEdgeTag | ( | MMG5_pMesh | mesh, |
| MMG5_Hash * | hash, | ||
| int | a, | ||
| int | b, | ||
| int16_t | tag | ||
| ) |
| mesh | pointer toward the mesh structure. |
| hash | pointer toward the hash table of edges. |
| a | index of the first extremity of the edge. |
| b | index of the second extremity of the edge. |
| tag | edge tag |
Add edge
to the hash table if it doesn't exist and store the edge tag. If the edge exist, add the new tag to the already stored tags.

| int MMG5_hashGet | ( | MMG5_Hash * | hash, |
| int | a, | ||
| int | b | ||
| ) |
| hash | pointer toward the hash table of edges. |
| a | index of the first extremity of the edge. |
| b | index of the second extremity of the edge. |
.Find the index of point stored along
.


| int MMG5_hashNew | ( | MMG5_pMesh | mesh, |
| MMG5_Hash * | hash, | ||
| int | hsiz, | ||
| int | hmax | ||
| ) |
| mesh | pointer toward the mesh structure. |
| hash | pointer toward the hash table of edges. |
| hsiz | initial size of hash table. |
| hmax | maximal size of hash table. |
Hash edges or faces.

| int MMG5_hashUpdate | ( | MMG5_Hash * | hash, |
| int | a, | ||
| int | b, | ||
| int | k | ||
| ) |
| mesh | pointer toward the mesh structure. |
| hash | pointer toward the hash table of edges. |
| a | index of the first extremity of the edge. |
| b | index of the second extremity of the edge. |
| k | new index of point along the edge. |
Update the index of the point stored along the edge
| int MMG5_interp_iso | ( | double * | ma, |
| double * | mb, | ||
| double * | mp, | ||
| double | t | ||
| ) |
| ma | pointer on a metric |
| mb | pointer on a metric |
| mp | pointer on the computed interpolated metric |
| t | interpolation parameter (comprise between 0 and 1) |
Linear interpolation of isotropic sizemap along an edge
| int MMG5_interpreg_ani | ( | MMG5_pMesh | , |
| MMG5_pSol | , | ||
| MMG5_pTria | , | ||
| int8_t | , | ||
| double | , | ||
| double * | mr | ||
| ) |
| int MMG5_intersecmet22 | ( | MMG5_pMesh | mesh, |
| double * | m, | ||
| double * | n, | ||
| double * | mr | ||
| ) |
| mesh | pointer toward the mesh structure. |
| m | pointer toward a metric. |
| n | pointer toward a metric. |
| mr | computed metric. |
Compute the intersected (2 x 2) metric from metrics m and n : take simultaneous reduction, and proceed to truncation in sizes.

| int MMG5_intmetsavedir | ( | MMG5_pMesh | mesh, |
| double * | m, | ||
| double * | n, | ||
| double * | mr | ||
| ) |
| mesh | pointer toward the mesh structure. |
| m | pointer toward the first metric to intersect. |
| n | pointer toward the second metric to intersect. |
| mr | pointer toward the computed intersected metric. |
Compute the intersected (2 x 2) metric between metrics m and n, PRESERVING the directions of m. Result is stored in mr.


| int MMG5_intridmet | ( | MMG5_pMesh | , |
| MMG5_pSol | , | ||
| int | , | ||
| int | , | ||
| double | , | ||
| double * | , | ||
| double * | |||
| ) |
| int MMG5_invmat | ( | double * | m, |
| double * | mi | ||
| ) |
| m | pointer toward a 3x3 symetric matrix |
| mi | pointer toward the computed 3x3 matrix. |
Invert m (3x3 symetric matrix) and store the result on mi
| int MMG5_invmat33 | ( | double | m[3][3], |
| double | mi[3][3] | ||
| ) |
| m | initial matrix. |
| mi | inverted matrix. |
Invert 3x3 non-symmetric matrix stored in 2 dimensions
| int MMG5_invmatg | ( | double | m[9], |
| double | mi[9] | ||
| ) |
| m | initial matrix. |
| mi | inverted matrix. |
Invert 3x3 non-symmetric matrix.

| int MMG5_isSplit | ( | MMG5_pMesh | mesh, |
| int | ref, | ||
| int * | refint, | ||
| int * | refext | ||
| ) |
| mesh | pointer toward the mesh structure. |
| ref | initial reference. |
| refint | internal reference after ls discretization. |
| refint | internal reference after ls discretization. |
Identify whether an entity with reference ref should be split, and the labels of the resulting entities.

| void MMG5_keep_subdomainElts | ( | MMG5_pMesh | mesh, |
| int | nsd, | ||
| int(*)(MMG5_pMesh, int) | delElt | ||
| ) |
| mesh | pointer toward the mesh structure. |
| nsd | subdomain index. |
| delElt | function to call to delete elt. |
Remove triangles that do not belong to subdomain of index nsd

| void MMG5_lagUsage | ( | void | ) |
Print help for lagrangian motion option.

| int MMG5_loadMshMesh_part1 | ( | MMG5_pMesh | mesh, |
| const char * | filename, | ||
| FILE ** | inm, | ||
| long * | posNodes, | ||
| long * | posElts, | ||
| long ** | posNodeData, | ||
| int * | bin, | ||
| int * | iswp, | ||
| int * | nelts, | ||
| int * | nsols | ||
| ) |
| mesh | pointer toward the mesh |
| filename | pointer toward the name of file |
| inm | pointer toward the file pointer |
| posNodes | pointer toward the position of nodes data in file |
| posElts | pointer toward the position of elts data in file |
| posNodeData | pointer toward the list of the positions of data in file |
| bin | 1 if binary format |
| nelts | number of elements in file |
| nsol | number of data in file |
Begin to read mesh at MSH file format. Read the mesh size informations.


| 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 int | nelts, | ||
| const int | nsols | ||
| ) |
| mesh | pointer toward the mesh |
| sol | pointer toward the solutions array |
| inm | pointer toward the file pointer |
| posNodes | position of nodes data in file |
| posElts | position of elts data in file |
| posNodeData | position of solution data in file |
| bin | 1 if binary format |
| nelts | number of elements in file |
| nsols | number of silutions in file |
End to read mesh and solution array at MSH file format after the mesh/solution array alloc.
Second step: read the nodes and elements
Read the solution at nodes


| int MMG5_loadSolHeader | ( | const char * | filename, |
| int | meshDim, | ||
| FILE ** | inm, | ||
| int * | ver, | ||
| int * | bin, | ||
| int * | iswp, | ||
| int * | np, | ||
| int * | dim, | ||
| int * | nsols, | ||
| int ** | type, | ||
| long * | posnp, | ||
| int | imprim | ||
| ) |
| filename | name of file. |
| meshDim | mesh dimenson. |
| inm | allocatable pointer toward the FILE structure |
| ver | file version (1=simple precision, 2=double) |
| bin | 1 if the file is a binary |
| iswp | 1 or 0 depending on the endianness (binary only) |
| np | number of solutions of each type |
| dim | solution dimension |
| nsols | number of solutions of different types in the file |
| type | type of solutions |
| posnp | pointer toward the position of the point list in the file |
| imprim | verbosity |
Open the "filename" solution file and read the file header.


| int MMG5_loadVtuMesh | ( | MMG5_pMesh | mesh, |
| MMG5_pSol | sol, | ||
| const char * | filename | ||
| ) |
| void MMG5_mark_pointsOnReqEdge_fromTria | ( | MMG5_pMesh | mesh | ) |
| mesh | pointer toward the mesh structure. |
Set the s field of the points that belongs to a required edge to 1, set it to 0 otherwise.

| void MMG5_mark_usedVertices | ( | MMG5_pMesh | mesh, |
| void(*)(MMG5_pMesh, int) | delPt | ||
| ) |
| mesh | pointer toward the mesh structure. |
| delPt | function to call to delete point. |
Mark the mesh vertices that belong to triangles or quadrangles as used (for Mmgs or Mmg2d).

| void MMG5_mark_verticesAsUnused | ( | MMG5_pMesh | mesh | ) |
| mesh | pointer toward the mesh structure. |
Mark all mesh vertices as unused.

| void MMG5_memOption_memSet | ( | MMG5_pMesh | mesh | ) |
| mesh | pointer toward the mesh structure |
Set the memMax value to its "true" value if memory asked by user. Here the MMG5_MEMPERCENT coef is already applied on memMax.


| size_t MMG5_memSize | ( | void | ) |
Compute the available memory size of the computer.

| int MMG5_minQualCheck | ( | int | iel, |
| double | minqual, | ||
| double | alpha | ||
| ) |
| iel | index of the worst tetra of the mesh |
| minqual | quality of the worst tetra of the mesh (will be normalized by alpha) |
| alpha | normalisation parameter for the quality |
Print warning or error messages depending on the quality of the worst tetra of the mesh.

| void MMG5_mmgDefaultValues | ( | MMG5_pMesh | mesh | ) |
| mesh | pointer toward the mesh structure. |
Print the default parameters values.

| int MMG5_mmgHashTria | ( | MMG5_pMesh | mesh, |
| int * | adjt, | ||
| MMG5_Hash * | hash, | ||
| int | chkISO | ||
| ) |
| mesh | pointer toward the mesh structure. |
| adjt | pointer toward the adjacency table of the surfacic mesh. |
| hash | pointer toward the edge hash table. |
| chkISO | flag to say if we check ISO references (so if we come from mmg3d). |
Create surface adjacency

| void MMG5_mmgInit_parameters | ( | MMG5_pMesh | mesh | ) |
| int MMG5_mmgIntextmet | ( | MMG5_pMesh | , |
| MMG5_pSol | , | ||
| int | , | ||
| double * | , | ||
| double * | |||
| ) |
| int MMG5_mmgIntmet33_ani | ( | double * | m, |
| double * | n, | ||
| double * | mr, | ||
| double | s | ||
| ) |
| m | input metric. |
| n | input metric. |
| mr | computed output metric. |
| s | parameter coordinate for the interpolation of metrics m and n. |
Compute the interpolated
metric from metrics m and n, at parameter s :
, both metrics being expressed in the simultaneous reduction basis: linear interpolation of sizes.


| void MMG5_mmgUsage | ( | char * | prog | ) |
| *prog | pointer toward the program name. |
Print help for common options of the 3 codes (first section).

| void MMG5_mn | ( | double | m[6], |
| double | n[6], | ||
| double | mn[9] | ||
| ) |
| m | symetric matrix |
| n | symetric matrix |
| mn | result |
Compute product m*n (mn stored in columns: mn[1] = mn[1][0]).
|
inline |
| mesh | pointer toward the mesh stucture. |
| pt | triangle for which we compute the surface. |
Compute non-oriented surface area of a triangle.

|
inline |
| mesh | pointer toward the mesh stucture. |
| ip1 | first point of face. |
| ip2 | second point of face. |
| ip3 | third point of face. |
| n | pointer to store the computed normal. |
Compute non-normalized face normal given three points on the surface.

|
inline |
| mesh | pointer toward the mesh stucture. |
| ip1 | first point of face. |
| ip2 | second point of face. |
| ip3 | third point of face. |
| n | pointer to store the computed normal. |
Compute normalized face normal given three points on the surface.


|
inline |
| mesh | pointer toward the mesh stucture. |
| pt | pointer toward the triangle structure. |
| n | pointer to store the computed normal. |
Compute triangle normal.


|
inline |
| point | Pointer toward the points array |
| v | pointer toward the point indices |
Compute oriented volume of a tetrahedron (x6)


| void MMG5_paramUsage1 | ( | void | ) |
Print help for common parameters options of the 3 codes (first section).

| void MMG5_paramUsage2 | ( | void | ) |
Print help for common options of the 3 codes (second section).

| int MMG5_paratmet | ( | double | c0[3], |
| double | n0[3], | ||
| double | m[6], | ||
| double | c1[3], | ||
| double | n1[3], | ||
| double | mt[6] | ||
| ) |
| c0 | table of the coordinates of the starting point. |
| n0 | normal at the starting point. |
| m | metric to be transported. |
| c1 | table of the coordinates of the ending point. |
| n1 | normal at the ending point. |
| mt | computed metric. |
Parallel transport of a metric tensor field, attached to point c0, with normal n0, to point c1, with normal n1.


| void MMG5_printMetStats | ( | MMG5_pMesh | mesh, |
| MMG5_pSol | met | ||
| ) |
| mesh | pointer toward the mesh structure. |
| met | pointer toward the metric structure. |
print metric statistics

| void MMG5_printSolStats | ( | MMG5_pMesh | mesh, |
| MMG5_pSol * | sol | ||
| ) |
| mesh | pointer toward the mesh structure. |
| sol | pointer toward the solutions array. |
print solutions statistics

| void MMG5_printTria | ( | MMG5_pMesh | mesh, |
| char * | fileName | ||
| ) |
| mesh | pointer toward the mesh structure. |
| fileName | pointer toward the file name. |
Debug function (not use in clean code): write mesh->tria structure in file.
| int MMG5_readDoubleSol3D | ( | MMG5_pSol | sol, |
| FILE * | inm, | ||
| int | bin, | ||
| int | iswp, | ||
| int | pos | ||
| ) |
| sol | pointer toward an allocatable sol structure. |
| inm | pointer toward the solution file |
| bin | 1 if binary file |
| iswp | Endianess |
| index | of the readed solution |
Read the solution value for vertex of index pos in double precision.

| int MMG5_readFloatSol3D | ( | MMG5_pSol | sol, |
| FILE * | inm, | ||
| int | bin, | ||
| int | iswp, | ||
| int | pos | ||
| ) |
| sol | pointer toward an allocatable sol structure. |
| inm | pointer toward the solution file |
| bin | 1 if binary file |
| iswp | Endianess |
| index | of the readed solution |
Read the solution value for vertex of index pos in floating precision.

| int MMG5_regnor | ( | MMG5_pMesh | mesh | ) |
| mesh | pointer toward a MMG5 mesh structure. |
Regularization procedure for derivatives, dual Laplacian

| char* MMG5_Remove_ext | ( | char * | path, |
| char * | ext | ||
| ) |
| path | path from which we want to remove the extension. |
Allocate a new string and copy path without extension in it.

| int MMG5_reset_metricAtReqEdges_surf | ( | MMG5_pMesh | mesh, |
| MMG5_pSol | met, | ||
| int8_t | ismet | ||
| ) |
| mesh | pointer toward the mesh structure. |
| met | pointer toward the metric structure. |
| ismet | 1 if user provided metric |
For a triangle mesh, process the triangles and set to 0 the metrics at points that are at the extremities of a required edge.

| double MMG5_ridSizeInNormalDir | ( | MMG5_pMesh | , |
| int | , | ||
| double * | , | ||
| MMG5_pBezier | , | ||
| double | , | ||
| double | |||
| ) |
| double MMG5_ridSizeInTangentDir | ( | MMG5_pMesh | mesh, |
| MMG5_pPoint | p0, | ||
| int | idp, | ||
| int * | iprid, | ||
| double | isqhmin, | ||
| double | isqhmax | ||
| ) |
| mesh | pointer toward the mesh structure. |
| p0 | pointer toward the point at which we define the metric. |
| idp | global index of the point at which we define the metric. |
| iprid | pointer toward the two extremities of the ridge. |
| isqhmin | minimum edge size. |
| isqhmax | maximum edge size. |
Compute the specific size of a ridge in the direction of the tangent of the ridge.

|
inline |
| r | 3x3 matrix |
| m | symetric matrix |
| mr | result |
Compute product R*M*tR when M is symmetric

|
inline |
| n | pointer toward the vector that we want to send on the third vector of canonical basis. |
| r | computed rotation matrix. |
Compute rotation matrix that sends vector n to the third vector of canonical basis.

| int MMG5_saveMshMesh | ( | MMG5_pMesh | mesh, |
| MMG5_pSol * | sol, | ||
| const char * | filename, | ||
| int | metricData | ||
| ) |
| mesh | pointer toward the mesh structure. |
| sol | pointer toward an array of solutions. |
| filename | name of file. |
| metricData | 1 if the data saved is a metric (if only 1 data) |
Write mesh and a list of solutions at MSH file format (.msh extension). Write binary file for .mshb extension.and ASCII for .msh one.
First step: Count the number of elements of each type
Second step: save the elements at following format: "idx type tagNumber tag0 tag1... v0_elt v1_elt..."
Write solution
Save the solution at following format: "idx sol"


| int MMG5_saveSolHeader | ( | MMG5_pMesh | mesh, |
| const char * | filename, | ||
| FILE ** | inm, | ||
| int | ver, | ||
| int * | bin, | ||
| int | np, | ||
| int | dim, | ||
| int | nsols, | ||
| int * | type, | ||
| int * | size | ||
| ) |
| mesh | pointer toward the mesh structure. |
| filename | name of file. |
| inm | allocatable pointer toward the FILE structure. |
| ver | file version (1=simple precision, 2=double). |
| bin | 1 if the file is a binary. |
| np | number of solutions of each type. |
| dim | solution dimension. |
| nsols | number of solutions of different types in the file. |
| type | type of solutions. |
| size | size of solutions. |
Open the "filename" solution file and read the file header.


| int MMG5_scale_meshAndSol | ( | MMG5_pMesh | mesh, |
| MMG5_pSol | met, | ||
| MMG5_pSol | sol, | ||
| double * | dd, | ||
| int8_t * | sethmin, | ||
| int8_t * | sethmax | ||
| ) |
| mesh | pointer toward the mesh structure. |
| met | pointer toward a metric |
| sol | pointer toward a solution structure (level-set or displacement). |
| dd | pointer toward the scaling value (to fill) |
| sethmin | setted to 1 if hmin must not be computed from the metric. |
| sethmax | setted to 1 if hmax must not be computed from the metric. |
Scale the mesh and the size informations between 0 and 1. Compute a default value for the hmin/hmax parameters if needed.


| int MMG5_scale_scalarMetric | ( | MMG5_pMesh | mesh, |
| MMG5_pSol | met, | ||
| double | dd, | ||
| int8_t | sethmin, | ||
| int8_t | sethmax | ||
| ) |
| mesh | pointer toward the mesh structure. |
| met | pointer toward the metric structure. |
| dd | scaling value. |
| sethmin | 1 if hmin must not be automatically computed |
| sethmax | 1 if hmin must not be automatically computed |
Scale and truncate by hmin/hmax the scalar metric stored in met. If hmin/hmax are not provided by the user, it is automatically computed from the metric.


| int MMG5_scaleMesh | ( | MMG5_pMesh | mesh, |
| MMG5_pSol | met, | ||
| MMG5_pSol | sol | ||
| ) |
| mesh | pointer toward the mesh structure. |
| met | pointer toward the metric structure. |
| sol | pointer toward a solution structure (level-set or displacement). |
Scale the mesh and the size informations between 0 and 1. Compute a default value for the hmin/hmax parameters if needed.

| int MMG5_scotchCall | ( | MMG5_pMesh | mesh, |
| MMG5_pSol | met, | ||
| MMG5_pSol | fields, | ||
| int * | permNodGlob | ||
| ) |
| mesh | pointer toward the mesh structure. |
| met | pointer toward the solution structure. |
| fields | pointer toward an array of solution fields (non mandatory) |
| permNodGlob | store the global permutation of nodes (if provided). |
Call scotch renumbering.
| void MMG5_Set_commonFunc | ( | void | ) |
| int MMG5_simred | ( | MMG5_pMesh | mesh, |
| double * | m, | ||
| double * | n, | ||
| double | dm[2], | ||
| double | dn[2], | ||
| double | vp[2][2] | ||
| ) |
| mesh | pointer toward the mesh |
| m | first matrix |
| n | second matrix |
| dm | eigenvalues of m in the coreduction basis (to fill) |
| dn | eigenvalues of n in the coreduction basis (to fill) |
| vp | coreduction basis (to fill) |
Perform simultaneous reduction of matrices m and n.


| void MMG5_solTruncatureForOptim | ( | MMG5_pMesh | mesh, |
| MMG5_pSol | met | ||
| ) |
| mesh | pointer toward the mesh structure. |
| met | pointer 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.

| int MMG5_solveDefmetrefSys | ( | MMG5_pMesh | , |
| MMG5_pPoint | , | ||
| int * | , | ||
| double | r[3][3], | ||
| double * | , | ||
| double * | , | ||
| double * | , | ||
| double * | , | ||
| double | , | ||
| double | , | ||
| double | |||
| ) |
| int MMG5_solveDefmetregSys | ( | MMG5_pMesh | , |
| double | r[3][3], | ||
| double * | , | ||
| double * | , | ||
| double * | , | ||
| double * | , | ||
| double | , | ||
| double | , | ||
| double | |||
| ) |
| int MMG5_sum_reqEdgeLengthsAtPoint | ( | MMG5_pMesh | mesh, |
| MMG5_pSol | met, | ||
| int | ip0, | ||
| int | ip1 | ||
| ) |
| mesh | pointer toward the mesh structure. |
| met | pointer toward the metric structure. |
| ip0 | index of the first edge extremity |
| ip1 | index of the second edge extremity |
Compute the euclidean length of the edge ip0 ip1, add this length to the metric of the edge extremities and increment the count of times we have processed this extremities.

| double MMG5_surftri33_ani | ( | MMG5_pMesh | , |
| MMG5_pTria | , | ||
| double * | , | ||
| double * | , | ||
| double * | |||
| ) |
| double MMG5_surftri_ani | ( | MMG5_pMesh | mesh, |
| MMG5_pSol | met, | ||
| MMG5_pTria | ptt | ||
| ) |
| mesh | pointer toward the mesh structure. |
| met | pointer toward the metric structure. |
| ptt | pointer toward the triangle structure. |
Compute the double of the area of the surface triangle ptt with respect to the anisotropic metric met (for special storage of ridges metrics).

| double MMG5_surftri_iso | ( | MMG5_pMesh | mesh, |
| MMG5_pSol | met, | ||
| MMG5_pTria | ptt | ||
| ) |
| mesh | pointer toward the mesh structure. |
| met | pointer toward the meric structure. |
| ptt | pointer toward the triangle structure. |
Compute the area of the surface triangle ptt with respect to the isotropic metric met.
| int MMG5_swapbin | ( | int | sbin | ) |

| double MMG5_swapd | ( | double | sbin | ) |

| float MMG5_swapf | ( | float | sbin | ) |

|
inline |
| a | matrix to invert. |
| b | last member. |
| r | vector of unknowns. |
Solve
symmetric system
.

| int MMG5_unscaleMesh | ( | MMG5_pMesh | mesh, |
| MMG5_pSol | met, | ||
| MMG5_pSol | sol | ||
| ) |
| mesh | pointer toward the mesh structure. |
| met | pointer toward a metric. |
| sol | pointer toward a solution structure (level-set or displacement). |
Unscale the mesh and the size informations to their initial sizes.

| int MMG5_updatemetreq_ani | ( | double * | n, |
| double | dn[2], | ||
| double | vp[2][2] | ||
| ) |
| n | matrix to update |
| dn | eigenvalues of n in the coreduction basis |
| vp | coreduction basis |
Update of the metric n = tP^-1 diag(dn0,dn1)P^-1, P = (vp[0], vp[1]) stored in columns

| void MMG5_writeDoubleSol3D | ( | MMG5_pMesh | mesh, |
| MMG5_pSol | sol, | ||
| FILE * | inm, | ||
| int | bin, | ||
| int | pos, | ||
| int | metricData | ||
| ) |
| mesh | pointer toward the mesh structure |
| sol | pointer toward an allocatable sol structure. |
| inm | pointer toward the solution file |
| bin | 1 if binary file |
| pos | of the writted solution |
| metricData | 1 if the data saved is a metric (if only 1 data) |
Write the solution value for vertex of index pos in double precision.

|
inline |
| mesh | pointer toward the mesh structure. |
| bdryRefs | pointer toward the list of the boundary references. |
| out | pointer toward the file in which to write. |
Write the local default values at triangles in the parameter file.


|
inlinestatic |
|
inlinestatic |
|
inlinestatic |

|
inlinestatic |

| int(* MMG5_bezierCP) (MMG5_pMesh,MMG5_Tria *, MMG5_pBezier,int8_t) |
| int(* MMG5_chkmsh) (MMG5_pMesh, int, int) |
| int(* MMG5_compute_meanMetricAtMarkedPoints) (MMG5_pMesh, MMG5_pSol) |
| int(* MMG5_grad2met_ani) (MMG5_pMesh, MMG5_pSol, MMG5_pTria, int, int) |
| int(* MMG5_grad2metreq_ani) (MMG5_pMesh, MMG5_pSol, MMG5_pTria, int, int) |
| int(* MMG5_indElt) (MMG5_pMesh mesh, int kel) |
| int(* MMG5_indPt) (MMG5_pMesh mesh, int kp) |
|
static |
next vertex of triangle: {1,2,0}
|
static |
previous vertex of triangle: {2,0,1}
| double(* MMG5_lenSurfEdg) (MMG5_pMesh mesh, MMG5_pSol sol,int,int, int8_t) |