Skip to content

Conversation

@pbrubeck
Copy link

@pbrubeck pbrubeck commented Dec 5, 2025

No description provided.

'''Appropriate mapping from the reference cell to a physical cell for
all basis functions of the finite element.'''

def is_lagrange(self):

Choose a reason for hiding this comment

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

  • Is is_lagrange a good name? Maybe has_only_point_evaluation_dofs? (or something in between)
  • Should this be a cached_property?

Copy link
Author

Choose a reason for hiding this comment

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

@rckirby what do you think?

Copy link

Choose a reason for hiding this comment

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

KMV and Crouzeix-Raviart have only point wise evaluation dofs but aren't "Lagrange". If we want this function to return True on those, we should change the name. Connor's proposed name is verbose, but I can't think of a shorter one.

a cached_property seems reasonable, but would we break consistency with other such queries internally?

Choose a reason for hiding this comment

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

It is more pythonic to use properties for this sort of thing. For example UFL is trying to move away from argument-less methods (like the recent .topological_dimension() to .topological_dimension.

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.

4 participants