Fix another issue with wrong edge tag update in swap23
.
#285
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The erroneous tag can be seen by adding checks on mesh consistency (call to
MMG5_chkmesh
) at the beginning of the loadbalancing function of ParMmg (PMMG_loadBalancing
) and by calling thels-CenIn-2
test case of ParMmg:We try to perform a
swap23
on a tetra with 2 boundary faces. Along the face at interface with the neighbour which with we perform the swap, the edge that doesn't belong to a boundary face has a wrong tag or no tag in the xtetra (due to a previous collapse that has added the xtetra but not updated the edge tag). It is not an issue as, in Mmg, we do not "trust" edge tags for edges not belonging to a boundary face. In the neighbour, the edge has the suitable tag (see attached picture).In this picture, the red and green faces belong to boundaries. The blue edge has not tag or errouneous tag (which is not an issue has it doesn't belongs to a boundary face). The grey tetra is the neighbour with which the swap is performed.
Without the fix introduced by this PR, the edge swap creates a tag inconsistency in one of the new tetra (in the sense that now, the edge without tag or with a wrong tag, may belong to a boundary face but still has an erroneous tag (for example if the grey tetra of the picture has 3 boundary faces for the faces not shared with the other tetra).
The current PR adds the suitable tag update by checking the tag in the edge shell (instead of using the tag of the xtetra 0).