60 int16_t tag,MMG5_int nmref,MMG5_int edgref,
61 double no1[3],
double no2[3],
double to[3]) {
72 memcpy(pxp->
n1,no1,3*
sizeof(
double));
73 memcpy(ppt->
n,to,3*
sizeof(
double));
77 memcpy(pxp->
n1,no1,3*
sizeof(
double));
78 memcpy(pxp->
n2,no2,3*
sizeof(
double));
79 memcpy(ppt->
n,to,3*
sizeof(
double));
83 memcpy(pxp->
n1,no1,3*
sizeof(
double));
84 memcpy(ppt->
n,to,3*
sizeof(
double));
88 memcpy(pxp->
n1,no1,3*
sizeof(
double));
107 assert ( 0<=ie && ie<4 &&
"unexpected local face idx");
117 for (i=0; i<3; i++) {
123 for (i=0; i<3; i++) {
143 double o[6][3],p[6][3];
153 for (i=0; i<6; i++) {
154 memset(p[i],0,3*
sizeof(
double));
155 memset(o[i],0,3*
sizeof(
double));
162 o[i][0] = 0.5 * (pa->
c[0] + pb->
c[0]);
163 o[i][1] = 0.5 * (pa->
c[1] + pb->
c[1]);
164 o[i][2] = 0.5 * (pa->
c[2] + pb->
c[2]);
177 for (i=0; i<6; i++) {
180 ps->
c[0] = o[i][0] + t*(p[i][0] - o[i][0]);
181 ps->
c[1] = o[i][1] + t*(p[i][1] - o[i][1]);
182 ps->
c[2] = o[i][2] + t*(p[i][2] - o[i][2]);
186 case 1:
case 2:
case 4:
case 8:
case 16:
case 32:
189 case 48:
case 24:
case 40:
case 6:
case 34:
case 36:
190 case 20:
case 5:
case 17:
case 9:
case 3:
case 10:
193 case 33:
case 18:
case 12:
196 case 11:
case 21:
case 38:
case 56:
199 case 7:
case 25:
case 42:
case 52:
202 case 35:
case 19:
case 13:
case 37:
case 22:
case 28:
case 26:
203 case 14:
case 49:
case 50:
case 44:
case 41:
206 case 23:
case 29:
case 53:
case 60:
case 57:
case 58:
207 case 27:
case 15:
case 43:
case 39:
case 54:
case 46:
210 case 30:
case 45:
case 51:
213 case 62:
case 61:
case 59:
case 55:
case 47:
case 31:
225 while ( ++it < maxit );
229 for (i=0; i<6; i++) {
232 ps->
c[0] = o[i][0] + t*(p[i][0] - o[i][0]);
233 ps->
c[1] = o[i][1] + t*(p[i][1] - o[i][1]);
234 ps->
c[2] = o[i][2] + t*(p[i][2] - o[i][2]);
241 case 1:
case 2:
case 4:
case 8:
case 16:
case 32:
244 case 48:
case 24:
case 40:
case 6:
case 34:
case 36:
245 case 20:
case 5:
case 17:
case 9:
case 3:
case 10:
248 case 33:
case 18:
case 12:
251 case 11:
case 21:
case 38:
case 56:
254 case 7:
case 25:
case 42:
case 52:
257 case 35:
case 19:
case 13:
case 37:
case 22:
case 28:
case 26:
258 case 14:
case 49:
case 50:
case 44:
case 41:
261 case 23:
case 29:
case 53:
case 60:
case 57:
case 58:
262 case 27:
case 15:
case 43:
case 39:
case 54:
case 46:
265 case 30:
case 45:
case 51:
268 case 62:
case 61:
case 59:
case 55:
case 47:
case 31:
298 double m[3],o[3],tp,to,t;
317 m[0] = 0.5*(p0->
c[0] + p1->
c[0]);
318 m[1] = 0.5*(p0->
c[1] + p1->
c[1]);
319 m[2] = 0.5*(p0->
c[2] + p1->
c[2]);
327 ppt->
c[0] = m[0] + t*(o[0]-m[0]);
328 ppt->
c[1] = m[1] + t*(o[1]-m[1]);
329 ppt->
c[2] = m[2] + t*(o[2]-m[2]);
338 while ( ++it < maxit );
342 ppt->
c[0] = m[0] + t*(o[0]-m[0]);
343 ppt->
c[1] = m[1] + t*(o[1]-m[1]);
344 ppt->
c[2] = m[2] + t*(o[2]-m[2]);
364 double hausd,
int locPar) {
368 double n[3][3],t[3][3],nt[3],*n1,*n2,t1[3],t2[3];
369 double ps,ps2,ux,uy,uz,ll,il,alpha,dis,hma2;
372 static int8_t mmgWarn0 = 0, mmgWarn1 = 0;
385 for (i=0; i<3; i++) {
386 if (
MG_SIN(p[i]->tag) ) {
402 memcpy(&t[i],p[i]->n,3*
sizeof(
double));
407 if (
MG_EDG(p[i]->tag) ) {
408 memcpy(&t[i],p[i]->n,3*
sizeof(
double));
415 ps = pxp->
n1[0]*nt[0] + pxp->
n1[1]*nt[1] + pxp->
n1[2]*nt[2];
416 ps2 = pxp->
n2[0]*nt[0] + pxp->
n2[1]*nt[1] + pxp->
n2[2]*nt[2];
417 if ( fabs(ps) > fabs(ps2) )
418 memcpy(&n[i],pxp->
n1,3*
sizeof(
double));
420 memcpy(&n[i],pxp->
n2,3*
sizeof(
double));
423 memcpy(&n[i],pxp->
n1,3*
sizeof(
double));
428 for (i=0; i<3; i++) {
493 ux = p[i2]->
c[0] - p[i1]->
c[0];
494 uy = p[i2]->
c[1] - p[i1]->
c[1];
495 uz = p[i2]->
c[2] - p[i1]->
c[2];
496 ll = ux*ux + uy*uy + uz*uz;
498 else if ( ll > hma2 ) {
506 if (
MG_SIN(p[i1]->tag) ) {
514 fprintf(stderr,
"\n ## Warning: %s: a- at least 1 geometrical"
515 " problem: non consistency between point tag (%d) and"
516 " edge tag (%d).\n",__func__,p[i1]->tag,pt->
tag[i]);
521 memcpy(t1,t[i1],3*
sizeof(
double));
522 ps = t1[0]*ux + t1[1]*uy + t1[2]*uz;
529 if (
MG_SIN(p[i2]->tag) ) {
537 fprintf(stderr,
"\n ## Warning: %s: b- at least 1 geometrical"
538 " problem: non consistency between point tag (%d) and"
539 " edge tag (%d).\n",__func__,p[i2]->tag,pt->
tag[i]);
544 memcpy(t2,t[i2],3*
sizeof(
double));
545 ps = - ( t2[0]*ux + t2[1]*uy + t2[2]*uz );
567 ps = t1[0]*ux + t1[1]*uy + t1[2]*uz;
569 dis = alpha*alpha*fabs(1.0 - ps*ps);
570 if ( dis > hausd*hausd ) {
574 ps = -( t2[0]*ux + t2[1]*uy + t2[2]*uz );
576 dis = alpha*alpha*fabs(1.0 - ps*ps);
578 if ( dis > hausd*hausd ) {
601 int it,ilist,ret,maxit;
603 MMG5_int k,it1,it2,ns,nns;
610 for (k=1; k<=
mesh->
ne; k++) {
613 else if ( !pt->
xt )
continue;
616 for (i=0; i<4; i++) {
619 for (j=0; j<3; j++) {
628 if ( ret < 0 )
return -1;
630 if ( ilist <= 1 )
continue;
637 else if (
ier < 0 )
return -1;
646 while ( ++it < maxit && ns > 0 );
648 fprintf(stdout,
" %8" MMG5_PRId
" edge swapped\n",nns);
672 int ilist,it,maxit,
ier;
674 MMG5_int k,ns,nns,nconf;
682 for (k=1; k<=
mesh->
ne; k++) {
685 else if ( pt->
mark < testmark )
continue;
687 if ( pt->
qual > declic )
continue;
689 for (i=0; i<6; i++) {
693 if ( pxt->
edg[i] || pxt->
tag[i] )
continue;
697 if ( nconf<0 )
return -1;
701 else if (
ier < 0 )
return -1;
708 while ( ++it < maxit && ns > 0 );
710 fprintf(stdout,
" %8" MMG5_PRId
" edge swapped\n",nns);
733 double clickSurf,
double clickVol,
int moveVol,
int improveSurf,
734 int improveVolSurf,
int improveVol,
int maxit,MMG5_int testmark) {
740 int ier,ilists,ilistv,it,i;
741 MMG5_int k,lists[
MMG3D_LMAX+2],nm,nnm,ns,base;
746 fprintf(stdout,
" ** OPTIMIZING MESH\n");
749 for (k=1; k<=
mesh->
np; k++)
756 for (k=1; k<=
mesh->
ne; k++) {
759 else if ( pt->
mark < testmark )
continue;
762 for (i=0; i<4; i++) {
763 for (j=0; j<3; j++) {
771 if ( ppt->
flag == base )
continue;
778 assert( 0<=i && i<4 &&
"unexpected local face idx");
780 caltri = MMG5_caltri(
mesh,met,&tt);
782 if ( caltri >= clickSurf) {
797 assert( 0<=i0 && i0<4 &&
"unexpected local index for vertex");
799 if ( !ilistv )
continue;
804 if (
mesh->
adja[4*(k-1)+1+i] )
continue;
809 ier = MMG5_movbdynompt(
mesh,met,PROctree,listv,ilistv,lists,ilists,improveVolSurf);
816 if ( !
ier )
continue;
818 ier = MMG5_movbdyridpt(
mesh,met,PROctree,listv,ilistv,lists,ilists,improveVolSurf);
827 ier = MMG5_movbdyrefpt(
mesh,met,PROctree,listv,ilistv,lists,ilists,improveVolSurf);
847 ier = MMG5_movbdyregpt(
mesh,met,PROctree,listv,ilistv,
848 lists,ilists,improveSurf,improveVolSurf);
849 if (
ier < 0 )
return -1;
850 else if (
ier ) ns++;
853 else if ( moveVol && (pt->
qual < clickVol) ) {
854 assert( 0<=i0 && i0<4 &&
"unexpected local index for vertex");
856 if ( !ilistv )
continue;
857 ier = MMG5_movintpt(
mesh,met,PROctree,listv,ilistv,improveVol);
869 if (
mesh->
info.
ddebug ) fprintf(stdout,
" %8" MMG5_PRId
" moved, %" MMG5_PRId
" geometry\n",nm,ns);
871 while( ++it < maxit && nm > 0 );
874 fprintf(stdout,
" %8" MMG5_PRId
" vertices moved, %d iter.\n",nnm,it);
893 double ll,ux,uy,uz,hmi2;
895 MMG5_int base,k,nc,nnm,lists[
MMG3D_LMAX+2],refmin,refplus;
897 int l,kk,isloc,ifac1;
898 int16_t tag,isnm,isnmint;
905 for (k=1; k<=
mesh->
np; k++) {
910 for (k=1; k<=
mesh->
ne; k++) {
918 for (i=0; i<4; i++) {
921 for (j=0; j<3; j++) {
929 if ( p0->
flag == base ) {
937 int16_t tag = p0->
tag;
938 tag &= ~MG_OLDPARBDY;
939 if ( (tag > p1->
tag) || (tag &
MG_REQ) ) {
949 refmin = refplus = -1;
956 if ( p0->
tag > tag )
continue;
961 assert( 0<=ip && ip<4 &&
"unexpected local index for vertex");
965 if (
mesh->
adja[4*(k-1)+1+i] )
continue;
967 list,&ilist,lists,&ilists,&refmin,&refplus,p0->
tag &
MG_NOM) < 0 )
973 list,&ilist,lists,&ilists,p0->
tag &
MG_NOM) < 0 )
978 assert( 0<=ip && ip<4 &&
"unexpected local index for vertex");
985 ux = p1->
c[0] - p0->
c[0];
986 uy = p1->
c[1] - p0->
c[1];
987 uz = p1->
c[2] - p0->
c[2];
988 ll = ux*ux + uy*uy + uz*uz;
1007 for ( kk=0; kk<ilist; ++kk ) {
1009 if ( par->
ref == ptloc->
ref ) {
1021 for ( kk=0; kk<ilist; ++kk ) {
1023 if ( par->
ref == ptloc->
ref ) {
1041 for ( kk=0; kk<ilists; ++kk ) {
1043 ifac1 = lists[kk] % 4;
1058 for ( kk=0; kk<ilists; ++kk ) {
1060 ifac1 = lists[kk] % 4;
1074 else if ( typchk == 2 ) {
1077 if ( ll == 0 )
continue;
1089 if ( p0->
tag > tag )
continue;
1092 assert( 0<=ip && ip<4 &&
"unexpected local index for vertex");
1096 if (
mesh->
adja[4*(k-1)+1+i] )
continue;
1098 list,&ilist,lists,&ilists,&refmin,&refplus,p0->
tag &
MG_NOM) < 0 )
1104 list,&ilist,lists,&ilists,p0->
tag &
MG_NOM) < 0 )
1109 assert( 0<=ip && ip<4 &&
"unexpected local index for vertex");
1118 if ( p0->
tag > tag )
continue;
1122 if ( isnm && (!isnmint) ) {
1124 if (
mesh->
adja[4*(k-1)+1+i] )
continue;
1126 ilist =
MMG5_chkcol_bdy(
mesh,met,k,i,j,list,ilist,lists,ilists,refmin,refplus,typchk,isnm,isnmint);
1137 if (
ier < 0 )
return -1;
1143 else if (ilist < 0 )
return -1;
1154 fprintf(stdout,
" %8" MMG5_PRId
" vertices removed, %8" MMG5_PRId
" non manifold,\n",nc,nnm);
1182 int8_t imin,
double lmin,MMG5_int* nc) {
1205 MMG3D_find_bdyface_from_edge(
mesh,pt,imin,&i,&j,&i1,&i2,&ip1,&ip2,&p0,&p1);
1208 int16_t tag0 = p0->
tag;
1209 tag0 &= ~MG_OLDPARBDY;
1210 if ( (tag0 > p1->
tag) || (tag0 &
MG_REQ) ) {
1224 tag &= ~MG_OLDPARBDY;
1237 ilist =
MMG5_chkcol_bdy(
mesh,met,k,i,j,list,ilist,lists,ilists,0,0,2,0,0);
1263 if ( PROctree && (*PROctree) ) {
1271 else if (ilist < 0 ) {
1296 for (k=1; k<=
mesh->
ne; k++) {
1300 memset(vx,0,6*
sizeof(MMG5_int));
1301 for (ia=0,i=0; i<3; i++) {
1302 for (j=i+1; j<4; j++,ia++) {
1308 fprintf(stderr,
"\n ## Error: %s: unable to delete point idx"
1309 " along edge %" MMG5_PRId
" %" MMG5_PRId
".\n", __func__,
1339 double ll,o[3],ux,uy,uz,hma2,mincal;
1341 MMG5_int src,vx[6],ip,ip1,ip2,k,ne,ns,nap;
1346 memlack = ns = nap = 0;
1349 for (k=1; k<=
mesh->
ne; k++) {
1351 if ( !
MG_EOK(pt) )
continue;
1355 for (i=0; i<6; i++) {
1364 if ( !pt->
xt )
continue;
1367 for (i=0; i<4; i++) {
1369 for (j=0; j<3; j++) {
1381 for (k=1; k<=
mesh->
ne; k++) {
1383 if ( !
MG_EOK(pt) )
continue;
1385 for (i=0; i<6; i++) {
1403 ux = p2->
c[0] - p1->
c[0];
1404 uy = p2->
c[1] - p1->
c[1];
1405 uz = p2->
c[2] - p1->
c[2];
1406 ll = ux*ux + uy*uy + uz*uz;
1419 if ( par->
ref != pt->
ref )
continue;
1431 else if ( typchk == 2 ) {
1432 ll = MMG5_lenedg(
mesh,met,i,pt);
1434 if ( ll == 0 )
continue;
1441 if ( ip < 0 )
continue;
1444 o[0] = 0.5 * (p1->
c[0]+p2->
c[0]);
1445 o[1] = 0.5 * (p1->
c[1]+p2->
c[1]);
1446 o[2] = 0.5 * (p1->
c[2]+p2->
c[2]);
1458 fprintf(stderr,
"\n ## Warning: %s: unable to"
1459 " allocate a new point\n",__func__);
1468 if ( typchk == 1 && (met->
size>1) )
1471 ier = MMG5_intmet(
mesh,met,k,i,ip,0.5);
1477 else if (
ier < 0 ) {
1502 fprintf(stderr,
"\n ## Warning: %s: too bad quality for the worst element."
1503 " Volumic patterns skipped.\n",__func__);
1512 for (k=1; k<=ne; k++) {
1515 memset(vx,0,6*
sizeof(MMG5_int));
1517 for (ia=0,i=0; i<3; i++) {
1518 for (j=i+1; j<4; j++,ia++) {
1526 case 1:
case 2:
case 4:
case 8:
case 16:
case 32:
1530 case 48:
case 24:
case 40:
case 6:
case 34:
case 36:
1531 case 20:
case 5:
case 17:
case 9:
case 3:
case 10:
1536 case 33:
case 18:
case 12:
1541 case 11:
case 21:
case 38:
case 56:
1546 case 7:
case 25:
case 42:
case 52:
1551 case 35:
case 19:
case 13:
case 37:
case 22:
case 28:
case 26:
1552 case 14:
case 49:
case 50:
case 44:
case 41:
1557 case 23:
case 29:
case 53:
case 60:
case 57:
case 58:
1558 case 27:
case 15:
case 43:
case 39:
case 54:
case 46:
1564 case 30:
case 45:
case 51:
1569 case 62:
case 61:
case 59:
case 55:
case 47:
case 31:
1582 fprintf(stdout,
" %7" MMG5_PRId
" splitted\n",nap);
1585 if ( memlack )
return -1;
1604 dd = no[0]*pxp->
n1[0]+no[1]*pxp->
n1[1]+no[2]*pxp->
n1[2];
1607 memcpy(pxp->
n2,no,3*
sizeof(
double));
1610 to[0] = pxp->
n1[1]*pxp->
n2[2] - pxp->
n1[2]*pxp->
n2[1];
1611 to[1] = pxp->
n1[2]*pxp->
n2[0] - pxp->
n1[0]*pxp->
n2[2];
1612 to[2] = pxp->
n1[0]*pxp->
n2[1] - pxp->
n1[1]*pxp->
n2[0];
1613 dd = to[0]*to[0] + to[1]*to[1] + to[2]*to[2];
1615 dd = 1.0 / sqrt(dd);
1619 memcpy(ppt->
n,to,3*
sizeof(
double));
1623 if ( to[0]*to[0]+to[1]*to[1]+to[2]*to[2] >
MMG5_EPSD2 ) {
1630 assert ( ppt->
n[0]*ppt->
n[0]+ppt->
n[1]*ppt->
n[1]+ppt->
n[2]*ppt->
n[2] >
MMG5_EPSD2 );
1655 double no1[3],
double no2[3],
double to[3] ) {
1659 static int8_t warn_n = 0;
1661 assert ( 0<=i && i<4 &&
"unexpected local idx for face" );
1662 assert ( 0<=j && j<3 &&
"unexpected local edg odx in face" );
1664 assert( 0<=i && i<4 &&
"unexpected local face idx");
1668 assert (
mesh->
tetra[k].
xt &&
"Tetra is not boundary" );
1671 assert ( (pxt->
ftag[i] &
MG_BDY) &&
"Face is not boundary" );
1672 assert (
MG_GET(pxt->
ori,i) &&
"Wrong face orientation" );
1687 fprintf(stderr,
" ## Warning: %s: %d: error in the computation of normal"
1688 " at triangle.\n",__func__,__LINE__);
1690 no2[0] = to[1]*no1[2] - to[2]*no1[1];
1691 no2[1] = to[2]*no1[0] - to[0]*no1[2];
1692 no2[2] = to[0]*no1[1] - to[1]*no1[0];
1694 dd = no2[0]*no2[0] + no2[1]*no2[1] + no2[2]*no2[2];
1696 dd = 1.0 / sqrt(dd);
1706 to[0] = no1[1]*no2[2] - no1[2]*no2[1];
1707 to[1] = no1[2]*no2[0] - no1[0]*no2[2];
1708 to[2] = no1[0]*no2[1] - no1[1]*no2[0];
1709 dd = to[0]*to[0] + to[1]*to[1] + to[2]*to[2];
1711 dd = 1.0 / sqrt(dd);
1751 int8_t imax,int8_t i, int8_t j,
1753 MMG5_int ip1,MMG5_int ip2,
1755 MMG5_int *ref,int16_t *tag,
1756 double o[3],
double to[3],
double no1[3],
1757 double no2[3],int64_t *list,
int *ilist) {
1772 *ref = pxt->
edg[imax];
1773 *tag = pxt->
tag[imax];
1786 else if ( (*ilist) < 0 ) {
1799 assert( 0<=i && i<4 &&
"unexpected local face idx");
1804 else if ( (*tag) &
MG_GEO ) {
1817 else if ( (*tag) &
MG_REF ) {
1825 assert( 0<=i && i<4 &&
"unexpected local face idx");
1841 assert( 0<=i && i<4 &&
"unexpected local face idx");
1869 int8_t *i,int8_t *j,int8_t*i1,int8_t*i2,
1883 int16_t is_ifa0_bdy = (pxt->
ftag[ifa0] &
MG_BDY);
1884 int16_t is_ifa1_bdy = (pxt->
ftag[ifa1] &
MG_BDY);
1886 if ( is_ifa0_bdy && is_ifa1_bdy ) {
1888 int8_t ifa1_ori =
MG_GET(pxt->
ori,(*i));
1889 (*i) = ifa1_ori ? ifa1 : ifa0;
1891 else if ( is_ifa1_bdy ) {
1903 (*ip1) = pt->
v[*i1];
1904 (*ip2) = pt->
v[*i2];
1929 int8_t chkRidTet,
int *warn ) {
1931 double o[3],to[3],no1[3],no2[3];
1933 MMG5_int src,ip,ip1,ip2,ref;
1942 MMG3D_find_bdyface_from_edge(
mesh,pt,imax,&i,&j,&i1,&i2,&ip1,&ip2,&p0,&p1);
1944 ier =
MMG3D_build_bezierEdge(
mesh,k,imax,i,j,pxt,ip1,ip2,p0,p1,&ref,&tag,
1945 o,to,no1,no2,list,&ilist);
1976 if ( met && met->
m ) {
1977 if ( typchk == 1 && (met->
size>1) ) {
1981 ier = MMG5_intmet(
mesh,met,k,imax,ip,0.5);
2003 assert ( (
ier != -1) &&
"simbulgept failure" );
2007 if (
ier < 0 ||
ier == 2 ) {
2011 else if (
ier == 0 ) {
2018 fprintf(stderr,
"\n ## Error: %s: unable to split.\n",__func__);
2021 else if (
ier == 0 ||
ier == 2 ) {
2049 double len,hmax,hausd;
2055 if ( typchk == 1 ) {
2067 if ( par->
ref != pt->
ref )
continue;
2081 if ( par->
ref != ptt->
ref )
continue;
2093 if ( par->
ref != ptt->
ref )
continue;
2107 }
else if (
ier == 0 ) {
2113 for (j=0; j<3; j++){
2118 else if ( typchk == 2 ) {
2119 for (j=0; j<3; j++) {
2126 len = MMG5_lenedg(
mesh,met,ia,pt);
2128 assert( isfinite(len) && (len!=-len) );
2131 if ( len == 0 )
continue;
2159 MMG5_int ns,k,ip1,ip2;
2161 int8_t imax,j,i,i1,i2;
2163 assert ( met->
m && met->
size==6 );
2166 fprintf(stderr,
"\n ## Hashing problem. Exit program.\n");
2173 for (k=1; k<=
mesh->
ne; k++) {
2182 for (i=0; i<4; i++){
2189 assert( 0<=i && i<4 &&
"unexpected local face idx");
2198 for ( j=0; j<6; ++j ) {
2210 len = ux*ux + uy*uy + uz*uz;
2211 if ( len <= lmax) {
continue; }
2219 if ( !pt->
flag )
continue;
2223 if (
ier==-1 ) {
return -1; }
2224 else if ( !
ier ) {
continue; }
2225 else if (
ier==2 ) {
2261 double o[3],no[3],to[3],dd;
2263 MMG5_int ip,vx[6],src,nc,ns,ni,ne,k,ip1,ip2,nap,ixp1,ixp2;
2264 int8_t i,j,j2,ia,i1,i2,ifac,intnom;
2265 static double uv[3][2] = { {0.5,0.5}, {0.,0.5}, {0.5,0.} };
2266 static int8_t mmgWarn = 0, mmgWarn2 = 0;
2272 for (k=1; k<=
mesh->
ne; k++) {
2280 for (i=0; i<4; i++){
2284 if ( typchk == 1 ) {
2285 if ( !
MG_GET(pxt->
ori,i) ) {
continue; }
2289 assert( 0<=i && i<4 &&
"unexpected local face idx");
2294 if ( !pt->
flag )
continue;
2302 for (j=0; j<3; j++) {
2337 fprintf(stderr,
"\n ## Error: %s: unable to"
2338 " allocate a new point.\n",__func__);
2352 if ( typchk == 1 && (met->
size>1) )
2355 ier = MMG5_intmet(
mesh,met,k,ia,ip,0.5);
2359 fprintf(stderr,
"\n ## Error: %s: unable to interpolate at least"
2360 " 1 metric.\n",__func__);
2365 else if (
ier < 0 ) {
2385 if ( intnom ) pxp->
nnor = 1;
2386 else memcpy(pxp->
n1,no,3*
sizeof(
double));
2388 memcpy(ppt->
n,to,3*
sizeof(
double));
2403 assert( 0<=ifac && ifac<4 &&
"unexpected local face idx");
2444 for (k=1; k<=
mesh->
ne; k++) {
2450 for (i=0; i<4; i++) {
2454 assert( 0<=i && i<4 &&
"unexpected local face idx");
2458 for (j=0; j<3; j++) {
2468 if ( pt->
xt && (pxt->
tag[ia] &
MG_REQ) )
continue;
2476 assert ( ifac2 > i &&
"lower face is already processed" );
2498 else ier = MMG5_bezierCP(
mesh,&ptt,&pb,1);
2504 dd = no[0]*pxp->
n1[0]+no[1]*pxp->
n1[1]+no[2]*pxp->
n1[2];
2507 memcpy(pxp->
n2,no,3*
sizeof(
double));
2513 fprintf(stdout,
" %" MMG5_PRId
" added\n",nc);
2518 for (k=1; k<=
mesh->
np; k++)
2525 for (k=1; k<=
mesh->
ne; k++) {
2528 memset(vx,0,6*
sizeof(MMG5_int));
2530 for (ia=0,i=0; i<3; i++) {
2531 for (j=i+1; j<4; j++,ia++) {
2540 if ( !pt->
flag )
continue;
2543 case 1:
case 2:
case 4:
case 8:
case 16:
case 32:
2546 case 48:
case 24:
case 40:
case 6:
case 34:
case 36:
2547 case 20:
case 5:
case 17:
case 9:
case 3:
case 10:
2550 case 33:
case 18:
case 12:
2553 case 11:
case 21:
case 38:
case 56:
2556 case 7:
case 25:
case 42:
case 52:
2559 case 35:
case 19:
case 13:
case 37:
case 22:
case 28:
case 26:
2560 case 14:
case 49:
case 50:
case 44:
case 41:
2563 case 23:
case 29:
case 53:
case 60:
case 57:
case 58:
2564 case 27:
case 15:
case 43:
case 39:
case 54:
case 46:
2567 case 30:
case 45:
case 51:
2570 case 62:
case 61:
case 59:
case 55:
case 47:
case 31:
2577 if (
ier )
continue;
2581 for (ia=0; ia<6; ia++)
2585 for (ia=0; ia<6; ++ia ) {
2591 fprintf(stderr,
"\n ## Warning: %s: surfacic pattern: unable to find"
2592 " a valid split for at least 1 point. Point(s) deletion.\n",
2603 while( ni > 0 && ++it < 40 );
2606 fprintf(stdout,
" %" MMG5_PRId
" corrected, %" MMG5_PRId
" invalid\n",nc,ni);
2614 for (k=1; k<=ne; k++) {
2616 if ( !
MG_EOK(pt) || !pt->flag || (pt->tag &
MG_REQ) )
continue;
2617 memset(vx,0,6*
sizeof(MMG5_int));
2618 for (ia=0,i=0; i<3; i++) {
2619 for (j=i+1; j<4; j++,ia++) {
2620 if (
MG_GET(pt->flag,ia) ) {
2627 case 1:
case 2:
case 4:
case 8:
case 16:
case 32:
2631 case 48:
case 24:
case 40:
case 6:
case 34:
case 36:
2632 case 20:
case 5:
case 17:
case 9:
case 3:
case 10:
2637 case 33:
case 18:
case 12:
2642 case 11:
case 21:
case 38:
case 56:
2647 case 7:
case 25:
case 42:
case 52:
2652 case 35:
case 19:
case 13:
case 37:
case 22:
case 28:
case 26:
2653 case 14:
case 49:
case 50:
case 44:
case 41:
2658 case 23:
case 29:
case 53:
case 60:
case 57:
case 58:
2659 case 27:
case 15:
case 43:
case 39:
case 54:
case 46:
2665 case 30:
case 45:
case 51:
2670 case 62:
case 61:
case 59:
case 55:
case 47:
case 31:
2682 fprintf(stdout,
" %7" MMG5_PRId
" elements splitted\n",nap);
2713 int *ifac,
int* conf0,MMG5_int *adj,
int *conf1) {
2717 double calold0,calold,calnew,calnew0,calnew1,calnew2,calnew3;
2718 double worst_split4bar_cal,worst_swap_cal,cb[4];
2719 int loc_conf0,loc_conf1;
2720 MMG5_int *adja,k1,np;
2722 uint8_t tau0[4],tau1[4];
2738 for (i=0; i<4; i++) {
2740 ppt0->
c[0] += ppt->
c[0];
2741 ppt0->
c[1] += ppt->
c[1];
2742 ppt0->
c[2] += ppt->
c[2];
2748 cb[0] = 0.25; cb[1] = 0.25; cb[2] = 0.25; cb[3] = 0.25;
2751 if ( !metRidTyp && met->
size > 1 )
2754 MMG5_interp4bar(
mesh,met,k,0,cb);
2759 if ( (!metRidTyp) && met->
m && met->
size>1 )
2764 ptnew->
v[0] = pt->
v[0];
2766 if ( (!metRidTyp) && met->
m && met->
size>1 )
2771 ptnew->
v[1] = pt->
v[1];
2773 if ( (!metRidTyp) && met->
m && met->
size>1 )
2778 ptnew->
v[2] = pt->
v[2];
2780 if ( (!metRidTyp) && met->
m && met->
size>1 )
2788 worst_split4bar_cal = 0.;
2794 worst_swap_cal = 0.;
2796 for (j0=0; j0<4; j0++) {
2827 tau0[0] = 1; tau0[1] = 0; tau0[2] = 3; tau0[3] = 2;
2830 tau0[0] = 2; tau0[1] = 0; tau0[2] = 1; tau0[3] = 3;
2833 tau0[0] = 3; tau0[1] = 0; tau0[2] = 2; tau0[3] = 1;
2836 tau0[0] = 0; tau0[1] = 1; tau0[2] = 2; tau0[3] = 3;
2844 assert(pt->
ref == pt1->
ref);
2845 for ( i=0; i<3; ++i )
2853 tau1[0] = 0; tau1[1] = 2; tau1[2] = 3; tau1[3] = 1;
2856 tau1[0] = 0; tau1[1] = 3; tau1[2] = 1; tau1[3] = 2;
2859 tau1[0] = 1; tau1[1] = 0; tau1[2] = 3; tau1[3] = 2;
2862 tau1[0] = 1; tau1[1] = 3; tau1[2] = 2; tau1[3] = 0;
2865 tau1[0] = 1; tau1[1] = 2; tau1[2] = 0; tau1[3] = 3;
2868 tau1[0] = 2; tau1[1] = 0; tau1[2] = 1; tau1[3] = 3;
2871 tau1[0] = 2; tau1[1] = 1; tau1[2] = 3; tau1[3] = 0;
2874 tau1[0] = 2; tau1[1] = 3; tau1[2] = 0; tau1[3] = 1;
2877 tau1[0] = 3; tau1[1] = 0; tau1[2] = 2; tau1[3] = 1;
2880 tau1[0] = 3; tau1[1] = 2; tau1[2] = 1; tau1[3] = 0;
2883 tau1[0] = 3; tau1[1] = 1; tau1[2] = 0; tau1[3] = 2;
2886 tau1[0] = 0; tau1[1] = 1; tau1[2] = 2; tau1[3] = 3;
2894 if ( pxt1->
ftag[tau1[1]] ) ++nbdy;
2895 if ( pxt0->
ftag[tau0[1]] ) ++nbdy;
2896 if ( nbdy > 1 )
continue;
2899 if ( pxt1->
ftag[tau1[3]] ) ++nbdy;
2900 if ( pxt0->
ftag[tau0[2]] ) ++nbdy;
2901 if ( nbdy > 1 )
continue;
2904 if ( pxt1->
ftag[tau1[2]] ) ++nbdy;
2905 if ( pxt0->
ftag[tau0[3]] ) ++nbdy;
2906 if ( nbdy > 1 )
continue;
2915 np = pt1->
v[tau1[0]];
2917 ptnew->
v[tau0[1]] = np;
2918 if ( (!metRidTyp) && met->
m && met->
size>1 )
2924 ptnew->
v[tau0[1]] = pt->
v[tau0[1]];
2925 ptnew->
v[tau0[2]] = np;
2926 if ( (!metRidTyp) && met->
m && met->
size>1 )
2932 ptnew->
v[tau0[2]] = pt->
v[tau0[2]];
2933 ptnew->
v[tau0[3]] = np;
2934 if ( (!metRidTyp) && met->
m && met->
size>1 )
2943 if ( calnew < calold )
continue;
2947 if ( calnew > worst_swap_cal ) {
2948 worst_swap_cal = calnew;
2957 worst_swap_cal = 0.;
2961 if ( worst_split4bar_cal <
MMG5_EPSOK )
return 0;
2965 assert ( *adj > 0 );
2966 if ( worst_swap_cal < worst_split4bar_cal ) {
2967 if ( worst_split4bar_cal <
MMG5_EPSOK )
return 0;
2990 int conf0,conf1,ifac,id_op;
2991 MMG5_int
ier,ns,k,adj;
2994 static int8_t mmgWarn=0;
2998 for (k=1; k<=
mesh->
ne; k++) {
3015 printf(
"\n ## Warning: %s: unable to swap or split at least 1 tetra"
3016 " with multiple boundary faces.\n",__func__);
3025 if ( !
ier )
return -1;
3029 assert ( id_op==2 );
3036 else if (
ier ) ++(*nf);
3042 for (j=0; j<4; j++) {
3049 if ( !
ier )
return -1;
3057 fprintf(stdout,
" boundary elements: %7" MMG5_PRId
" splitted %7" MMG5_PRId
" swapped\n",ns,*nf);
3079 for (k=1; k<=
mesh->
ne; k++) {
3084 for (j=0; j<4; j++) {
3094 if ( !
ier )
return -1;
3100 fprintf(stdout,
" boundary elements: %7" MMG5_PRId
" splitted\n",ns);
3117 int it,minit,maxit,lastit;
3118 MMG5_int nc,ns,nnc,nns,nnf,
ier,nf;
3121 if ( met->
m && met->
size==6 ) {
3131 nns = nnc = nnf = it = 0;
3144 if (
ier < 0 )
return 0;
3146 else if ( (met->
size==6) && (typchk == 1) && lastit ) {
3148 if (
ier < 0 )
return 0;
3162 fprintf(stderr,
"\n ## Unable to complete surface mesh. Exit program.\n");
3167 if ( patternMode ) {
3173 fprintf(stderr,
"\n ## Unable to complete volume mesh. Exit program.\n");
3181 fprintf(stderr,
"\n ## Hashing problem. Exit program.\n");
3189 fprintf(stderr,
"\n ## Unable to collapse mesh. Exiting.\n");
3199 fprintf(stderr,
"\n ## Unable to improve mesh. Exiting.\n");
3206 fprintf(stderr,
"\n ## Unable to improve mesh. Exiting.\n");
3218 fprintf(stdout,
" ");
3220 fprintf(stdout,
" %8" MMG5_PRId
" splitted, %8" MMG5_PRId
" collapsed, %8" MMG5_PRId
" swapped\n",ns,nc,nf);
3223 if ( it > minit-1 && ( !(ns+nc) || (MMG5_abs(nc-ns) < 0.1 *
MG_MAX(nc,ns)) ) ) {
3225 if ( it > minit && lastit>2 )
break;
3227 else if ( it+2 >= maxit ) {
3231 else if ( lastit ) {
3238 while ( ++it < maxit && (ns+nc+nf > 0 || lastit<3) );
3243 fprintf(stdout,
" ");
3245 fprintf(stdout,
" %8" MMG5_PRId
" splitted, %8" MMG5_PRId
" collapsed, %8" MMG5_PRId
" swapped, %d iter.\n",nns,nnc,nnf,it);
int MMG3D_delPROctree(MMG5_pMesh mesh, MMG3D_pPROctree q, const int no)
int MMG3D_bezierInt(MMG5_pBezier pb, double uv[2], double o[3], double no[3], double to[3])
int MMG5_BezierTgt(double c1[3], double c2[3], double n1[3], double n2[3], double t1[3], double t2[3])
double MMG5_BezierGeod(double c1[3], double c2[3], double t1[3], double t2[3])
int MMG5_boulevolp(MMG5_pMesh mesh, MMG5_int start, int ip, int64_t *list)
int MMG5_boulesurfvolp(MMG5_pMesh mesh, MMG5_int start, int ip, int iface, int64_t *listv, int *ilistv, MMG5_int *lists, int *ilists, int isnm)
int MMG5_boulesurfvolpNom(MMG5_pMesh mesh, MMG5_int start, int ip, int iface, int64_t *listv, int *ilistv, MMG5_int *lists, int *ilists, MMG5_int *refmin, MMG5_int *refplus, int isnm)
int MMG5_coquilface(MMG5_pMesh mesh, MMG5_int start, int8_t iface, int ia, int64_t *list, MMG5_int *it1, MMG5_int *it2, int silent)
int MMG5_coquil(MMG5_pMesh mesh, MMG5_int start, int ia, int64_t *list, int8_t *isbdy)
MMG5_int MMG5_colver(MMG5_pMesh mesh, MMG5_pSol met, int64_t *list, int ilist, int8_t indq, int8_t typchk)
int MMG5_chkcol_int(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, int8_t iface, int8_t iedg, int64_t *list, int ilist, int8_t typchk)
int MMG5_chkcol_bdy(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, int8_t iface, int8_t iedg, int64_t *listv, int ilistv, MMG5_int *lists, int ilists, MMG5_int refmin, MMG5_int refplus, int8_t typchk, int isnm, int8_t isnmint)
int MMG5_hashUpdate(MMG5_Hash *hash, MMG5_int a, MMG5_int b, MMG5_int k)
int MMG5_hashNew(MMG5_pMesh mesh, MMG5_Hash *hash, MMG5_int hsiz, MMG5_int hmax)
MMG5_int MMG5_hashGet(MMG5_Hash *hash, MMG5_int a, MMG5_int b)
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)
int MMG5_hashPop(MMG5_Hash *hash, MMG5_int a, MMG5_int b)
static double MMG5_orcal(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int iel)
int MMG5_interp4bar33_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int ip, double cb[4])
int MMG3D_intmet33_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, int8_t i, MMG5_int ip, double s)
API headers for the mmg3d library.
MMG5_int MMG3D_newPt(MMG5_pMesh mesh, double c[3], int16_t tag, MMG5_int src)
int MMG5_split4op(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int vx[6], int8_t)
int MMG5_split3op(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int vx[6], int8_t)
int MMG5_split1b(MMG5_pMesh, MMG5_pSol, int64_t *, int, MMG5_int, int, int8_t, int8_t)
int MMG3D_split6_sim(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int vx[6])
MMG5_int MMG5_chkswpgen(MMG5_pMesh, MMG5_pSol, MMG5_int, int, int *, int64_t *, double, int8_t)
int MMG5_swpbdy(MMG5_pMesh, MMG5_pSol, int64_t *, int, MMG5_int, MMG3D_pPROctree, int8_t)
int MMG3D_split3_sim(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int vx[6])
int MMG5_BezierReg(MMG5_pMesh mesh, MMG5_int ip0, MMG5_int ip1, double s, double v[3], double *o, double *no)
MMG5_int MMG5_split4bar(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, int8_t)
int MMG5_split5(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int vx[6], int8_t)
int MMG3D_split3cone_sim(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int vx[6])
int MMG3D_normalAdjaTri(MMG5_pMesh, MMG5_int, int8_t, int, double n[3])
int MMG3D_simbulgept(MMG5_pMesh mesh, MMG5_pSol met, int64_t *list, int ilist, MMG5_int)
void MMG3D_delPt(MMG5_pMesh mesh, MMG5_int ip)
int MMG5_split1(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int vx[6], int8_t metRidTyp)
MMG5_int MMG3D_indPt(MMG5_pMesh mesh, MMG5_int kp)
int MMG5_split4sf(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int vx[6], int8_t)
static const int8_t MMG5_iarfinv[4][6]
num of the j^th edge in the i^th face
int MMG5_chkswpbdy(MMG5_pMesh, MMG5_pSol, int64_t *, int, MMG5_int, MMG5_int, int8_t)
int MMG3D_swap23(MMG5_pMesh, MMG5_pSol, MMG5_int, int8_t, int, int, MMG5_int, int)
int MMG5_split6(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int vx[6], int8_t)
int MMG3D_split2sf_sim(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int vx[6])
int MMG5_BezierRidge(MMG5_pMesh mesh, MMG5_int ip0, MMG5_int ip1, double s, double *o, double *no1, double *no2, double *to)
int MMG3D_split4op_sim(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int vx[6])
static const int8_t MMG5_iarf[4][3]
iarf[i]: edges of face opposite to vertex i
double MMG5_caltet33_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTetra pt)
int MMG5_swpgen(MMG5_pMesh, MMG5_pSol, MMG5_int, int, int64_t *, MMG3D_pPROctree, int8_t)
static const uint8_t MMG5_iare[6][2]
vertices of extremities of the edges of the tetra
int MMG3D_split1_sim(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int vx[6])
int MMG5_split2(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int vx[6], int8_t)
static const uint8_t MMG5_ifar[6][2]
ifar[i][]: faces sharing the ith edge of the tetra
int MMG5_BezierRef(MMG5_pMesh mesh, MMG5_int ip0, MMG5_int ip1, double s, double *o, double *no, double *to)
int MMG3D_split4sf_sim(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int vx[6])
int MMG5_split2sf(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int vx[6], int8_t)
#define MMG3D_POINT_REALLOC(mesh, sol, ip, wantedGap, law, o, tag, src)
int MMG5_split3cone(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int vx[6], int8_t)
int MMG5_movbdynomintpt_iso(MMG5_pMesh, MMG5_pSol, MMG3D_pPROctree, int64_t *, int, int)
int MMG3D_split5_sim(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int vx[6])
#define MMG3D_LSWAPIMPROVE
int MMG5_norface(MMG5_pMesh mesh, MMG5_int k, int iface, double v[3])
int MMG5_split3(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int vx[6], int8_t)
int MMG5_directsurfball(MMG5_pMesh mesh, MMG5_int ip, MMG5_int *list, int ilist, double n[3])
int MMG5_BezierNom(MMG5_pMesh mesh, MMG5_int ip0, MMG5_int ip1, double s, double *o, double *no, double *to)
int MMG3D_split3op_sim(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int vx[6])
static const uint8_t MMG5_idir[4][3]
idir[i]: vertices of face opposite to vertex i
int MMG3D_split2_sim(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int vx[6])
static int MMG3D_delPatternPts(MMG5_pMesh mesh, MMG5_Hash hash)
int MMG3D_normalAndTangent_at_sinRidge(MMG5_pMesh mesh, MMG5_int k, int i, int j, double no1[3], double no2[3], double to[3])
static MMG5_int MMG5_anatet4(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int *nf, int8_t typchk)
void MMG3D_set_geom(MMG5_pMesh mesh, MMG5_pPoint ppt, int16_t tag, MMG5_int nmref, MMG5_int edgref, double no1[3], double no2[3], double to[3])
MMG5_int MMG5_movtet(MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree, double clickSurf, double clickVol, int moveVol, int improveSurf, int improveVolSurf, int improveVol, int maxit, MMG5_int testmark)
static int MMG3D_anatet4_sim(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, int8_t metRidTyp, int *ifac, int *conf0, MMG5_int *adj, int *conf1)
int MMG3D_dichoto1b(MMG5_pMesh mesh, MMG5_pSol met, int64_t *list, int ret, MMG5_int ip)
MMG5_int MMG5_swpmsh(MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree, int typchk)
static int MMG3D_update_rid_geom(MMG5_pPoint ppt, MMG5_pxPoint pxp, double no[3])
int MMG5_anatet(MMG5_pMesh mesh, MMG5_pSol met, int8_t typchk, int patternMode)
static MMG5_int MMG5_anatet4rid(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int *nf, int8_t typchk)
static MMG5_int MMG3D_anatets_ani(MMG5_pMesh mesh, MMG5_pSol met, int8_t typchk)
int8_t MMG5_chkedg(MMG5_pMesh mesh, MMG5_Tria *pt, int8_t ori, double hmax, double hausd, int locPar)
static MMG5_int(* MMG3D_anatets)(MMG5_pMesh mesh, MMG5_pSol met, int8_t typchk)
static int MMG3D_chkbdyface(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_pTetra pt, MMG5_pxTetra pxt, int8_t i, MMG5_pTria ptt, int8_t typchk)
int MMG3D_splsurfedge(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_pTetra pt, MMG5_pxTetra pxt, int8_t imax, int8_t typchk, int8_t chkRidTet, int *warn)
int MMG3D_dichoto(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int *vx)
static int MMG5_coltet(MMG5_pMesh mesh, MMG5_pSol met, int8_t typchk)
static MMG5_int MMG3D_anatets_iso(MMG5_pMesh mesh, MMG5_pSol met, int8_t typchk)
int MMG3D_adpcoledg(MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree *PROctree, MMG5_int k, int8_t imin, double lmin, MMG5_int *nc)
void MMG5_tet2tri(MMG5_pMesh mesh, MMG5_int k, int8_t ie, MMG5_Tria *ptt)
static MMG5_int MMG5_anatetv(MMG5_pMesh mesh, MMG5_pSol met, int8_t typchk)
MMG5_int MMG5_swptet(MMG5_pMesh mesh, MMG5_pSol met, double crit, double declic, MMG3D_pPROctree PROctree, int typchk, MMG5_int testmark)
int8_t MMG3D_build_bezierEdge(MMG5_pMesh mesh, MMG5_int k, int8_t imax, int8_t i, int8_t j, MMG5_pxTetra pxt, MMG5_int ip1, MMG5_int ip2, MMG5_pPoint p0, MMG5_pPoint p1, MMG5_int *ref, int16_t *tag, double o[3], double to[3], double no1[3], double no2[3], int64_t *list, int *ilist)
void MMG3D_find_bdyface_from_edge(MMG5_pMesh mesh, MMG5_pTetra pt, int8_t ied, int8_t *i, int8_t *j, int8_t *i1, int8_t *i2, MMG5_int *ip1, MMG5_int *ip2, MMG5_pPoint *p0, MMG5_pPoint *p1)
#define MMG5_INCREASE_MEM_MESSAGE()
static const uint8_t MMG5_iprv2[3]
#define MG_EDG_OR_NOM(tag)
#define MG_GET(flag, bit)
static const uint8_t MMG5_inxt2[6]
int MMG5_nortri(MMG5_pMesh mesh, MMG5_pTria pt, double *n)
#define MMG5_DEL_MEM(mesh, ptr)
#define MG_SET(flag, bit)
Identic as MMG5_HGeom but use MMG5_hedge to store edges instead of MMG5_hgeom (memory economy).
Structure to store points of a MMG mesh.
Structure to store surface points of a MMG mesh.
Structure to store the surface tetrahedra of a MMG mesh.