Skip to content

Remove entity permutations for non-Lagrange elements#156

Merged
pbrubeck merged 13 commits intoreleasefrom
pbrubeck/fix/permutations
Sep 8, 2025
Merged

Remove entity permutations for non-Lagrange elements#156
pbrubeck merged 13 commits intoreleasefrom
pbrubeck/fix/permutations

Conversation

@pbrubeck
Copy link

@pbrubeck pbrubeck commented Jul 25, 2025

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_permutations indicate how to transform degrees of freedom for each permutation of the vertices of an entity. These were wrongly cargo-culted from the Lagrange element to other CG/DG elements with IntegralMoment degrees 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 make_entity_permutations_simplex will only work for moments against a Bernstein basis or a Lagrange basis on symmetric points, because there holds $\phi_{i}(x) = \phi_{p-i}(1-x)$.

This property is not satisfied by the moments in Legendre, IntegratedLegendre and the FDMElements where $\phi_i(x)$ is either symmetric or antisymmetric about $x=1/2$, $\phi_{i}(x) = (-1)^i \phi_{i}(1-x)$.

So 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.

@pbrubeck pbrubeck force-pushed the pbrubeck/fix/permutations branch 2 times, most recently from 8b93244 to 9d80ddc Compare July 25, 2025 15:21
@pbrubeck pbrubeck force-pushed the pbrubeck/fix/permutations branch from c67b1ac to 8631bce Compare July 29, 2025 12:03
@pbrubeck pbrubeck requested a review from ksagiyam July 29, 2025 14:57
@ksagiyam
Copy link

ksagiyam commented Sep 8, 2025

if Firedrake CI passes: firedrakeproject/firedrake#4468.

@pbrubeck pbrubeck merged commit 681dea3 into release Sep 8, 2025
8 checks passed
@pbrubeck pbrubeck deleted the pbrubeck/fix/permutations branch September 8, 2025 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants