New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix face orientation #15678
Fix face orientation #15678
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a news/changes entry!
It feels anticlimactic that this change ended up being so short, but all the simplex tests pass for me (including the new one which verifies that we get the same quadrature points on abutting faces) so I approve. We should definitely add a changelog entry. |
// Test a mesh with two tetrahedra for all possible orientations. Similar to | ||
// orientation_02 but also checks that quadrature points on faces (computed via | ||
// FEFaceValues) are correct. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Oh, I hit "merge" without waiting for the changelog entry. Please add it -- perhaps in the "major" category. |
Partially reverts dealii#15678. While dealii#15678 fixed the permutation bug, it didn't address the true cause of the problem: since face orientations are computed in the "apply this permutation to face 1 to get face 2" direction, QProjector should use inverse orientations. Since 2d orientations are their own inverses this only shows up in 3d. Whenever two faces abutt, the first face is always in the default orientation and the second face's orientation is computed relative to that (as decribed here). Hence, when we project quadrature points onto the first face they do not need to reoriented. However, we need to apply the *reverse* permutation on the second face so that they end up in the same positions as the first face. More formally: most, but not all, orientations are their own inverses. In particular, triangle orientations 3 and 5 are each-other's inverses. This matches the notion of inverse orientation used in dealii#16828 for hypercubes. In the future, we should combine the hypercube and non-hypercube implementations to avoid these kinds of inconsistencies. Part of dealii#14667.
as alternative to #15573 -> https://github.com/peterrum/dealii/commits/fix_orientation
This PR only fixes the face orientations, which is needed for DG. The line orientations are done later (August or September).
@drwells Once merge, could you add P3 for DG?