59 assert( pt && pt1 &&
MG_EOK(pt1) );
64 while ( ++k < mesh->ne );
74 for(k=
mesh->
nenil; k<=mesh->nemax-1; k++){
87 MMG5_int mins,maxs,sum;
89 if ( !hash->
item )
return 0;
97 ph = &hash->
item[key];
100 if ( ph->
a == mins && ph->
b == maxs && ph->
s == sum )
105 if ( ph->
a == mins && ph->
b == maxs && ph->
s == sum )
return ph->
k;
125 MMG5_int k,kk,pp,l,ll,mins,mins1,maxs,maxs1,sum,sum1,iadr;
126 MMG5_int *hcode,*link,hsize,inival;
127 uint8_t i,ii,i1,i2,i3;
135 fprintf(stdout,
" ** SETTING STRUCTURE\n");
144 fprintf(stderr,
" Exit program.\n");
155 inival = MMG5_INTMAX;
158 for (k=0; k<=
mesh->
ne; k++)
162 for (k=1; k<=
mesh->
ne; k++) {
164 if ( !
MG_EOK(pt) )
continue;
165 for (i=0; i<4; i++) {
173 sum = pt->
v[i1] + pt->
v[i2] + pt->
v[i3];
176 link[iadr] = hcode[key];
182 if (
mesh->
info.
ddebug ) fprintf(stdout,
" h- stage 2: adjacencies\n");
183 for (l=iadr; l>0; l--) {
184 if ( link[l] >= 0 )
continue;
195 sum = pt->
v[i1] + pt->
v[i2] + pt->
v[i3];
201 while ( ll != inival ) {
208 sum1 = pt1->
v[i1] + pt1->
v[i2] + pt1->
v[i3];
214 if ( mins1 == mins && maxs1 == maxs ) {
215 if ( pp != 0 ) link[pp] = link[ll];
243 MMG5_int k,kk,l,ll,jj;
244 MMG5_int max12,min12,max34,min34,mins,mins1,mins_b, mins_b1,maxs,maxs1;
246 MMG5_int *hcode,*link,hsize,inival;
247 uint8_t i,ii,i1,i2,i3,i4;
254 fprintf(stderr,
"\n ## Warning: %s: no re-build of adjacencies of prisms. "
255 "mesh->adjapr must be freed to enforce analysis.\n",__func__);
261 fprintf(stdout,
" ** SETTING PRISMS ADJACENCY\n");
265 printf(
" Exit program.\n");
276 inival = MMG5_INTMAX;
286 for (i=0; i<2; i++) {
292 min12 =
MG_MIN(pp->
v[i1],pp->
v[i2]);
294 mins =
MG_MIN(min12,pp->
v[i3]);
296 max12 =
MG_MAX(pp->
v[i1],pp->
v[i2]);
298 maxs =
MG_MAX(max12,pp->
v[i3]);
301 mins_b = pp->
v[i1] + pp->
v[i2] + pp->
v[i3] -mins -maxs;
306 link[iadr] = hcode[key];
316 min12 =
MG_MIN(pp->
v[i1],pp->
v[i2]);
317 min34 =
MG_MIN(pp->
v[i3],pp->
v[i4]);
319 mins =
MG_MIN(min12,min34);
321 max12 =
MG_MAX(pp->
v[i1],pp->
v[i2]);
322 max34 =
MG_MAX(pp->
v[i3],pp->
v[i4]);
324 maxs =
MG_MAX(max12,max34);
332 link[iadr] = hcode[key];
338 if (
mesh->
info.
ddebug ) fprintf(stdout,
" h- stage 2: adjacencies\n");
339 for (l=iadr; l>0; l--) {
340 if ( link[l] >= 0 )
continue;
355 min12 =
MG_MIN(pp->
v[i1],pp->
v[i2]);
356 mins =
MG_MIN(min12,pp->
v[i3]);
358 max12 =
MG_MAX(pp->
v[i1],pp->
v[i2]);
359 maxs =
MG_MAX(max12,pp->
v[i3]);
361 mins_b = pp->
v[i1] + pp->
v[i2] + pp->
v[i3] - mins - maxs;
372 min12 =
MG_MIN(pp->
v[i1],pp->
v[i2]);
373 min34 =
MG_MIN(pp->
v[i3],pp->
v[i4]);
374 mins =
MG_MIN(min12,min34);
376 max12 =
MG_MAX(pp->
v[i1],pp->
v[i2]);
377 max34 =
MG_MAX(pp->
v[i3],pp->
v[i4]);
378 maxs =
MG_MAX(max12,max34);
387 while ( ll != inival ) {
401 min12 =
MG_MIN(pp1->
v[i1],pp1->
v[i2]);
402 mins1 =
MG_MIN(min12,pp1->
v[i3]);
404 max12 =
MG_MAX(pp1->
v[i1],pp1->
v[i2]);
405 maxs1 =
MG_MAX(max12,pp1->
v[i3]);
407 mins_b1 = pp1->
v[i1] + pp1->
v[i2] + pp1->
v[i3] - mins1 - maxs1;
418 min12 =
MG_MIN(pp1->
v[i1],pp1->
v[i2]);
419 min34 =
MG_MIN(pp1->
v[i3],pp1->
v[i4]);
420 mins1 =
MG_MIN(min12,min34);
422 max12 =
MG_MAX(pp1->
v[i1],pp1->
v[i2]);
423 max34 =
MG_MAX(pp1->
v[i3],pp1->
v[i4]);
424 maxs1 =
MG_MAX(max12,max34);
430 if ( mins1 == mins && maxs1 == maxs && mins_b1 == mins_b ) {
431 if ( jj != 0 ) link[jj] = link[ll];
465 MMG5_int adj,pradj,piv;
468 MMG5_int k,l,i1,i2,na,nb,ia,it1,it2, nr;
470 int ilist,nbdy,ipa,ipb;
471 int8_t iface,hasadja,i;
472 static int8_t mmgWarn0=0,mmgWarn1=0;
478 for (k=1; k<=
mesh->
nt; k++) {
481 if ( !
MG_EOK(ptt) )
continue;
483 for (l=0; l<3; l++) {
496 ph = &hash->
item[key];
500 if ( ph->
a == na && ph->
b == nb )
break;
512 for (ia=0; ia<6; ++ia) {
515 if ( (pt->
v[ipa] == na && pt->
v[ipb] == nb) ||
516 (pt->
v[ipa] == nb && pt->
v[ipb] == na))
break;
524 MMG3D_coquilFaceFirstLoop(
mesh,start,na,nb,iface,ia,list,&ilist,&it1,&it2,
525 &piv,&adj,&hasadja,&nbdy,1);
529 if ( adj == start ) {
533 fprintf(stderr,
"\n ## Warning: %s: at least 1 wrong boundary tag:"
534 " Only 0 or 1 boundary triangles founded in the shell of the edge\n",
561 fprintf(stderr,
"\n ## Warning: %s: problem in surface remesh"
562 " process. At least 1 shell of edge (%" MMG5_PRId
"-%" MMG5_PRId
") contains"
565 fprintf(stderr,
"\n ## Try to modify the hausdorff"
566 " number, or/and the maximum mesh.\n");
579 it2 = 4*pradj + iface;
581 if ( (!it1 || !it2) || (it1 == it2) ) {
590 if ( nbdy != ph->
s ) {
593 ptt->
tag[l] &= ~MG_NOSURF;
609 fprintf(stdout,
" %" MMG5_PRId
" required edges added\n",nr);
642 MMG5_int k,np,nc,nre,*nfeat,*
tmp;
651 for (k=1; k<=
mesh->
np; ++k) {
679 for (k=1; k<=
mesh->
ne; ++k) {
682 if ( !
MG_EOK(ptet) )
continue;
683 if ( !ptet->
xt )
continue;
687 for ( i=0; i<6; ++i ) {
705 if ( (!
tmp[np0]) && (!
tmp[np1]) ) {
722 ++nfeat[3*
tmp[np0]+1];
725 ++nfeat[3*
tmp[np0]+2];
732 ++nfeat[3*
tmp[np1]+1];
735 ++nfeat[3*
tmp[np1]+2];
742 for (k=1; k<=
mesh->
np; ++k) {
749 MMG5_int ng = nfeat[3*
tmp[k]];
750 MMG5_int nrp = nfeat[3*
tmp[k]+1];
751 MMG5_int nm = nfeat[3*
tmp[k]+2];
753 if ( (ng+nrp+nm) > 2 ) {
757 ppt0->
tag &= ~MG_NOSURF;
761 else if ( (ng == 2) || (nrp == 2) || (nm == 2) ) {
766 else if ( (ng+nrp+nm) == 2 ) {
770 ppt0->
tag &= ~MG_NOSURF;
773 else if ( ng == 1 && !nrp ){
775 ppt0->
tag &= ~MG_NOSURF;
779 else if ( (ng+nrp+nm) == 1 ){
782 assert ( (ng == 1) || (nrp==1) || (nm==1) );
784 ppt0->
tag &= ~MG_NOSURF;
800 fprintf(stdout,
" %" MMG5_PRId
" corner and %" MMG5_PRId
" required vertices added\n",nc,nre);
853 MMG5_int ia,ib,iph,iphp;
858 ph = &hash->
item[key];
860 if ( !ph->
a )
return 0;
861 else if ( ph->
a == ia && ph->
b == ib ) {
880 if ( ph->
a == ia && ph->
b == ib ) {
922 ph = &hash->
geom[key];
926 else if ( ph->
a == ia && ph->
b == ib ) {
935 if ( ph->
a == ia && ph->
b == ib ) {
950 MMG5_int ia,ib,iph,iphp;
955 assert ( hash->
siz );
960 ph = &hash->
geom[key];
962 if ( !ph->
a )
return 0;
963 else if ( ph->
a == ia && ph->
b == ib ) {
983 if ( ph->
a == ia && ph->
b == ib ) {
1015 assert ( hash->
siz );
1020 ph = &hash->
geom[key];
1022 if ( !ph->
a )
return 0;
1023 else if ( ph->
a == ia && ph->
b == ib ) {
1030 if ( ph->
a == ia && ph->
b == ib ) {
1045 assert ( hash->
siz );
1050 ph = &hash->
geom[key];
1052 if ( ph->
a == ia && ph->
b == ib )
1057 if ( ph->
a == ia && ph->
b == ib )
return 1;
1061 ph->
a = ia; ph->
b = ib;
1062 ph->
ref = ref; ph->
tag = tag;
1065 if ( hash->
nxt >= hash->
max ) {
1067 fprintf(stderr,
"\n ## Memory alloc problem (edge): %" MMG5_PRId
"\n",hash->
max);
1069 "larger htab table",
1070 fprintf(stderr,
" Exit program.\n");
return 0;);
1071 for (j=hash->
nxt; j<hash->max; j++) hash->
geom[j].
nxt = j+1;
1076 ph->
a = ia; ph->
b = ib;
1077 ph->
ref = ref; ph->
tag = tag;
1087 hash->
siz = hsiz + 1;
1088 hash->
max = hmax + 2;
1094 if ( !hash->
geom ) {
1095 perror(
" ## Memory problem: calloc");
1098 for (k=hash->
siz; k<hash->max; k++)
1115 MMG5_int edg,*adja,k,kk;
1129 fprintf(stderr,
"\n ## Warning: %s: no re-hash of edges of mesh. ",
1131 fprintf(stderr,
"mesh->htab.geom must be freed to enforce analysis.\n");
1139 for (k=1; k<=
mesh->
na; k++) {
1146 for (k=1; k<=
mesh->
nt; k++) {
1148 for (i=0; i<3; i++) {
1168 pt->
tag[i] &= ~MG_NOSURF;
1185 if ( !
ier )
return 0;
1188 for (k=1; k<=
mesh->
nt; k++) {
1191 for (i=0; i<3; i++) {
1196 else if ( (k < kk) && ( pt->
edg[i] || pt->
tag[i] ) )
mesh->
na++;
1210 for (k=1; k<=
mesh->
nt; k++) {
1213 for (i=0; i<3; i++) {
1226 else if ( k < kk && ( pt->
edg[i] || pt->
tag[i] ) ) {
1233 for (k=1; k<=
mesh->
nt; k++) {
1235 for (i=0; i<3; i++) {
1274 MMG5_int ref,*adja,adj,k,ia,ib,ic,kt,ntinit;
1295 for (k=1; k<=
mesh->
nt; k++) {
1301 for (i=0; i<3; i++) {
1308 if ( ntmesh != ntinit ) {
1309 for (k=1; k<=
mesh->
ne; k++) {
1311 if ( !
MG_EOK(pt) )
continue;
1315 for (i=0; i<4; i++) {
1322 if ( adj && ( pt->
ref <= pt1->
ref) )
continue;
1325 if ( adj && ( (pt->
ref<pt1->
ref) || (!pt->
xt) ||
1366 for( j = 0; j < 3; j++ ) {
1377 ptt->
tag[j] &= ~MG_BDY;
1379 ptt->
tag[j] &= ~MG_PARBDYBDY;
1389 ptt->
tag[j] &= ~MG_PARBDY;
1393 ptt->
tag[j] &= ~MG_NOSURF;
1394 ptt->
tag[j] &= ~MG_REQ;
1435 if ( !
MG_EOK(pp) )
continue;
1441 for (i=0; i<2; i++) {
1446 if ( !
mesh->
nt )
continue;
1454 if ( !kt )
continue;
1475 if ( adj && ( pp->
ref <= ref) )
continue;
1509 else ptt->
ref = pxpr ? pxpr->
ref[i] : 0;
1513 ptt->
ref = pxpr ? pxpr->
ref[i] : 0;
1519 assert(
mesh->
nt==ntmesh);
1521 if ( ntmesh != ntinit ) {
1523 for (k=1; k<=
mesh->
nt; k++) {
1525 for (i=0; i<3; i++) {
1560 MMG5_int ntmesh,ntpres;
1599 MMG5_int *adja,adj,k;
1600 MMG5_int ia,ib,ic,j;
1604 *ntmesh = *ntpres = 0;
1605 for (k=1; k<=
mesh->
ne; k++) {
1607 if ( !
MG_EOK(pt) )
continue;
1609 for (i=0; i<4; i++) {
1618 if ( pt->
ref > pt1->
ref )
1626 for (k=1; k<=
mesh->
ne; k++) {
1628 if ( !
MG_EOK(pt) || !pt->
xt )
continue;
1630 for (i=0; i<4; i++) {
1633 if ( !adj )
continue;
1638 if ( pt->
ref != pt1->
ref )
continue;
1649 if ( !
MG_EOK(pp) )
continue;
1652 for (i=0; i<2; i++) {
1665 if ( pp->
ref > pp1->
ref) {
1673 if ( !
MMG5_hashNew(
mesh,&hashTri,0.51*(*ntmesh),1.51*(*ntmesh)) )
return 0;
1674 for (k=1; k<=
mesh->
ne; k++) {
1676 if ( !
MG_EOK(pt) )
continue;
1679 for (i=0; i<4; i++) {
1681 if ( adj )
continue;
1697 if ( !
MG_EOK(pp) )
continue;
1700 for (i=0; i<2; i++) {
1702 if ( adj )
continue;
1733 MMG5_int *adja,adj,k;
1741 for (k=1; k<=
mesh->
ne; k++) {
1743 if ( !
MG_EOK(pt) )
continue;
1745 for (i=0; i<4; i++) {
1753 for (k=1; k<=
mesh->
ne; k++) {
1755 if ( !
MG_EOK(pt) )
continue;
1757 for (i=0; i<4; i++) {
1768 if ( pt->
ref > pt1->
ref ) {
1779 if ( !
MG_EOK(pp) )
continue;
1781 for (i=0; i<2; i++) {
1789 else if ( adj<0 )
continue;
1794 if ( pp->
ref > pp1->
ref ) {
1817 MMG5_int k, kk, i, j;
1818 MMG5_int ia, ib, ic, adj;
1823 for (k=1; k<=
mesh->
nt; k++) {
1857 adj =
mesh->
adja[4*(kk-1)+1+iface];
1873 MMG5_int nt, nbl, k;
1876 for (k=1; k<=
mesh->
nt; k++) {
1879 if ( !
MG_EOK(ptt) )
continue;
1893 fprintf(stderr,
"\n ## Warning: %s: %" MMG5_PRId
" extra boundaries provided."
1894 " Ignored\n",__func__,nbl);
1917 printf(
" %" MMG5_PRId
" triangles between 2 tetrahdra with same"
1918 " references\n",ntpres);
1921 for (k=1; k<=
mesh->
nt; k++) {
1923 for (i=0; i<3; i++) {
1937 if ( ntmesh >
mesh->
nt ) {
1944 fprintf(stderr,
"\n ## Warning: %s: %" MMG5_PRId
" extra boundaries founded\n",
1965 MMG5_int ref,*adja,adj,k,ia,ib,ic,kt,initedg[3];
1967 uint16_t tag,inittag[3];
1970 if ( !
mesh->
nt )
return 1;
1974 fprintf(stderr,
"\n ## Error: %s: mesh->xtetra must be freed.\n",__func__);
1980 fprintf(stderr,
"\n ## Error: %s: mesh->xprism must be freed.\n",__func__);
1986 for (k=1; k<=
mesh->
nt; k++) {
1996 fprintf(stderr,
" Exit program.\n");
2002 for (k=1; k<=
mesh->
ne; k++) {
2004 if ( !
MG_EOK(pt) )
continue;
2007 for (i=0; i<4; i++) {
2010 if ( !adj || ( pt->
ref != pt1->
ref) ) {
2020 "larger xtetra table",
2022 fprintf(stderr,
" Exit program.\n");
return 0;);
2032 tag = (ptt->
tag[0] & ptt->
tag[1] & ptt->
tag[2]);
2037 assert( !(tag &
MG_CRN) &&
"MG_CRN tag has no sense along edges" );
2040 pxt->
ftag[i] |= tag;
2047 for (k=1; k<=
mesh->
ne; k++) {
2049 if ( !
MG_EOK(pt) )
continue;
2052 for (i=0; i<4; i++) {
2058 if ( !kt )
continue;
2064 "larger xtetra table",
2066 fprintf(stderr,
" Exit program.\n");
return 0;);
2078 tag = (ptt->
tag[0] & ptt->
tag[1] & ptt->
tag[2]);
2083 assert( !(tag &
MG_CRN) &&
"MG_CRN tag has no sense along edges" );
2086 pxt->
ftag[i] |= tag;
2092 for (k=1; k<=
mesh->
ne; k++) {
2094 if ( !
MG_EOK(pt) )
continue;
2096 if ( !pt->
xt )
continue;
2099 for (i=0; i<4; i++) {
2103 if ( pxt->
ftag[i] ) {
2104 if ( adj && (pt->
ref == pt1->
ref ) ) {
2116 if ( ptt->
v[0] == ia && ptt->
v[1] == ib && ptt->
v[2] == ic ) {
2118 for (j=0; j<3; j++) {
2119 tag = pxt->
ftag[i] | ptt->
tag[j];
2134 for (k=1; k<=
mesh->
ne; k++) {
2136 if ( !
MG_EOK(pt) )
continue;
2138 if ( !pt->
xt )
continue;
2141 for (i=0; i<4; i++) {
2150 if ( !kt )
continue;
2157 for ( j=0; j<3; ++j ) {
2160 if ( ptt->
v[j]==ia && ptt->
v[i1]==ib && ptt->
v[i2]==ic )
2171 inittag[0] = ptt->
tag[0];
2172 inittag[1] = ptt->
tag[1];
2173 inittag[2] = ptt->
tag[2];
2174 ptt->
tag[0] = inittag[j];
2175 ptt->
tag[1] = inittag[i1];
2176 ptt->
tag[2] = inittag[i2];
2178 initedg[0] = ptt->
edg[0];
2179 initedg[1] = ptt->
edg[1];
2180 initedg[2] = ptt->
edg[2];
2181 ptt->
edg[0] = initedg[j];
2182 ptt->
edg[1] = initedg[i1];
2183 ptt->
edg[2] = initedg[i2];
2193 if ( pxt->
ftag[i] ) {
2198 for (j=0; j<3; j++) {
2199 tag = pxt->
ftag[i] | ptt->
tag[j];
2218 fprintf(stderr,
" Exit program.\n");
2225 if ( !
MG_EOK(pp) )
continue;
2227 for (i=0; i<2; i++) {
2234 if ( adj && (pp->
ref == ref) )
continue;
2251 tag = (ptt->
tag[0] & ptt->
tag[1] & ptt->
tag[2]);
2256 assert( !(tag &
MG_CRN) &&
"MG_CRN tag has no sense along edges" );
2259 pxp->
ftag[i] |= tag;
2261 for (j=0; j<3; j++) {
2268 fprintf(stderr,
" Exit program.\n");
2271 "boundary prisms",
return 0);
2299 MMG5_int ia,ib,ic,k,kt;
2304 if ( !
mesh->
nt )
return 1;
2306 for (k=1; k<=
mesh->
nt; k++) {
2314 for (k=1; k<=
mesh->
ne; k++) {
2316 if ( !
MG_EOK(pt) )
continue;
2340 if ( !pt->
xt )
continue;
2343 for (i=0; i<4; i++) {
2358 pxt->
ftag[i] &= ~MG_NOSURF;
2359 ptt->
tag[0] &= ~MG_NOSURF;
2360 ptt->
tag[1] &= ~MG_NOSURF;
2361 ptt->
tag[2] &= ~MG_NOSURF;
2363 for ( j=0; j<3; j++ ) {
2365 if ( tag || ptt->
edg[j] ) {
2389 MMG5_int *adja,adj,k,kt,ia,ib,ic,nf;
2392 if ( !
mesh->
nt )
return 1;
2398 for (k=1; k<=
mesh->
nt; k++) {
2408 for (k=1; k<=
mesh->
ne; k++) {
2410 if ( !
MG_EOK(pt) )
continue;
2412 for (i=0; i<4; i++) {
2426 if ( ptt->
v[0] == ia && ptt->
v[1] == ib && ptt->
v[2] == ic )
2438 fprintf(stdout,
" ## %" MMG5_PRId
" faces reoriented\n",nf);
if(!ier) exit(EXIT_FAILURE)
int MMG5_settag(MMG5_pMesh mesh, MMG5_int start, int ia, uint16_t tag, int edg)
void MMG3D_coquilFaceSecondLoopInit(MMG5_pMesh mesh, MMG5_int piv, int8_t *iface, int8_t *ia, int64_t *list, int *ilist, MMG5_int *it1, MMG5_int *pradj, MMG5_int *adj)
int MMG3D_coquilFaceFirstLoop(MMG5_pMesh mesh, MMG5_int start, MMG5_int na, MMG5_int nb, int8_t iface, int8_t ia, int64_t *list, int *ilist, MMG5_int *it1, MMG5_int *it2, MMG5_int *piv, MMG5_int *adj, int8_t *hasadja, int *nbdy, int silent)
void MMG5_coquilFaceErrorMessage(MMG5_pMesh mesh, MMG5_int k1, MMG5_int k2)
int16_t MMG5_openCoquilTravel(MMG5_pMesh mesh, MMG5_int na, MMG5_int nb, MMG5_int *adj, MMG5_int *piv, int8_t *iface, int8_t *i)
int MMG5_deltag(MMG5_pMesh mesh, MMG5_int start, int ia, uint16_t tag)
MMG5_int MMG5_hashFace(MMG5_pMesh mesh, MMG5_Hash *hash, MMG5_int ia, MMG5_int ib, MMG5_int ic, MMG5_int k)
int MMG5_mmgHashTria(MMG5_pMesh mesh, MMG5_int *adjt, MMG5_Hash *hash, int chkISO)
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 MMG5_paktet(MMG5_pMesh mesh)
int MMG3D_hashTetra(MMG5_pMesh mesh, int pack)
Create array of adjacency.
int MMG5_chkBdryTria_flagExtraTriangles(MMG5_pMesh mesh, MMG5_int *ntpres, MMG5_Hash *hashElt)
int MMG5_hEdge(MMG5_pMesh mesh, MMG5_HGeom *hash, MMG5_int a, MMG5_int b, MMG5_int ref, uint16_t tag)
int MMG5_hGeom(MMG5_pMesh mesh)
int MMG5_hPop(MMG5_HGeom *hash, MMG5_int a, MMG5_int b, MMG5_int *ref, uint16_t *tag)
int MMG5_hGet(MMG5_HGeom *hash, MMG5_int a, MMG5_int b, MMG5_int *ref, uint16_t *tag)
int MMG5_hNew(MMG5_pMesh mesh, MMG5_HGeom *hash, MMG5_int hsiz, MMG5_int hmax)
int MMG3D_hashPrism(MMG5_pMesh mesh)
int MMG5_hTag(MMG5_HGeom *hash, MMG5_int a, MMG5_int b, MMG5_int ref, uint16_t tag)
static int MMG5_bdryTria(MMG5_pMesh mesh, MMG5_int ntmesh)
MMG5_int MMG5_hashGetFace(MMG5_Hash *hash, MMG5_int ia, MMG5_int ib, MMG5_int ic)
static uint16_t MMG5_skip_ParBdy(uint16_t tag)
int MMG5_chkBdryTria_addMissingTriangles(MMG5_pMesh mesh, MMG5_int ntmesh, MMG5_int ntpres)
int MMG5_chkBdryTria(MMG5_pMesh mesh)
int MMG5_bdrySet(MMG5_pMesh mesh)
int MMG5_chkBdryTria_hashBoundaries(MMG5_pMesh mesh, MMG5_int ntmesh, MMG5_Hash *hashElt)
static int MMG5_setEdgeNmTag(MMG5_pMesh mesh, MMG5_Hash *hash)
int MMG5_bdryUpdate(MMG5_pMesh mesh)
int MMG5_setNmTag(MMG5_pMesh mesh, MMG5_Hash *hash)
int MMG3D_hashTria(MMG5_pMesh mesh, MMG5_Hash *hash)
int MMG5_setVertexNmTag(MMG5_pMesh mesh, uint16_t func(uint16_t))
int MMG5_hashPop(MMG5_Hash *hash, MMG5_int a, MMG5_int b)
int MMG5_chkBdryTria_deleteExtraTriangles(MMG5_pMesh mesh, MMG5_int *permtria)
int MMG5_bdryPerm(MMG5_pMesh mesh)
int MMG5_chkBdryTria_countBoundaries(MMG5_pMesh mesh, MMG5_int *ntmesh, MMG5_int *ntpres)
API headers and documentation for the mmg3d library, for volumetric meshes in 3D.
MMG5_int MMG3D_indPt(MMG5_pMesh mesh, MMG5_int kp)
int MMG3D_delElt(MMG5_pMesh mesh, MMG5_int iel)
static const int8_t MMG5_iarf[4][3]
iarf[i]: edges of face opposite to vertex i
static const uint8_t MMG5_iare[6][2]
vertices of extremities of the edges of the tetra
static const uint8_t MMG5_iarf_pr[5][5]
iarf[i]: edges of face i for a prism
static const uint8_t MMG5_idir_pr[5][4]
idir[i]: vertices of face i for a prism
static const uint8_t MMG5_idir[4][3]
idir[i]: vertices of face opposite to vertex i
int MMG5_isLevelSet(MMG5_pMesh mesh, MMG5_int ref0, MMG5_int ref1)
#define MMG5_SAFE_CALLOC(ptr, size, type, law)
#define MG_CLR(flag, bit)
#define MMG5_ADD_MEM(mesh, size, message, law)
#define MMG5_SAFE_REALLOC(ptr, prevSize, newSize, type, message, law)
static const uint8_t MMG5_iprv2[3]
#define MG_EDG_OR_NOM(tag)
#define MMG5_TAB_RECALLOC(mesh, ptr, initSize, wantedGap, type, message, law)
#define MG_GET(flag, bit)
static const uint8_t MMG5_inxt2[6]
#define MMG5_SAFE_MALLOC(ptr, size, type, law)
#define MMG5_SAFE_FREE(ptr)
#define MMG5_DEL_MEM(mesh, ptr)
#define MG_SET(flag, bit)
#define MMG5_SAFE_RECALLOC(ptr, prevSize, newSize, type, message, law)
Structure to store edges of am MMG mesh.
Hash table to store geometric edges.
Identic as MMG5_HGeom but use MMG5_hedge to store edges instead of MMG5_hgeom (memory economy).
Structure to store vertices of an MMG mesh.
Structure to store prsim of a MMG mesh.
Structure to store tetrahedra of an MMG mesh.
Structure to store triangles of a MMG mesh.
Used to hash edges (memory economy compared to MMG5_hgeom).
Cell of the hash table of geometric edges.
Structure to store the surface prism of a MMG mesh.
Structure to store additional information for the surface tetrahedra of an MMG mesh.