Skip to content
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

Merged
merged 1 commit into from Jul 8, 2023
Merged

Conversation

peterrum
Copy link
Member

@peterrum peterrum commented Jul 7, 2023

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?

Copy link
Member

@tamiko tamiko left a 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!

@drwells
Copy link
Member

drwells commented Jul 8, 2023

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.

Comment on lines +16 to +18
// 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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@bangerth bangerth merged commit 40951ce into dealii:master Jul 8, 2023
15 checks passed
@bangerth
Copy link
Member

bangerth commented Jul 8, 2023

Oh, I hit "merge" without waiting for the changelog entry. Please add it -- perhaps in the "major" category.

@drwells drwells added this to the Developer workshop 2023 milestone Oct 10, 2023
drwells added a commit to drwells/dealii that referenced this pull request Apr 20, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants