diff --git a/test/test_mixed_function_space_with_mixed_mesh.py b/test/test_mixed_function_space_with_mixed_mesh.py index 0ab07982e..f336fb903 100644 --- a/test/test_mixed_function_space_with_mixed_mesh.py +++ b/test/test_mixed_function_space_with_mixed_mesh.py @@ -80,7 +80,7 @@ def test_mixed_function_space_with_mixed_mesh_facet(): mesh0 = Mesh(FiniteElement("Lagrange", cell, 1, (2, ), identity_pullback, H1), ufl_id=100) mesh1 = Mesh(FiniteElement("Lagrange", cell, 1, (2, ), identity_pullback, H1), ufl_id=101) mesh2 = Mesh(FiniteElement("Lagrange", cell, 1, (2, ), identity_pullback, H1), ufl_id=102) - domain = MixedMesh([mesh0, mesh1, mesh2]) + domain = MeshSequence([mesh0, mesh1, mesh2]) V = FunctionSpace(domain, elem) V1 = FunctionSpace(mesh1, elem1) V2 = FunctionSpace(mesh2, elem2) @@ -139,7 +139,7 @@ def test_mixed_function_space_with_mixed_mesh_raise(): mesh0 = Mesh(FiniteElement("Lagrange", cell, 1, (2, ), identity_pullback, H1), ufl_id=100) mesh1 = Mesh(FiniteElement("Lagrange", cell, 1, (2, ), identity_pullback, H1), ufl_id=101) mesh2 = Mesh(FiniteElement("Lagrange", cell, 1, (2, ), identity_pullback, H1), ufl_id=102) - domain = MixedMesh([mesh0, mesh1, mesh2]) + domain = MeshSequence([mesh0, mesh1, mesh2]) V = FunctionSpace(domain, elem) f = Coefficient(V, count=1000) g = Coefficient(V, count=2000) diff --git a/ufl/algorithms/apply_restrictions.py b/ufl/algorithms/apply_restrictions.py index f1bdf2018..42dc0070a 100644 --- a/ufl/algorithms/apply_restrictions.py +++ b/ufl/algorithms/apply_restrictions.py @@ -15,7 +15,7 @@ from ufl.classes import Restricted from ufl.corealg.map_dag import map_expr_dag from ufl.corealg.multifunction import MultiFunction -from ufl.domain import extract_unique_domain, MixedMesh +from ufl.domain import MeshSequence, extract_unique_domain from ufl.form import Form from ufl.measure import integral_type_to_measure_name from ufl.sobolevspace import H1 @@ -69,7 +69,7 @@ def _require_restriction(self, o): return o(self.current_restriction) if self.default_restriction is not None: domain = extract_unique_domain(o, expand_mixed_mesh=False) - if isinstance(domain, MixedMesh): + if isinstance(domain, MeshSequence): raise RuntimeError(f"Not expecting a terminal object on a mixed mesh at this stage: found {repr(o)}") if isinstance(self.default_restriction, dict): r = self.default_restriction[domain] @@ -92,7 +92,7 @@ def _default_restricted(self, o): return o(r) if self.default_restriction is not None: domain = extract_unique_domain(o, expand_mixed_mesh=False) - if isinstance(domain, MixedMesh): + if isinstance(domain, MeshSequence): raise RuntimeError(f"Not expecting a terminal object on a mixed mesh at this stage: found {repr(o)}") if isinstance(self.default_restriction, dict): if domain not in self.default_restriction: @@ -117,7 +117,7 @@ def _opposite(self, o): """ if isinstance(self.default_restriction, dict): domain = extract_unique_domain(o, expand_mixed_mesh=False) - if isinstance(domain, MixedMesh): + if isinstance(domain, MeshSequence): raise RuntimeError(f"Not expecting a terminal object on a mixed mesh at this stage: found {repr(o)}") if domain not in self.default_restriction: raise RuntimeError(f"Integral type on {domain} not known") @@ -322,7 +322,7 @@ def _modifier(self, o): else: raise ValueError("Unexpected type %s object %s." % (type(t), repr(t))) domain = extract_unique_domain(t, expand_mixed_mesh=False) - if isinstance(domain, MixedMesh): + if isinstance(domain, MeshSequence): raise RuntimeError(f"Not expecting a terminal object on a mixed mesh at this stage: found {repr(t)}") if domain is not None: if domain not in self._domain_restriction_map: diff --git a/ufl/algorithms/compute_form_data.py b/ufl/algorithms/compute_form_data.py index 44116c8a5..51581ed3e 100644 --- a/ufl/algorithms/compute_form_data.py +++ b/ufl/algorithms/compute_form_data.py @@ -454,11 +454,11 @@ def compute_form_data( c = self.function_replace_map[o] elem = c.ufl_element() mesh = extract_unique_domain(c, expand_mixed_mesh=False) - # Use MixedMesh as an indicator for MixedElement as + # Use MeshSequence as an indicator for MixedElement as # the followings would be ambiguous: # -- elem.num_sub_elements > 1 # -- isinstance(elem.pullback, MixedPullback) - if isinstance(mesh, MixedMesh) and o in do_split_coefficients: + if isinstance(mesh, MeshSequence) and o in do_split_coefficients: assert len(mesh) == len(elem.sub_elements) coefficient_split[c] = [Coefficient(FunctionSpace(m, e)) for m, e in zip(mesh, elem.sub_elements)]