Skip to content

Commit

Permalink
Patch regression in level-set mode: chkmanicoll was not calld anymore…
Browse files Browse the repository at this point in the history
… on classical bdy edges (inside chkcol_bdy), it was called only along non-manifold edges.
  • Loading branch information
Algiane committed Oct 15, 2020
1 parent 7e3c9db commit 6ff181f
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/mmg3d/colver_3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,11 @@ int MMG5_chkcol_bdy(MMG5_pMesh mesh,MMG5_pSol met,int k,int8_t iface,
ndepmin = ndepplus = 0;
isminp = isplp = 0;

if ( !isnm ) {
refmin = MG_MINUS;
refplus = MG_PLUS;
}

/* prevent collapse in case surface ball has 3 triangles */
if ( ilists <= 2 ) return 0; // ATTENTION, Normalement, avec 2 c est bon !

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

if ( isnm ) {
if ( pt->ref == refmin ) isminp = 1;
else if ( pt->ref == refplus ) isplp = 1;
}
if ( pt->ref == refmin ) isminp = 1;
else if ( pt->ref == refplus ) isplp = 1;

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

if ( isnm ) {
if ( isnm || mesh->info.iso ) {
/* Volume test for tetras outside the shell */
if ( !ndepmin && pt->ref == refmin )
if ( (!ndepmin) && (pt->ref == refmin) ) {
ndepmin = iel;
else if ( !ndepplus && pt->ref == refplus )
}
else if ( (!ndepplus) && (pt->ref == refplus) ) {
ndepplus = iel;
}
}

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

if ( isnm ) {
if ( isnm || mesh->info.iso ) {
ier = MMG5_chkmanicoll(mesh,k,iface,iedg,ndepmin,ndepplus,refmin,refplus,isminp,isplp);
if ( !ier ) return 0;
}
Expand Down

0 comments on commit 6ff181f

Please sign in to comment.