From 5b30b4a39eb2b3359b0eca81b3872a4394347515 Mon Sep 17 00:00:00 2001 From: "Jack S. Hale" Date: Mon, 14 Oct 2024 10:55:54 +0200 Subject: [PATCH] Fix for 0.10.0 - shouldn't determine_point_ownership be wrapped? --- demo/demo_nonlinear-naghdi-clamped-semicylinder.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/demo/demo_nonlinear-naghdi-clamped-semicylinder.py b/demo/demo_nonlinear-naghdi-clamped-semicylinder.py index 574dc53..9ccc1e1 100644 --- a/demo/demo_nonlinear-naghdi-clamped-semicylinder.py +++ b/demo/demo_nonlinear-naghdi-clamped-semicylinder.py @@ -545,10 +545,12 @@ def compute_cell_contributions(V, points): at that point""" # Determine what process owns a point and what cells it lies within mesh = V.mesh - _, _, owning_points, cells = dolfinx.cpp.geometry.determine_point_ownership( + point_ownership_data = dolfinx.cpp.geometry.determine_point_ownership( mesh._cpp_object, points, 1e-6 ) - owning_points = np.asarray(owning_points).reshape(-1, 3) + + owning_points = np.asarray(point_ownership_data.dest_points).reshape(-1, 3) + cells = point_ownership_data.dest_cells # Pull owning points back to reference cell mesh_nodes = mesh.geometry.x @@ -618,7 +620,7 @@ def F(self, x: PETSc.Vec, b: PETSc.Vec) -> None: dofs, basis_value * self.PS, addv=PETSc.InsertMode.ADD_VALUES ) - apply_lifting(b, [self._a], bcs=[self.bcs], x0=[x], scale=-1.0) + apply_lifting(b, [self._a], bcs=[self.bcs], x0=[x], alpha=-1.0) b.ghostUpdate(addv=PETSc.InsertMode.ADD, mode=PETSc.ScatterMode.REVERSE) set_bc(b, self.bcs, x, -1.0)