Skip to content

Commit

Permalink
Modification of the settag function
Browse files Browse the repository at this point in the history
The settag function updates tag info by travelling the tetra of the shell of a given edge.
Commit 0f487e0 (which aims to add the support of required entities) has introduced the fact that
the edge tag is updated only for tetra in which the edge belongs to a boundary face.

Thus, if the edge has no boundary face, it is not updated.

It may leads to tag inconsistencies in ParMmg where the settag function is called (in `cleanMesh`function)
 and where edges not belonging to bdy faces may be marked as MG_BDY.

As a recall:
  - any edge marked as MG_BDY has to have consistent tags with the tags of the same edge in the other tetra.
  - regular edges belonging to a boundary face inside the current tet may have a 0 tag (because for now the splitting operators are creating boundary edges with 0 tags when splitting boundary triangles, see split_3d.c).
  - regular or non regular edges not having a bdy face inside the tetra may have a 0 tag.
  • Loading branch information
Algiane committed Dec 15, 2023
1 parent 3a5e3ab commit 65c40fd
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/mmg3d/boulep_3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -1185,18 +1185,16 @@ int MMG3D_settag_oneDir(MMG5_pMesh mesh,MMG5_int start, MMG5_int na, MMG5_int n

if ( pt->xt ) {
pxt = &mesh->xtetra[pt->xt];
if ( (pxt->ftag[MMG5_ifar[i][0]] & MG_BDY) ||
(pxt->ftag[MMG5_ifar[i][1]] & MG_BDY) ) {
taginit = pxt->tag[i];
pxt->tag[i] |= tag;
/* Remove the potential nosurf tag if initially the edge is
* really required */
if ( ((taginit & MG_REQ) && !(taginit & MG_NOSURF)) ||
(( tag & MG_REQ) && !( tag & MG_NOSURF)) ) {
pxt->tag[i] &= ~MG_NOSURF;
}
pxt->edg[i] = MG_MAX(pxt->edg[i],edg);

taginit = pxt->tag[i];
pxt->tag[i] |= tag;
/* Remove the potential nosurf tag if initially the edge is
* really required */
if ( ((taginit & MG_REQ) && !(taginit & MG_NOSURF)) ||
(( tag & MG_REQ) && !( tag & MG_NOSURF)) ) {
pxt->tag[i] &= ~MG_NOSURF;
}
pxt->edg[i] = MG_MAX(pxt->edg[i],edg);
}
/* set new triangle for travel */
adja = &mesh->adja[4*(adj-1)+1];
Expand Down

0 comments on commit 65c40fd

Please sign in to comment.