Skip to content

Commit 60a6a8e

Browse files
committed
Merge branch 'pbrubeck/submesh-comm-self' into pbrubeck/bddc-primal-vertices
2 parents 5e017f0 + ed2f1ab commit 60a6a8e

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

firedrake/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# the specific version, here we are more permissive. This is to catch the
44
# case where users don't update their PETSc for a really long time or
55
# accidentally install a too-new release that isn't yet supported.
6-
PETSC_SUPPORTED_VERSIONS = ">=3.25.0"
6+
PETSC_SUPPORTED_VERSIONS = ">=3.24.1"
77

88

99
def init_petsc():

firedrake/mesh.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4731,7 +4731,7 @@ def SubDomainData(geometric_expr):
47314731
return op2.Subset(m.cell_set, indices)
47324732

47334733

4734-
def Submesh(mesh, subdim, subdomain_id, label_name=None, name=None, ignore_halo=False, comm=None):
4734+
def Submesh(mesh, subdim, subdomain_id, label_name=None, name=None, ignore_halo=False, reorder=True, comm=None):
47354735
"""Construct a submesh from a given mesh.
47364736
47374737
Parameters
@@ -4747,7 +4747,9 @@ def Submesh(mesh, subdim, subdomain_id, label_name=None, name=None, ignore_halo=
47474747
name : str
47484748
Name of the submesh.
47494749
ignore_halo : bool
4750-
Excludes the halo from the submesh.
4750+
Whether to exclude the halo from the submesh.
4751+
reorder : bool
4752+
Whether to reorder the mesh entities.
47514753
comm : PETSc.Comm
47524754
An optional sub-communicator to define the submesh.
47534755
@@ -4836,7 +4838,7 @@ def Submesh(mesh, subdim, subdomain_id, label_name=None, name=None, ignore_halo=
48364838
submesh_parent=mesh,
48374839
name=name,
48384840
comm=subplex.comm,
4839-
reorder=False,
4841+
reorder=reorder,
48404842
distribution_parameters={
48414843
"partition": False,
48424844
"overlap_type": (DistributedMeshOverlapType.NONE, 0),

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121

2222
# Ensure that the PETSc getting linked against is compatible
23-
petsctools.init(version_spec=">=3.25.0")
23+
petsctools.init(version_spec=">=3.24.1")
2424
import petsc4py
2525

2626

tests/firedrake/submesh/test_submesh_comm.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88
def test_submesh_comm_self():
99
comm = PETSc.COMM_SELF
1010
nx = 4
11-
mesh = UnitSquareMesh(nx, nx, quadrilateral=True)
12-
tdim = mesh.topological_dimension
13-
submesh = Submesh(mesh, tdim, None, ignore_halo=True, comm=comm)
11+
mesh = UnitSquareMesh(nx, nx, quadrilateral=True, reorder=False)
12+
submesh = Submesh(mesh, mesh.topological_dimension, None, ignore_halo=True, comm=comm, reorder=False)
1413

1514
assert submesh.submesh_parent is mesh
1615
assert submesh.comm.size == 1

0 commit comments

Comments
 (0)