Skip to content

Commit

Permalink
MeshSequence: rename
Browse files Browse the repository at this point in the history
  • Loading branch information
ksagiyam committed Jan 10, 2025
1 parent adf876c commit 217ee05
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions test/test_mixed_function_space_with_mixed_mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
10 changes: 5 additions & 5 deletions ufl/algorithms/apply_restrictions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand All @@ -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:
Expand All @@ -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")
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions ufl/algorithms/compute_form_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit 217ee05

Please sign in to comment.