Skip to content

Commit 868f5c8

Browse files
committed
Optional comm kwarg
1 parent 60a6a8e commit 868f5c8

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

firedrake/cython/dmcommon.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3820,7 +3820,7 @@ def submesh_create(PETSc.DM dm,
38203820
label_name,
38213821
PetscInt label_value,
38223822
PetscBool ignore_label_halo,
3823-
PETSc.Comm comm):
3823+
comm=None):
38243824
"""Create submesh.
38253825
38263826
Parameters
@@ -3835,7 +3835,7 @@ def submesh_create(PETSc.DM dm,
38353835
Value in the label
38363836
ignore_label_halo : bool
38373837
If labeled points in the halo are ignored.
3838-
comm: PETSc.Comm
3838+
comm : PETSc.Comm | None
38393839
An optional sub-communicator to define the submesh.
38403840
38413841
"""

firedrake/mg/mesh.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def MeshHierarchy(mesh, refinement_levels,
136136
# This is algorithmically guaranteed.
137137
dm_cell_type, = mesh.dm_cell_types
138138
tdim = mesh.topology_dm.getDimension()
139-
cdm = dmcommon.submesh_create(mesh.topology_dm, tdim, "celltype", dm_cell_type, True, None)
139+
cdm = dmcommon.submesh_create(mesh.topology_dm, tdim, "celltype", dm_cell_type, True)
140140
cdm.removeLabel("pyop2_core")
141141
cdm.removeLabel("pyop2_owned")
142142
cdm.removeLabel("pyop2_ghost")

firedrake/preconditioners/bddc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def local_mesh(mesh):
197197
return cache[key]
198198
except KeyError:
199199
if mesh.comm.size > 1:
200-
submesh = Submesh(mesh, mesh.topological_dimension, 0, ignore_halo=True, comm=PETSc.COMM_SELF)
200+
submesh = Submesh(mesh, mesh.topological_dimension, None, ignore_halo=True, comm=PETSc.COMM_SELF, reorder=False)
201201
else:
202202
submesh = None
203203
return cache.setdefault(key, submesh)

0 commit comments

Comments
 (0)