diff --git a/src/mmg3d/chkmsh_3d.c b/src/mmg3d/chkmsh_3d.c index 9e0ae96ad..0e00d3c4a 100644 --- a/src/mmg3d/chkmsh_3d.c +++ b/src/mmg3d/chkmsh_3d.c @@ -223,6 +223,8 @@ void MMG3D_chkmeshedgestags(MMG5_pMesh mesh) { /* Travel mesh edges and hash boundary ones */ MMG5_hNew(mesh,&hash,nt,3*nt); + uint16_t ignored_tag = (~MG_PARBDYBDY) & (~MG_OLDPARBDY); + for (k=1; k<=mesh->ne; k++) { pt = &mesh->tetra[k]; if ( !MG_EOK(pt) ) continue; @@ -241,10 +243,11 @@ void MMG3D_chkmeshedgestags(MMG5_pMesh mesh) { if ( !ier ) { /* First time we meet the edge: store the its tag from the current - * tetra in the hash table. Ignore OLDPARBDY tag because it is not - * consistent through meshes inside ParMmg and forbid the use of the - * current function to check tag consistency if not ignored. */ - int ier2 = MMG5_hEdge ( mesh,&hash,ip1,ip2,0,(pxt->tag[i] & ~MG_OLDPARBDY)); + * tetra in the hash table. Ignore OLDPARBDY and PARBDYBDY tags + * because they are not consistent through meshes inside ParMmg and + * forbid the use of the current function to check tag consistency if + * not ignored. */ + int ier2 = MMG5_hEdge ( mesh,&hash,ip1,ip2,0,(pxt->tag[i] & ignored_tag)); if ( !ier2 ) { /* Realloc error */ fprintf(stderr,"Error: %s: %d: Unable to add to hash table the edge " @@ -255,11 +258,11 @@ void MMG3D_chkmeshedgestags(MMG5_pMesh mesh) { } else { /* Edge tag has been stored from another tet: check consistency. - Ignore OLDPARBDY tag because it is not - * consistent through meshes inside ParMmg and forbid the use of the - * current function to check tag consistency if not ignored. + Ignore OLDPARBDY and PARBDYBDY tags because they are not * + consistent through meshes inside ParMmg and forbid the use of the * + current function to check tag consistency if not ignored. */ - if ( tag != (pxt->tag[i] & ~MG_OLDPARBDY) ) { + if ( tag != (pxt->tag[i] & ignored_tag) ) { fprintf(stderr,"Error: %s: %d: Non consistency at tet %" MMG5_PRId " (%" MMG5_PRId "), edge %d:%" MMG5_PRId "--%" MMG5_PRId "\n ", __func__,__LINE__,k,MMG3D_indElt(mesh,k),i,ip1,ip2);