Skip to content

Commit

Permalink
Return reference_value_shape as default
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrubeck committed Nov 14, 2024
1 parent 3be472e commit 769c918
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions ufl/pullback.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ def physical_value_shape(self, element, domain) -> typing.Tuple[int, ...]:
Returns:
The value shape when the pull back is applied to the given element
"""
raise NotImplementedError()
return element.reference_value_shape


class CustomPullback(AbstractPullback):
Expand Down Expand Up @@ -598,9 +598,7 @@ def physical_value_shape(self, element, domain) -> typing.Tuple[int, ...]:
Returns:
The value shape when the pull back is applied to the given element
"""
if element.reference_value_shape == ():
return ()
raise NotImplementedError()
return element.reference_value_shape


class UndefinedPullback(AbstractPullback):
Expand Down Expand Up @@ -628,7 +626,7 @@ def physical_value_shape(self, element, domain) -> typing.Tuple[int, ...]:
Returns:
The value shape when the pull back is applied to the given element
"""
raise NotImplementedError()
return element.reference_value_shape


identity_pullback = IdentityPullback()
Expand Down

0 comments on commit 769c918

Please sign in to comment.