Skip to content

Commit

Permalink
Add ghost_mode shared facet to demos, resolves: #2556
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgensd committed Mar 7, 2023
1 parent f39714c commit 54b04c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion python/demo/demo_axis/demo_axis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 3 additions & 1 deletion python/demo/demo_pml/demo_pml.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 54b04c1

Please sign in to comment.