Skip to content

Consistent orientation of output of Expression on facets#836

Merged
jorgensd merged 3 commits into
mainfrom
dokken/facet_expression_parent_fix
Jun 1, 2026
Merged

Consistent orientation of output of Expression on facets#836
jorgensd merged 3 commits into
mainfrom
dokken/facet_expression_parent_fix

Conversation

@jorgensd

@jorgensd jorgensd commented Jun 1, 2026

Copy link
Copy Markdown
Member

After an intense debug session with @mscroggs, that outperforms Claude on any day, we found this funky bug in FFCx that expressions evaluated on facets were missing a permutation.

The logic behind this is:

Consider a triangle with local vertices

1 ---- 2
|    /
|  /
0

and we would like to evaluate an expression on local facet 0
1 --- 2.
Then, a point (x=0.2) could either

Perm 0
1 -x---- 2

or

Perm 1
1 ----x- 2

depending of the facet_permutation (which yields a globally consistent orientation). This was disregarded in the first implementation (#672)

…e on any day, we found this funky bug in FFCx that expressions evaluated on facets were missing a permutation.
@jorgensd jorgensd requested a review from mscroggs June 1, 2026 08:21
@coveralls

coveralls commented Jun 1, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 84.685% (+0.02%) from 84.665% — dokken/facet_expression_parent_fix into main

Comment thread ffcx/ir/elementtables.py
@jorgensd jorgensd changed the title Fix Expression eval on facets Consistent orientation of output of Expression on facets Jun 1, 2026
@jorgensd jorgensd added this pull request to the merge queue Jun 1, 2026
@jorgensd jorgensd removed this pull request from the merge queue due to a manual request Jun 1, 2026
@jorgensd jorgensd added this pull request to the merge queue Jun 1, 2026
Merged via the queue into main with commit f2f855a Jun 1, 2026
27 checks passed
@jorgensd jorgensd deleted the dokken/facet_expression_parent_fix branch June 1, 2026 10:57
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.

3 participants