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

Explicitly use the inverse orientation instead of hard-coding. #16916

Merged
merged 1 commit into from
Apr 21, 2024

Conversation

drwells
Copy link
Member

@drwells drwells commented Apr 20, 2024

Partially reverts #15678.

While #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 #16828 for hypercubes. In the future, we should combine the hypercube and non-hypercube implementations to avoid these kinds of inconsistencies.

Part of #14667.

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.
Copy link
Member

@kronbichler kronbichler left a comment

Choose a reason for hiding this comment

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

Yes, this looks good!

@masterleinad masterleinad merged commit 03c82a1 into dealii:master Apr 21, 2024
16 checks passed
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

3 participants