Skip to content

Commit b23d93d

Browse files
committed
Fix backend time input
1 parent 043e2f3 commit b23d93d

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

src/adios4dolfinx/backends/pyvista/backend.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ def get_default_backend_args(arguments: dict[str, Any] | None) -> dict[str, Any]
109109
def read_mesh_data(
110110
filename: Path | str,
111111
comm: MPI.Intracomm,
112-
time: str | float | None,
113-
read_from_partition: bool,
114-
backend_args: dict[str, Any] | None,
112+
time: str | float | None = None,
113+
read_from_partition: bool = False,
114+
backend_args: dict[str, Any] | None = None,
115115
) -> ReadMeshData:
116116
"""Read mesh data from file.
117117

src/adios4dolfinx/checkpointing.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,10 +401,15 @@ def read_mesh(
401401
check_file_exists(filename)
402402
backend_cls = get_backend(backend)
403403
backend_args = backend_cls.get_default_backend_args(backend_args)
404+
405+
# Let each backend handle what should be default behavior when reading mesh
406+
# with or without time stamp.
407+
kwarg = {} if time is None else {"time": time}
408+
404409
dist_in_data = backend_cls.read_mesh_data(
405410
filename,
406411
comm,
407-
time=time,
412+
**kwarg,
408413
read_from_partition=read_from_partition,
409414
backend_args=backend_args,
410415
)

0 commit comments

Comments
 (0)