From 749074676257a5b3b65f7422359954923fbf95ce Mon Sep 17 00:00:00 2001 From: Umberto Zerbinati Date: Wed, 24 Apr 2024 20:13:46 +0100 Subject: [PATCH] Distributed pickled objects only if its needed. #TODO: Fix this issue in parallel ... Signed-off-by: Umberto Zerbinati --- ngsPETSc/utils/firedrake.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ngsPETSc/utils/firedrake.py b/ngsPETSc/utils/firedrake.py index 2645e33..c94f58d 100644 --- a/ngsPETSc/utils/firedrake.py +++ b/ngsPETSc/utils/firedrake.py @@ -99,7 +99,8 @@ def curveField(self, order, tol=1e-8): element = low_order_element.reconstruct(degree=order) space = fd.VectorFunctionSpace(self, fd.BrokenElement(element)) newFunctionCoordinates = fd.assemble(interpolate(self.coordinates, space)) - self.netgen_mesh = self.comm.bcast(self.netgen_mesh, root=0) + if self.comm.size > 1: + self.netgen_mesh = self.comm.bcast(self.netgen_mesh, root=0) #Computing reference points using fiat fiat_element = newFunctionCoordinates.function_space().finat_element.fiat_equivalent entity_ids = fiat_element.entity_dofs()