Skip to content

Commit 07ecb4b

Browse files
committed
Simplify serial parallelization
1 parent 4ab2a53 commit 07ecb4b

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

tests/test_interpolation_matrix.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,17 @@
1010

1111
from fenicsx_ii import Circle, NaiveTrace, create_interpolation_matrix
1212

13-
ghost_modes: list[dolfinx.mesh.GhostMode] = [
14-
dolfinx.mesh.GhostMode.none,
15-
dolfinx.mesh.GhostMode.shared_facet,
16-
]
13+
# Only run ghost mode parametrization in parallel
14+
if MPI.COMM_WORLD.size == 1:
15+
ghost_modes: list[dolfinx.mesh.GhostMode] = [
16+
dolfinx.mesh.GhostMode.none,
17+
]
18+
else:
19+
ghost_modes: list[dolfinx.mesh.GhostMode] = [
20+
dolfinx.mesh.GhostMode.none,
21+
dolfinx.mesh.GhostMode.shared_facet,
22+
]
23+
1724
three_dimensional_cell_types: list[dolfinx.mesh.CellType] = [
1825
dolfinx.mesh.CellType.tetrahedron,
1926
dolfinx.mesh.CellType.hexahedron,

0 commit comments

Comments
 (0)