Remove entity permutations for non-Lagrange elements#156
Merged
Conversation
8b93244 to
9d80ddc
Compare
9d80ddc to
6395dcb
Compare
c67b1ac to
8631bce
Compare
ksagiyam
approved these changes
Sep 8, 2025
|
if Firedrake CI passes: firedrakeproject/firedrake#4468. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes firedrakeproject/firedrake#4467
Also refactoring hierarchical.py and fdm_element.py
Exposition
To deal with the orientation problem (the mapping from the reference to the physical cell is unique up to permutations of the vertices), Firedrake has two mechanisms to generate a local to global mapping. The first one is to number dofs within an entity with increasing global vertex id. This option has the advantage that one only needs to deal with a fixed ordering of the degrees of freedom for every cell, but the resulting ordering is not robust with respect to the mesh distribution. The robust alternative involves a transformation of degrees of freedom for every possible permutation of the vertices of the reference element.
The
entity_permutationsindicate how to transform degrees of freedom for each permutation of the vertices of an entity. These were wrongly cargo-culted from theLagrangeelement to other CG/DG elements withIntegralMomentdegrees of freedom. So here we are removing them.For
IntegralMoments, the DOF transformation cannot be described by simple permutations. This is only true if the functions in the moments are preserved under the rotation symmetry group of the simplex.The index permutation$i \to p-i$ implied by $\phi_{i}(x) = \phi_{p-i}(1-x)$ .
make_entity_permutations_simplexwill only work for moments against a Bernstein basis or a Lagrange basis on symmetric points, because there holdsThis property is not satisfied by the moments in$\phi_i(x)$ is either symmetric or antisymmetric about $x=1/2$ , $\phi_{i}(x) = (-1)^i \phi_{i}(1-x)$ .
Legendre,IntegratedLegendreand theFDMElementswhereSo if you permute the endpoints, the symmetric moments will be preserved, but there'll be a sign flip for the antisymmetric moments. This case cannot be covered by a DOF permutation, but instead we would require a scaling factor in the transformation.