diff --git a/test_adjoint/test_mesh_seq.py b/test_adjoint/test_mesh_seq.py index 89ac6ce..58f74b8 100644 --- a/test_adjoint/test_mesh_seq.py +++ b/test_adjoint/test_mesh_seq.py @@ -431,11 +431,13 @@ def test_h_enrichment_space(self, family, degree, rank): mesh_seq_e = mesh_seq.get_enriched_mesh_seq( enrichment_method="h", num_enrichments=1 ) - element = mesh_seq.function_spaces[self.field][0].ufl_element() - enriched_element = mesh_seq_e.function_spaces[self.field][0].ufl_element() + fspace = mesh_seq.function_spaces[self.field][0] + element = fspace.ufl_element() + enriched_fspace = mesh_seq_e.function_spaces[self.field][0] + enriched_element = enriched_fspace.ufl_element() self.assertEqual(element.family(), enriched_element.family()) self.assertEqual(element.degree(), enriched_element.degree()) - self.assertEqual(element.value_shape, enriched_element.value_shape) + self.assertEqual(fspace.value_shape, enriched_fspace.value_shape) def test_p_enrichment_mesh(self): mesh_seq = self.go_mesh_seq(self.get_function_spaces_decorator("CG", 1, 0)) @@ -468,11 +470,13 @@ def test_p_enrichment_space(self, family, degree, rank, num_enrichments): mesh_seq_e = mesh_seq.get_enriched_mesh_seq( enrichment_method="p", num_enrichments=num_enrichments ) - element = mesh_seq.function_spaces[self.field][0].ufl_element() - enriched_element = mesh_seq_e.function_spaces[self.field][0].ufl_element() + fspace = mesh_seq.function_spaces[self.field][0] + element = fspace.ufl_element() + enriched_fspace = mesh_seq_e.function_spaces[self.field][0] + enriched_element = enriched_fspace.ufl_element() self.assertEqual(element.family(), enriched_element.family()) self.assertEqual(element.degree() + num_enrichments, enriched_element.degree()) - self.assertEqual(element.value_shape, enriched_element.value_shape) + self.assertEqual(fspace.value_shape, enriched_fspace.value_shape) @parameterized.expand( [