Skip to content

Commit 6ff181f

Browse files
committed
Patch regression in level-set mode: chkmanicoll was not calld anymore on classical bdy edges (inside chkcol_bdy), it was called only along non-manifold edges.
1 parent 7e3c9db commit 6ff181f

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

src/mmg3d/colver_3d.c

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,11 @@ int MMG5_chkcol_bdy(MMG5_pMesh mesh,MMG5_pSol met,int k,int8_t iface,
393393
ndepmin = ndepplus = 0;
394394
isminp = isplp = 0;
395395

396+
if ( !isnm ) {
397+
refmin = MG_MINUS;
398+
refplus = MG_PLUS;
399+
}
400+
396401
/* prevent collapse in case surface ball has 3 triangles */
397402
if ( ilists <= 2 ) return 0; // ATTENTION, Normalement, avec 2 c est bon !
398403

@@ -406,10 +411,8 @@ int MMG5_chkcol_bdy(MMG5_pMesh mesh,MMG5_pSol met,int k,int8_t iface,
406411
ipp = listv[l] % 4;
407412
pt = &mesh->tetra[iel];
408413

409-
if ( isnm ) {
410-
if ( pt->ref == refmin ) isminp = 1;
411-
else if ( pt->ref == refplus ) isplp = 1;
412-
}
414+
if ( pt->ref == refmin ) isminp = 1;
415+
else if ( pt->ref == refplus ) isplp = 1;
413416

414417
/* Topological test for tetras of the shell */
415418
for (iq=0; iq<4; iq++)
@@ -444,12 +447,14 @@ int MMG5_chkcol_bdy(MMG5_pMesh mesh,MMG5_pSol met,int k,int8_t iface,
444447
continue;
445448
}
446449

447-
if ( isnm ) {
450+
if ( isnm || mesh->info.iso ) {
448451
/* Volume test for tetras outside the shell */
449-
if ( !ndepmin && pt->ref == refmin )
452+
if ( (!ndepmin) && (pt->ref == refmin) ) {
450453
ndepmin = iel;
451-
else if ( !ndepplus && pt->ref == refplus )
454+
}
455+
else if ( (!ndepplus) && (pt->ref == refplus) ) {
452456
ndepplus = iel;
457+
}
453458
}
454459

455460
/* Prevent from creating a tetra with 4 ridges vertices */
@@ -687,7 +692,7 @@ int MMG5_chkcol_bdy(MMG5_pMesh mesh,MMG5_pSol met,int k,int8_t iface,
687692
}
688693
}
689694

690-
if ( isnm ) {
695+
if ( isnm || mesh->info.iso ) {
691696
ier = MMG5_chkmanicoll(mesh,k,iface,iedg,ndepmin,ndepplus,refmin,refplus,isminp,isplp);
692697
if ( !ier ) return 0;
693698
}

0 commit comments

Comments
 (0)