diff --git a/ufl/functionspace.py b/ufl/functionspace.py index ef57e740b..dc449645f 100644 --- a/ufl/functionspace.py +++ b/ufl/functionspace.py @@ -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 @@ -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.""" @@ -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)