mmg
mmg copied to clipboard
Ensure that required triangles are preserved
This PR
- Fix a bug introduced by PR #239
- Improve comments
Explanations of 1. A bug was introduced by PR #239: triangles required by the user in the input mesh were not preserved anymore.
Indeed, in PR #239, if the face was not MG_PARALLEL
, then the tags MG_REQ+MG_SURF
were removed, while only MG_SURF
should have been removed if the triangle was initially required by the user.
Now, i.e. in this PR, the tag MG_REQ
of edges is removed only if the edge is MG_PARALLEL
and MG_SURF
.
By convention in ParMmg (see tag_pmmg.c in ParMmg), if an entity is
- parallel + not required: the tags are
MG_PARBDY+MG_NOSURF+MG_REQ
; - parallel + truly required by the user: the tags are
MG_PARBDY+MG_REQ
;
so we remove the tags MG_NOSURF
and MG_REQ
only if the edge is effectively MG_PARALLEL
and identified as MG_NOSURF
.