36#include "mmgversion.h"
43 for ( i = 0; i < mmgArgc; ++i )
180 fprintf(stdout,
"-octree val specify the max number of points per octree cell \n");
183 fprintf(stdout,
"-rn [n] turn on or off the renumbering using SCOTCH [1/0] \n");
185 fprintf(stdout,
"\n");
187 fprintf(stdout,
"-nofem do not force Mmg to create a finite element mesh \n");
188 fprintf(stdout,
"-nosurf no surface modifications\n");
190 fprintf(stdout,
"\n");
195 fprintf(stdout,
"-optimLES enable skewness improvement (for LES computations)\n");
200 fprintf(stdout,
"\n\n");
210 fprintf(stdout,
"Max number of point per octree cell (-octree) : %d\n",
214 fprintf(stdout,
"SCOTCH renumbering : enabled\n");
216 fprintf(stdout,
"SCOTCH renumbering : disabled\n");
218 fprintf(stdout,
"\n\n");
248 if ( *argv[i] ==
'-' ) {
251 if ( !strcmp(argv[i],
"-ar") ) {
252 if ( i >= argc -1 ) {
253 fprintf(stderr,
"\nMissing argument option %s\n",argv[i]);
257 val = strtof(argv[i+1],&endptr);
258 if ( endptr == &(argv[i+1][strlen(argv[i+1])]) ) {
265 fprintf(stderr,
"\nMissing argument option %s\n",argv[i]);
276 if ( !strcmp(argv[i],
"-A") ) {
286 if ( !strcmp(argv[i],
"-default") ) {
289 else if ( !strcmp(argv[i],
"-d") ) {
301 if ( !strcmp(argv[i],
"-f") ) {
302 if ( ++i < argc && isascii(argv[i][0]) && argv[i][0]!=
'-' ) {
307 fprintf(stderr,
"\nMissing filename for %s\n",argv[i-1]);
318 if ( i >= argc -1 ) {
319 fprintf(stderr,
"\nMissing argument option %s\n",argv[i]);
323 if ( !strcmp(argv[i],
"-hmin") ) {
326 else if ( !strcmp(argv[i],
"-hmax") ) {
329 else if ( !strcmp(argv[i],
"-hsiz") ) {
332 else if ( !strcmp(argv[i],
"-hausd") ) {
335 else if ( !strcmp(argv[i],
"-hgradreq") ) {
338 else if ( !strcmp(argv[i],
"-hgrad") ) {
349 val = strtof(argv[i+1],&endptr);
350 if ( endptr == &(argv[i+1][strlen(argv[i+1])]) ) {
357 fprintf(stderr,
"\nMissing argument option %s\n",argv[i]);
365 if ( !strcmp(argv[i],
"-in") ) {
366 if ( ++i < argc && isascii(argv[i][0]) && argv[i][0]!=
'-') {
371 fprintf(stderr,
"\nMissing filname for %s\n",argv[i-1]);
375 else if ( !strcmp(argv[i],
"-isoref") && ++i <= argc ) {
386 if ( !strcmp(argv[i],
"-lag") ) {
387 if ( ++i < argc && isdigit(argv[i][0]) ) {
392 fprintf(stderr,
"\nMissing or unexpected argument option %s\n",argv[i-1]);
397 else if ( !strcmp(argv[i],
"-ls") ) {
402 val = strtof(argv[i+1],&endptr);
403 if ( endptr == &(argv[i+1][strlen(argv[i+1])]) ) {
410 else if ( !strcmp(argv[i],
"-lssurf") ) {
415 val = strtof(argv[i+1],&endptr);
416 if ( endptr == &(argv[i+1][strlen(argv[i+1])]) ) {
429 if ( !strcmp(argv[i],
"-met") ) {
431 fprintf(stderr,
"\nNo metric structure allocated for %s option\n",
435 if ( ++i < argc && isascii(argv[i][0]) && argv[i][0]!=
'-' ) {
440 fprintf(stderr,
"\nMissing filname for %s\n",argv[i-1]);
444 else if ( !strcmp(argv[i],
"-m") ) {
446 if ( ++i < argc && isdigit(argv[i][0]) ) {
451 fprintf(stderr,
"\nMissing argument option %s\n",argv[i-1]);
461 if ( !strcmp(argv[i],
"-nofem") ) {
465 else if ( !strcmp(argv[i],
"-nreg") ) {
469 else if ( !strcmp(argv[i],
"-nr") ) {
473 else if ( !strcmp(argv[i],
"-nsd") ) {
474 if ( ++i < argc && isdigit(argv[i][0]) ) {
479 fprintf(stderr,
"\nMissing argument option %s\n",argv[i-1]);
483 else if ( !strcmp(argv[i],
"-noswap") ) {
487 else if( !strcmp(argv[i],
"-noinsert") ) {
491 else if( !strcmp(argv[i],
"-nomove") ) {
495 else if( !strcmp(argv[i],
"-nosurf") ) {
499 else if( !strcmp(argv[i],
"-nosizreq") ) {
510 if ( (!strcmp(argv[i],
"-out")) || (!strcmp(argv[i],
"-o")) ) {
511 if ( ++i < argc && isascii(argv[i][0]) && argv[i][0]!=
'-') {
515 fprintf(stderr,
"\nMissing filname for %s\n",argv[i-1]);
519 else if ( !strcmp(argv[i],
"-opnbdy") ) {
524 else if ( !strcmp(argv[i],
"-octree") && ++i < argc ) {
530 else if( !strcmp(argv[i],
"-optimLES") ) {
534 else if( !strcmp(argv[i],
"-optim") ) {
544 if ( !strcmp(argv[i],
"-rmc") ) {
548 val = strtof(argv[i+1],&endptr);
549 if ( endptr == &(argv[i+1][strlen(argv[i+1])]) ) {
557 else if ( !strcmp(argv[i],
"-rn") ) {
559 if ( isdigit(argv[i][0]) ) {
564 fprintf(stderr,
"\nMissing argument option %s\n",argv[i-1]);
569 fprintf(stderr,
"\nMissing argument option %s\n",argv[i-1]);
581 if ( !strcmp(argv[i],
"-sol") ) {
585 if ( ++i < argc && isascii(argv[i][0]) && argv[i][0]!=
'-' ) {
590 fprintf(stderr,
"\nMissing filname for %s\n",argv[i-1]);
600 if ( !strcmp(argv[i],
"-v") ) {
602 if ( isdigit(argv[i][0]) ||
603 (argv[i][0]==
'-' && isdigit(argv[i][1])) ) {
609 fprintf(stderr,
"\nMissing argument option %s\n",argv[i]);
613 fprintf(stderr,
"\nMissing argument option %s\n",argv[i-1]);
623 if ( !strcmp(argv[i],
"-xreg") ) {
627 val = strtof(argv[i+1],&endptr);
628 if ( endptr == &(argv[i+1][strlen(argv[i+1])]) ) {
667 for ( i=1; i< argc; ++i ) {
668 if ( !strcmp(argv[i],
"-val") ) {
672 else if ( ( !strcmp( argv[ i ],
"-?" ) ) || ( !strcmp( argv[ i ],
"-h" ) ) ) {
681 char** mmgArgv = NULL;
690 while ( i < mmgArgc ) {
691 if ( *mmgArgv[i] !=
'-' ) {
702 fprintf(stdout,
"Argument %s ignored\n",mmgArgv[i]);
709 fprintf(stdout,
"Argument %s ignored\n",mmgArgv[i]);
726 fprintf(stdout,
"\n -- PRINT (0 10(advised) -10) ?\n");
734 fprintf(stdout,
"\n -- INPUT MESH NAME ?\n");
757 if (
tmp->namein == NULL ) {
770 int i,j,ret,npar,nbr,split;
771 MMG5_int ref,rin,rex,br;
772 char *ptr,buf[256],data[256];
786 if ( ptr ) *ptr =
'\0';
787 strcat(data,
".mmg3d");
789 in = fopen(data,
"rb");
792 strcat(data,
".mmg3d5");
793 in = fopen(data,
"rb");
795 sprintf(data,
"%s",
"DEFAULT.mmg3d");
796 in = fopen(data,
"rb");
798 sprintf(data,
"%s",
"DEFAULT.mmg3d5");
799 in = fopen(data,
"rb");
807 fprintf(stderr,
" ** In %s: %s file NOT FOUND. \n",__func__,data);
808 fprintf(stdout,
" ## ERROR: UNABLE TO LOAD PARAMETER FILE.\n");
813 fprintf(stdout,
"\n %%%% %s OPENED\n",data);
816 while ( !feof(in) ) {
818 ret = fscanf(in,
"%255s",data);
819 if ( !ret || feof(in) )
break;
820 for (i=0; i<strlen(data); i++) data[i] = tolower(data[i]);
823 if ( !strcmp(data,
"lsreferences") ) {
824 ret = fscanf(in,
"%d",&npar);
826 fprintf(stderr,
" %%%% Wrong format for lsreferences: %d\n",npar);
835 fgetpos(in,&position);
839 if ( strcmp(data,
"nosplit") ) {
840 fsetpos(in,&position);
851 else if ( !strcmp(data,
"parameters") ) {
852 ret = fscanf(in,
"%d",&npar);
855 fprintf(stderr,
" %%%% Wrong format for parameters: %d\n",npar);
864 ret = fscanf(in,
"%" MMG5_PRId
" %255s ",&ref,buf);
866 ret = fscanf(in,
"%f %f %f",&fp1,&fp2,&hausd);
869 fprintf(stderr,
" %%%% Wrong format: %s\n",buf);
873 for (j=0; j<strlen(buf); j++) buf[j] = tolower(buf[j]);
875 if ( (!strcmp(buf,
"triangles") || !strcmp(buf,
"triangle")) ) {
880 else if ( !strcmp(buf,
"tetrahedra") || !strcmp(buf,
"tetrahedron") ) {
886 fprintf(stderr,
" %%%% Wrong format: %s\n",buf);
891 else if ( !strcmp(data,
"lsbasereferences") ) {
922 MMG5_int ref,*adja,j,k,iel;
937 fprintf(stderr,
"\n ## Error: %s: unable to create "
938 "adjacency table.\n",__func__);
946 fprintf(stderr,
"\n ## Error: %s: Prism hashing problem.\n",__func__);
956 fprintf(stderr,
"\n ## Error: %s: Boundary orientation problem.\n",__func__);
961 fprintf(stderr,
"\n ## Error: %s: Boundary problem.\n",__func__);
970 fprintf(stderr,
"\n ## Error: %s: Hashing problem.\n",__func__);
976 fprintf(stderr,
"\n ## Error: %s: Topology problem.\n",__func__);
984 fprintf(stderr,
"\n ## Error: %s: Boundary problem.\n",__func__);
991 for ( k=1; k<=
mesh->
ne; k++ ) {
993 if ( !
MG_EOK(pt) )
continue;
997 for ( i=0; i<4; i++ ) {
1003 if ( (!iel) || (pt->
ref != pt1->
ref) ||
1017 if ( !
MG_EOK(pp) )
continue;
1021 for ( i=0; i<2; i++ ) {
1030 if ( (!iel) || (pp->
ref != ref) ||
1043 if ( !(*nb_tria) ) {
1050 printf(
" Exit program.\n");
1054 MMG5_Tria,
"non bdy tria arrray",
return 0);
1058 printf(
" Exit program.\n");
1062 MMG5_Tria,
"non bdy tria arrray",
return 0);
1066 for ( k=1; k<=
mesh->
ne; k++ ) {
1068 if ( !
MG_EOK(pt) )
continue;
1072 for ( i=0; i<4; i++ ) {
1074 assert ( iel != k );
1078 if ( (!iel) || (pt->
ref != pt1->
ref) ||
1098 if ( !
MG_EOK(pp) )
continue;
1102 for ( i=0; i<2; i++ ) {
1110 if ( (!iel) || (pp->
ref != ref) ||
1132 MMG5_int* ref,MMG5_int idx) {
1138 fprintf(stderr,
"\n ## Error: %s: triangle array is not allocated.\n"
1139 " Please, call the MMG3D_Get_numberOfNonBdyTriangles function"
1140 " before the %s one.\n",
1145 ptr_c = ptr_c-
sizeof(size_t);
1146 nt_tot = *((
size_t*)ptr_c);
1148 if (
mesh->
nt==(MMG5_int)nt_tot ) {
1149 fprintf(stderr,
"\n ## Error: %s: no internal triangle.\n"
1150 " Please, call the MMG3D_Get_numberOfNonBdyTriangles function"
1151 " before the %s one and check that the number of internal"
1152 " triangles is non null.\n",
1157 if (
mesh->
nt+idx > (MMG5_int)nt_tot ) {
1158 fprintf(stderr,
"\n ## Error: %s: Can't get the internal triangle of index %" MMG5_PRId
"."
1159 " Index must be between 1 and %zu.\n",
1160 __func__,idx,nt_tot-(
size_t)
mesh->
nt);
1170 if ( ref != NULL ) {
1197 double lmax, MMG5_int *eltab,int8_t metRidTyp) {
1221 fprintf(stderr,
"\n ## Error: lagrangian mode unavailable (MMG3D_IPARAM_lag):\n"
1222 " You must call the MMG3D_mmg3dmov function to move a rigidbody.\n");
1226 fprintf(stderr,
"\n ## Error: level-set discretisation unavailable"
1227 " (MMG3D_IPARAM_iso):\n"
1228 " You must call the MMG3D_mmg3dmov function to use this option.\n");
1236 if (
mesh->
info.
imprim > 0 ) fprintf(stdout,
"\n -- MMG3DLIB: INPUT DATA\n");
1243 fprintf(stdout,
" ## WARNING: WRONG SOLUTION NUMBER. IGNORED\n");
1247 else if ( met->
size!=1 && met->
size!=6 ) {
1248 fprintf(stderr,
"\n ## ERROR: WRONG DATA TYPE.\n");
1254 fprintf(stdout,
" ## WARNING: WRONG SOLUTION NUMBER. IGNORED\n");
1258 else if (
sol->size!=1 &&
sol->size!=6 ) {
1259 fprintf(stderr,
"\n ## ERROR: WRONG DATA TYPE.\n");
1267 fprintf(stdout,
" -- INPUT DATA COMPLETED. %s\n",stim);
1276 fprintf(stdout,
"\n %s\n MODULE MMG3D: IMB-LJLL : %s (%s)\n %s\n",
1278 fprintf(stdout,
"\n -- PHASE 1 : ANALYSIS\n");
1303 for (k=1; k<=
mesh->
ne; k++) {
1309 if ( (!metRidTyp) && met->
m && met->
size>1 ) {
1316 if ( rap == 0.0 || rap < critmin ) {
1329 fprintf(stderr,
" ## Error: %s: the main fonction of the Mmg library must be"
1330 " called before this function.\n",__func__);
1347 MMG5_int ia0,ib0,ic0,ia1,ib1,ic1;
1350 ktet[0] = ktet[1] = 0;
1351 iface[0] = iface[1] = 0;
1355 if ( !
ier )
return 0;
1362 itet =
mesh->
adja[4*(*ktet-1) + *iface + 1 ];
1377 assert ( ( (ia0 == ia1) && ((ib0 == ic1) && (ic0 == ib1 )) ) ||
1378 ( (ia0 == ib1) && ((ib0 == ia1) && (ic0 == ic1 )) ) ||
1379 ( (ia0 == ic1) && ((ib0 == ib1) && (ic0 == ia1 )) ) );
1388 double lmax, MMG5_int *eltab,int8_t metRidTyp) {
1393 int8_t ia,i0,i1,
ier;
1398 for(k=1; k<=
mesh->
ne; k++) {
1400 if ( !
MG_EOK(pt) )
continue;
1402 for(ia=0; ia<6; ia++) {
1409 fprintf(stderr,
"\n ## Error: %s: function MMG5_hashEdge return 0\n",
1417 for(k=1; k<=
mesh->
ne; k++) {
1419 if ( !
MG_EOK(pt) )
continue;
1421 for(ia=0; ia<6; ia++) {
1430 if ( (!metRidTyp) && met->
m && met->
size>1 ) {
1434 len = MMG5_lenedg(
mesh,met,ia,pt);
1443 if( (len < lmin) || (len > lmax) ) {
1477 for (k=1; k<=
mesh->
np; k++) {
1483 for (k=1; k<=
mesh->
ne; k++) {
1485 if ( !
MG_EOK(pt) )
continue;
1487 for (i=0; i<4; i++) {
1526 if ( met->
size!=1 ) {
1527 fprintf(stderr,
"\n ## Error: %s: unexpected size of metric: %d.\n",
1528 __func__,met->
size);
1538 for (k=1; k<=
mesh->
ne; k++) {
1540 if ( !
MG_EOK(pt) )
continue;
1542 for (i=0; i<6; i++) {
1550 ux = p1->
c[0] - p2->
c[0];
1551 uy = p1->
c[1] - p2->
c[1];
1552 uz = p1->
c[2] - p2->
c[2];
1553 dd = sqrt(ux*ux + uy*uy + uz*uz);
1563 for (k=1; k<=
mesh->
np; k++) {
1568 met->
m[k] = met->
m[k] / (double)mark[k];
1592 double u[3],dd,tensordot[6];
1593 MMG5_int k,iadr,ipa,ipb;
1601 if ( met->
size!=6 ) {
1602 fprintf(stderr,
"\n ## Error: %s: unexpected size of metric: %d.\n",
1603 __func__,met->
size);
1613 for (k=1; k<=
mesh->
ne; k++) {
1615 if ( !
MG_EOK(pt) )
continue;
1617 for (i=0; i<6; i++) {
1623 u[0] = p1->
c[0] - p2->
c[0];
1624 u[1] = p1->
c[1] - p2->
c[1];
1625 u[2] = p1->
c[2] - p2->
c[2];
1627 tensordot[0] = u[0]*u[0];
1628 tensordot[1] = u[0]*u[1];
1629 tensordot[2] = u[0]*u[2];
1630 tensordot[3] = u[1]*u[1];
1631 tensordot[4] = u[1]*u[2];
1632 tensordot[5] = u[2]*u[2];
1635 for ( j=0; j<6; ++j ) {
1636 met->
m[iadr+j] += tensordot[j];
1641 for ( j=0; j<6; ++j ) {
1642 met->
m[iadr+j] += tensordot[j];
1648 for (k=1; k<=
mesh->
np; k++) {
1660 fprintf(stdout,
" ## Warning: %s: %d: non invertible matrix."
1661 " Impose hmax size at point\n",__func__,__LINE__);
1662 met->
m[iadr+0] = FLT_MIN;
1665 met->
m[iadr+3] = FLT_MIN;
1667 met->
m[iadr+5] = FLT_MIN;
1671 dd = (double)mark[k]/3.;
1673 for ( j=0; j<6; ++j ) {
1674 met->
m[iadr+j] = dd*tensordot[j];
1679 double lambda[3],vp[3][3];
1681 fprintf(stdout,
" ## Warning: %s: %d: non diagonalizable metric.",
1685 assert ( lambda[0] > 0. && lambda[1] > 0. && lambda[2] > 0.
1686 &&
"Negative eigenvalue" );
1687 assert ( isfinite(lambda[0]) && isfinite(lambda[1]) && isfinite(lambda[2])
1688 &&
"Infinite eigenvalue" );
1731 if ( met->
size!=6 ) {
return 1; }
1733 for ( k=1; k<=met->
np; ++k ) {
1735 tmp = met->
m[6*k+2];
1737 met->
m[6*k+2] = met->
m[6*k+3];
1738 met->
m[6*k+3] =
tmp;
1805 if ( ptt != ptt1 ) {
1813 if ( ptt->
ref < 0 ) {
1818 while ( ++k < mesh->nt );
1832 fprintf(stdout,
" Deleted iso triangles: %" MMG5_PRId
"\n",nt-
mesh->
nt);
1838 else if (
mesh->
nt < nt ) {
1840 fprintf(stderr,
" Exit program.\n");
1843 "triangles",
return 0);
int MMG5_Compute_constantSize(MMG5_pMesh mesh, MMG5_pSol met, double *hsiz)
void MMG5_Set_constantSize(MMG5_pMesh mesh, MMG5_pSol met, double hsiz)
char * MMG5_Get_filenameExt(char *filename)
int MMG3D_Set_inputMeshName(MMG5_pMesh mesh, const char *meshin)
Set the name of input mesh.
int MMG3D_Set_inputParamName(MMG5_pMesh mesh, const char *fparamin)
Set the name of the input parameter file.
int MMG3D_Set_dparameter(MMG5_pMesh mesh, MMG5_pSol sol, int dparam, double val)
set a real-valued parameter of the remesher
int MMG3D_Set_localParameter(MMG5_pMesh mesh, MMG5_pSol sol, int typ, MMG5_int ref, double hmin, double hmax, double hausd)
set a local parameter
int MMG3D_Set_lsBaseReference(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_int br)
Set a new level-set base reference.
int MMG3D_Set_inputSolName(MMG5_pMesh mesh, MMG5_pSol sol, const char *solin)
Set the name of input solution file.
int MMG3D_Set_multiMat(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_int ref, int split, MMG5_int rmin, MMG5_int rplus)
Set the reference mapping for the elements of reference ref in level-set discretization mode.
int MMG3D_Set_outputSolName(MMG5_pMesh mesh, MMG5_pSol sol, const char *solout)
Set the name of the output solution file.
int MMG3D_Set_outputMeshName(MMG5_pMesh mesh, const char *meshout)
Set the name of output mesh file.
int MMG3D_Set_iparameter(MMG5_pMesh mesh, MMG5_pSol sol, int iparam, MMG5_int val)
set an integer parameter of the remesher
int MMG3D_Set_solSize(MMG5_pMesh mesh, MMG5_pSol sol, int typEntity, MMG5_int np, int typSol)
Initialize a solution field.
MMG5_pMesh MMG5_pSol * sol
if(!ier) exit(EXIT_FAILURE)
int MMG3D_PROctreein_iso(MMG5_pMesh mesh, MMG5_pSol sol, MMG3D_pPROctree PROctree, MMG5_int ip, double lmax)
int MMG3D_PROctreein_ani(MMG5_pMesh mesh, MMG5_pSol sol, MMG3D_pPROctree PROctree, MMG5_int ip, double lmax)
int MMG5_setadj(MMG5_pMesh mesh)
int MMG5_movbdynompt_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree, int64_t *listv, int ilistv, MMG5_int *lists, int ilists, int improve)
int MMG5_movbdyregpt_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree, int64_t *listv, int ilistv, MMG5_int *lists, int ilists, int improveSurf, int improveVol)
int MMG5_movbdyrefpt_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree, int64_t *listv, int ilistv, MMG5_int *lists, int ilists, int improve)
int MMG5_movintpt_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree, int64_t *list, int ilist, int improve)
int MMG5_movbdyridpt_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree, int64_t *listv, int ilistv, MMG5_int *lists, int ilists, int improve)
int MMG5_compute_meanMetricAtMarkedPoints_ani(MMG5_pMesh mesh, MMG5_pSol met)
int MMG3D_gradsiz_ani(MMG5_pMesh mesh, MMG5_pSol met)
int MMG3D_defsiz_ani(MMG5_pMesh mesh, MMG5_pSol met)
int MMG3D_gradsizreq_ani(MMG5_pMesh mesh, MMG5_pSol met)
void tminit(mytime *t, int maxtim)
Initialize mytime object.
void printim(double elps, char *stim)
Print real time.
void chrono(int cmode, mytime *ptt)
Function to measure time.
int MMG5_cavity_iso(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_int iel, int ip, int64_t *list, int lon, double volmin)
int MMG5_cavity_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int iel, int ip, int64_t *list, int lon, double volmin)
int MMG5_eigenv3d(int symmat, double *mat, double lambda[3], double v[3][3])
Find eigenvalues and vectors of a 3x3 matrix.
int MMG5_hashNew(MMG5_pMesh mesh, MMG5_Hash *hash, MMG5_int hsiz, MMG5_int hmax)
int MMG5_hashEdge(MMG5_pMesh mesh, MMG5_Hash *hash, MMG5_int a, MMG5_int b, MMG5_int k)
int MMG3D_hashTetra(MMG5_pMesh mesh, int pack)
Create array of adjacency.
int MMG3D_hashPrism(MMG5_pMesh mesh)
int MMG5_chkBdryTria(MMG5_pMesh mesh)
int MMG5_bdrySet(MMG5_pMesh mesh)
int MMG3D_hashTria(MMG5_pMesh mesh, MMG5_Hash *hash)
int MMG5_hashPop(MMG5_Hash *hash, MMG5_int a, MMG5_int b)
int MMG5_bdryPerm(MMG5_pMesh mesh)
static double MMG5_caltet_iso(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTetra pt)
static double MMG5_caltet_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTetra pt)
static double MMG5_lenedg_iso(MMG5_pMesh mesh, MMG5_pSol met, int ia, MMG5_pTetra pt)
static double MMG5_lenedg33_ani(MMG5_pMesh mesh, MMG5_pSol met, int ia, MMG5_pTetra pt)
static double MMG3D_caltetLES_iso(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTetra pt)
static double MMG5_lenedg_ani(MMG5_pMesh mesh, MMG5_pSol met, int ia, MMG5_pTetra pt)
static double MMG5_lenedgCoor_ani(double *ca, double *cb, double *sa, double *sb)
inlined Functions
static double MMG5_lenSurfEdg_iso(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int ip1, MMG5_int ip2, int8_t isedg)
static double MMG5_lenSurfEdg_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int np0, MMG5_int np1, int8_t isedg)
int MMG5_interp4bar_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int ip, double cb[4])
int MMG5_interp4bar_iso(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int ip, double cb[4])
int MMG5_intmet_iso(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, int8_t i, MMG5_int ip, double s)
int MMG5_intmet_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, int8_t i, MMG5_int ip, double s)
int MMG5_compute_meanMetricAtMarkedPoints_iso(MMG5_pMesh mesh, MMG5_pSol met)
double MMG5_lenedgCoor_iso(double *ca, double *cb, double *ma, double *mb)
Compute edge length from edge's coordinates.
int MMG3D_gradsizreq_iso(MMG5_pMesh mesh, MMG5_pSol met)
int MMG3D_gradsiz_iso(MMG5_pMesh mesh, MMG5_pSol met)
int MMG3D_defsiz_iso(MMG5_pMesh mesh, MMG5_pSol met)
void MMG3D_Free_topoTables(MMG5_pMesh mesh)
void MMG3D_Set_commonFunc(void)
API headers and documentation for the mmg3d library, for volumetric meshes in 3D.
LIBMMG3D_EXPORT double(* MMG3D_lenedgCoor)(double *ca, double *cb, double *sa, double *sb)
Compute the length of an edge according to the size prescription.
LIBMMG3D_EXPORT int(* MMG3D_doSol)(MMG5_pMesh mesh, MMG5_pSol met)
Compute isotropic size map according to the mean of the length of the edges passing through a vertex.
@ MMG3D_IPARAM_numberOfLocalParam
@ MMG3D_DPARAM_angleDetection
@ MMG3D_IPARAM_numsubdomain
@ MMG3D_IPARAM_numberOfMat
@ MMG3D_IPARAM_numberOfLSBaseReferences
int MMG5_movbdyregpt_iso(MMG5_pMesh, MMG5_pSol, MMG3D_pPROctree, int64_t *, int, MMG5_int *, int, int, int)
void MMG5_freeXPrisms(MMG5_pMesh mesh)
void MMG5_freeXTets(MMG5_pMesh mesh)
double MMG5_caltet33_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTetra pt)
static const uint8_t MMG5_iare[6][2]
vertices of extremities of the edges of the tetra
int MMG5_movbdyrefpt_iso(MMG5_pMesh, MMG5_pSol, MMG3D_pPROctree, int64_t *, int, MMG5_int *, int, int)
int MMG5_movintpt_iso(MMG5_pMesh, MMG5_pSol, MMG3D_pPROctree, int64_t *, int, int)
static const uint8_t MMG5_idir_pr[5][4]
idir[i]: vertices of face i for a prism
int MMG5_movbdyridpt_iso(MMG5_pMesh, MMG5_pSol, MMG3D_pPROctree, int64_t *, int, MMG5_int *, int, int)
int MMG3D_memOption(MMG5_pMesh mesh)
static const uint8_t MMG5_idir[4][3]
idir[i]: vertices of face opposite to vertex i
int MMG5_movbdynompt_iso(MMG5_pMesh, MMG5_pSol, MMG3D_pPROctree, int64_t *, int, MMG5_int *, int, int)
static void MMG5_warnOrientation(MMG5_pMesh mesh)
#define MMG_ARGV_APPEND(fromV, toV, fromC, toC, on_failure)
LIBMMG_CORE_EXPORT int MMG5_Clean_isoEdges(MMG5_pMesh mesh)
LIBMMG_CORE_EXPORT int MMG5_scaleMesh(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol ls)
#define MMG5_STRONGFAILURE
#define MMG5_MMAT_NoSplit
#define MMG5_SAFE_CALLOC(ptr, size, type, law)
int MMG5_3dSolTruncature_ani(MMG5_pMesh mesh, MMG5_pSol met)
#define _LIBMMG5_RETURN(mesh, sol, met, val)
double MMG5_caltri_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTria ptt)
static void MMG5_excfun(int sigid)
#define MMG5_ADD_MEM(mesh, size, message, law)
static void MMG5_warnScotch(MMG5_pMesh mesh)
int MMG5_solTruncature_iso(MMG5_pMesh mesh, MMG5_pSol met)
#define MMG5_SAFE_MALLOC(ptr, size, type, law)
#define MMG5_FILESTR_LGTH
double MMG5_caltri_iso(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTria ptt)
#define MMG5_SAFE_FREE(ptr)
#define MMG_FSCANF(stream, format,...)
#define MMG5_DEL_MEM(mesh, ptr)
int MMG5_invmat(double *m, double *mi)
#define MMG5_SAFE_RECALLOC(ptr, prevSize, newSize, type, message, law)
Identic as MMG5_HGeom but use MMG5_hedge to store edges instead of MMG5_hgeom (memory economy).
Structure to store input parameters of the job.
Structure to store vertices of an MMG mesh.
Structure to store prsim of a MMG mesh.
Structure to store tetrahedra of an MMG mesh.
Structure to store triangles of a MMG mesh.