From c0ad1449e280206b72cb18958a742d1d33b7ec38 Mon Sep 17 00:00:00 2001 From: ksagiyam Date: Thu, 5 Dec 2024 01:23:43 +0000 Subject: [PATCH] k --- firedrake/functionspaceimpl.py | 18 +----------------- .../test_restricted_function_space.py | 7 +------ 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/firedrake/functionspaceimpl.py b/firedrake/functionspaceimpl.py index 6ee00ea610..89bb2bc53a 100644 --- a/firedrake/functionspaceimpl.py +++ b/firedrake/functionspaceimpl.py @@ -889,23 +889,7 @@ def __init__(self, function_space, name=None, boundary_set=frozenset()): [str(i) for i in self.boundary_set]))) def set_shared_data(self): - if False:#self._mesh.cell_set._extruded: - sdata = get_shared_data(self._mesh, self.ufl_element(), None) - finat_element = create_element(self.ufl_element()) - real_tensorproduct = eutils.is_real_tensor_product_element(finat_element) - entity_dofs = finat_element.entity_dofs() - nodes_per_entity = tuple(self._mesh.make_dofs_per_plex_entity(entity_dofs)) - key = (nodes_per_entity, real_tensorproduct, self.boundary_set) - node_set = get_node_set(self._mesh, key) - # Get constrained global section. - gsec = node_set.halo.dm.getGlobalSection() - # Set unconstrained local section. - node_set.halo.dm.setLocalSection(sdata.node_set.halo.dm.getLocalSection()) - # Set constrained global section before anyone calls dm.getGlobalSection(). - node_set.halo.dm.setGlobalSection(gsec) - sdata.node_set = node_set - else: - sdata = get_shared_data(self._mesh, self.ufl_element(), self.boundary_set) + sdata = get_shared_data(self._mesh, self.ufl_element(), self.boundary_set) self._shared_data = sdata self.node_set = sdata.node_set r"""A :class:`pyop2.types.set.Set` representing the function space nodes.""" diff --git a/tests/firedrake/regression/test_restricted_function_space.py b/tests/firedrake/regression/test_restricted_function_space.py index afc20e1b99..b6f167573a 100644 --- a/tests/firedrake/regression/test_restricted_function_space.py +++ b/tests/firedrake/regression/test_restricted_function_space.py @@ -249,11 +249,6 @@ def test_restricted_function_space_extrusion(): extm = ExtrudedMesh(mesh, 1) V = FunctionSpace(extm, "CG", 2) V_res = RestrictedFunctionSpace(V, boundary_set=["bottom"]) - #mesh._dm_renumbering.view() - #mesh.topology_dm.viewFromOptions("-dm_view") - #V_res._shared_data.node_set.halo.dm.getLocalSection().view() - #V_res._shared_data.node_set.halo.dm.getGlobalSection().view() - #V._shared_data.node_set.halo.dm.getGlobalSection().view() lgmap = V_res.topological.local_to_global_map(None) if mesh.comm.rank == 0: lgmap_expected = [-1, 0, 1, -1, 2, 3, -1, 8, 9, -1, 4, 5, -1, 6, 7] @@ -282,4 +277,4 @@ def test_restricted_function_space_extrusion(): bc = DirichletBC(V_res, 0., "bottom") sol = Function(V_res) solve(a == L, sol, bcs=[bc]) - assert assemble(inner(sol - exact, sol - exact) * dx) ** 0.5 < 1.e-14 + assert assemble(inner(sol - exact, sol - exact) * dx) ** 0.5 < 1.e-15