Skip to content

Commit f59d084

Browse files
committed
Add comment about issue
1 parent a52428d commit f59d084

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

src/io4dolfinx/checkpointing.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,15 @@ def partitioner(comm: MPI.Intracomm, n, m, topo):
442442
except TypeError:
443443
partitioner = dolfinx.cpp.mesh.create_cell_partitioner(ghost_mode)
444444

445+
# Should change to the commented code below when we require python
446+
# minimum version to be >=3.12 see https://github.com/python/cpython/pull/116198
447+
# import inspect
448+
# sig = inspect.signature(dolfinx.mesh.create_cell_partitioner)
449+
# part_kwargs = {}
450+
# if "max_facet_to_cell_links" in list(sig.parameters.keys()):
451+
# part_kwargs["max_facet_to_cell_links"] = max_facet_to_cell_links
452+
# partitioner = dolfinx.cpp.mesh.create_cell_partitioner(ghost_mode, **part_kwargs)
453+
445454
return dolfinx.mesh.create_mesh(
446455
comm,
447456
cells=dist_in_data.cells,

src/io4dolfinx/readers.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,23 @@ def read_mesh_from_legacy_h5(
199199
partitioner=None,
200200
)
201201

202+
# Should change to the commented code below when we require python
203+
# minimum version to be >=3.12 see https://github.com/python/cpython/pull/116198
204+
# import inspect
205+
# sig = inspect.signature(dolfinx.mesh.create_mesh)
206+
# kwargs: dict[str, int] = {}
207+
# if "max_facet_to_cell_links" in list(sig.parameters.keys()):
208+
# kwargs["max_facet_to_cell_links"] = max_facet_to_cell_links
209+
210+
# return dolfinx.mesh.create_mesh(
211+
# comm=MPI.COMM_WORLD,
212+
# cells=mesh_topology,
213+
# x=mesh_geometry,
214+
# e=domain,
215+
# partitioner=None,
216+
# **kwargs,
217+
# )
218+
202219

203220
def read_function_from_legacy_h5(
204221
filename: pathlib.Path,

0 commit comments

Comments
 (0)