From ebec340e00336f78c7df97e3afbfbdd4e98db71a Mon Sep 17 00:00:00 2001 From: Jack Betteridge Date: Fri, 14 Jun 2024 14:12:44 +0100 Subject: [PATCH] Add comm to createFromTopology method --- ngsPETSc/utils/firedrake/meshes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ngsPETSc/utils/firedrake/meshes.py b/ngsPETSc/utils/firedrake/meshes.py index c07cdde..ff4716e 100644 --- a/ngsPETSc/utils/firedrake/meshes.py +++ b/ngsPETSc/utils/firedrake/meshes.py @@ -228,7 +228,7 @@ def __init__(self, mesh, netgen_flags, user_comm=fd.COMM_WORLD): else: raise ValueError("Mesh format not recognised.") - def createFromTopology(self, topology, name): + def createFromTopology(self, topology, name, comm): ''' Internal method to construct a mesh from a mesh topology, copied from Firedrake. @@ -242,7 +242,7 @@ def createFromTopology(self, topology, name): cell = cell.reconstruct(geometric_dimension=geometric_dim) element = fd.VectorElement("Lagrange", cell, 1) # Create mesh object - self.firedrakeMesh = fd.MeshGeometry.__new__(fd.MeshGeometry, element) + self.firedrakeMesh = fd.MeshGeometry.__new__(fd.MeshGeometry, element, comm) self.firedrakeMesh._init_topology(topology) self.firedrakeMesh.name = name # Adding Netgen mesh and inverse sfBC as attributes