diff --git a/ufl/domain.py b/ufl/domain.py index 8427d11f7..bcb95b217 100644 --- a/ufl/domain.py +++ b/ufl/domain.py @@ -160,7 +160,7 @@ def meshes(self): def iterable_like(self, element): """Return iterable object that is iterable like ``element``.""" - return iter(self for _ in element.sub_elements) + return iter(self for _ in range(element.num_sub_elements)) def can_make_function_space(self, element): """Check whether this mesh can make a function space with ``element``."""