diff --git a/python/demo/demo_axis/demo_axis.py b/python/demo/demo_axis/demo_axis.py index b7d558eb322..a2ea4451bbb 100644 --- a/python/demo/demo_axis/demo_axis.py +++ b/python/demo/demo_axis/demo_axis.py @@ -340,7 +340,9 @@ def create_eps_mu(pml, rho, eps_bkg, mu_bkg): au_tag, bkg_tag, pml_tag, scatt_tag) model = MPI.COMM_WORLD.bcast(model, root=0) -msh, cell_tags, facet_tags = io.gmshio.model_to_mesh(model, MPI.COMM_WORLD, 0, gdim=2) +mesh_partitioner = mesh.create_cell_partitioner(mesh.GhostMode.shared_facet) +msh, cell_tags, facet_tags = io.gmshio.model_to_mesh(model, MPI.COMM_WORLD, 0, gdim=2, + partitioner=mesh_partitioner) gmsh.finalize() MPI.COMM_WORLD.barrier() diff --git a/python/demo/demo_pml/demo_pml.py b/python/demo/demo_pml/demo_pml.py index f6a7bb1536c..7dff951f159 100644 --- a/python/demo/demo_pml/demo_pml.py +++ b/python/demo/demo_pml/demo_pml.py @@ -176,7 +176,9 @@ def pml_coordinates(x: ufl.indexed.Indexed, alpha: float, k0: complex, l_dom: fl in_wire_size, on_wire_size, scatt_size, pml_size, au_tag, bkg_tag, scatt_tag, pml_tag) model = MPI.COMM_WORLD.bcast(model, root=0) -msh, cell_tags, facet_tags = gmshio.model_to_mesh(model, MPI.COMM_WORLD, 0, gdim=2) +mesh_partitioner = mesh.create_cell_partitioner(mesh.GhostMode.shared_facet) +msh, cell_tags, facet_tags = gmshio.model_to_mesh(model, MPI.COMM_WORLD, 0, gdim=2, + partitioner=mesh_partitioner) gmsh.finalize() MPI.COMM_WORLD.barrier()