Skip to content

Commit

Permalink
change default label to ""
Browse files Browse the repository at this point in the history
  • Loading branch information
emmarothwell1 committed Jan 29, 2024
1 parent bd96715 commit 698432d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ufl/functionspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def ufl_sub_spaces(self):
class BaseFunctionSpace(AbstractFunctionSpace, UFLObject):
"""Base function space."""

def __init__(self, domain, element, label=None):
def __init__(self, domain, element, label=""):
"""Initialise."""
if domain is None:
# DOLFIN hack
Expand All @@ -50,14 +50,15 @@ def __init__(self, domain, element, label=None):
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
self._ufl_element = element

def label(self):
"""Return label of boundary domains to differentiate restricted and unrestricted"""
return self.label
return self._label

def ufl_sub_spaces(self):
"""Return ufl sub spaces."""
Expand Down Expand Up @@ -149,7 +150,7 @@ class DualSpace(BaseFunctionSpace, UFLObject):
_primal = False
_dual = True

def __init__(self, domain, element, label=None):
def __init__(self, domain, element, label=""):
"""Initialise."""
BaseFunctionSpace.__init__(self, domain, element, label)

Expand Down

0 comments on commit 698432d

Please sign in to comment.