Repository navigation
Conversation
Run test and documentation jobs against the coordinate mapping API from firedrakeproject/fiat#316. Drop this commit after that PR merges into FIAT main. AI assistance used OpenAI Codex.
AI assistance: OpenAI Codex.
05c90be to
521b035
Compare
connorjward
left a comment
There was a problem hiding this comment.
This still reads like a code smell to me. Now that needs_coordinate_mapping is a property to me it makes far more sense to avoid having a mixin class at all. In particular you now have
elem.needs_coordinate_mapping and not isinstance(elem, NeedsCoordinateMapping)which is deeply unintuitive.
Just have things like:
def dual_transformation(self, ...):
if self.needs_coordinate_mapping:
# do what the mixin currently does
else:
# do what FiniteElementBase does
Where did you find this?
But keeping the mixin is still worth it because there are two further mixins: |
PhysicallyMappedElement and DirectlyDefinedElement now declare needs_coordinate_mapping themselves, so the property is the single marker for elements that require a coordinate mapping. AI assistance: Claude Code (Claude Opus 5.5). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
I deleted |
Summary
This provides the FInAT side of the fix for firedrakeproject/firedrake#5687.
Evidence
AssertionErrorwhen the base element received no coordinate mapping.make lintpassed locally.Merge Danger
Two-way. This adds a property to FInAT elements and forwards geometry in wrapper evaluation. Merge this PR before the Firedrake companion that reads the property.
AI assistance used OpenAI Codex.