Skip to content

Commit

Permalink
remove changes I didn't mean to commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mscroggs committed Jul 9, 2024
1 parent 6df4957 commit 127bfc9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions ufl/functionspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@ class BaseFunctionSpace(AbstractFunctionSpace, UFLObject):

def __init__(self, domain, element, label=""):
"""Initialise."""
if domain is None:
# DOLFIN hack
# TODO: Is anything expected from element.cell in this case?
pass
else:
try:
domain_cell = domain.ufl_cell()
except AttributeError:
raise ValueError(
"Expected non-abstract domain for initalization of function space."
)
else:
if element.cell != domain_cell:
raise ValueError("Non-matching cell of finite element and domain.")
AbstractFunctionSpace.__init__(self)
self._label = label
self._ufl_domain = domain
Expand Down

0 comments on commit 127bfc9

Please sign in to comment.