Skip to content

Conversation

@JHopeCollins
Copy link
Member

This is in response to this comment in a Firedrake PR: firedrakeproject/firedrake#4716 (comment)

MixedElement (and the Vector and Tensor derived classes) must be at the very outside of an element specification.
This means that currently BrokenElement(MixedElement(...)) doesn't work properly.

This PR intercepts the BrokenElement.__new__ so that:

BrokenElement(MixedElement(elem0, elem1)) == MixedElement(BrokenElement(elem0), BrokenElement(elem1))

and similarly for VectorElement and TensorElement.

Copy link

@pbrubeck pbrubeck left a comment

Choose a reason for hiding this comment

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

LGTM

@JHopeCollins JHopeCollins merged commit f3211e7 into main Dec 11, 2025
8 checks passed
@JHopeCollins JHopeCollins deleted the JHopeCollins/mixed-broken-element branch December 11, 2025 11:21
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