Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/create_legacy_checkpoint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
adios4dolfinx_version: "0.7.1"
runs-on: "ubuntu-latest"
container: ghcr.io/fenics/dolfinx/dolfinx:v0.7.3

steps:
- uses: actions/checkout@v6

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create_legacy_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
create-dolfin-data:
env:
data_dir: "legacy"

runs-on: "ubuntu-latest"
container: ghcr.io/scientificcomputing/fenics:2024-02-19
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_dolfinx_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
fail-fast: false
matrix:
tag: ["nightly", "stable"]

# Call the reusable workflow
uses: ./.github/workflows/test_workflow.yml
with:
dolfinx_tag: ${{ matrix.tag }}
dolfinx_tag: ${{ matrix.tag }}
2 changes: 1 addition & 1 deletion .github/workflows/test_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ jobs:
with:
name: code-coverage-report-${{ inputs.dolfinx_tag }}
path: htmlcov
if-no-files-found: error
if-no-files-found: error
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@ output/
*.xdmf
*.bp/
*.pvd
*.vtu
*.vtu
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
args: ['--maxkb=3000']
- id: check-docstring-first
- id: debug-statements
- id: check-toml
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: 'v0.15.16'
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ For scalability, the code uses [MPI Neighbourhood collectives](https://www.mpi-f
### Mesh IO (Import/Export)
Most meshing formats supports associating data with the nodes of the mesh (the mesh can be higher order) and the cells of the mesh. The node data can be read in as P-th order Lagrange functions (where P is the order of the grid), while the cell data can be read in as piecewise constant (DG-0) functions.

- [VTKHDF](./docs/backends/vtkhdf.rst): The new scalable format from VTK, called [VTKHDF](https://docs.vtk.org/en/latest/vtk_file_formats/vtkhdf_file_format/index.html) is supported by the `vtkhdf` backend.
- [VTKHDF](./docs/backends/vtkhdf.rst): The new scalable format from VTK, called [VTKHDF](https://docs.vtk.org/en/latest/vtk_file_formats/vtkhdf_file_format/index.html) is supported by the `vtkhdf` backend.
- [XDMF](./docs/backends/xdmf.rst) (eXtensible Model Data Format): `.xdmf`. The `xdmf` backend supports the `HDF5` encoding, to ensure performance in parallel.
- [PyVista](./docs/backends/pyvista.rst) (IO backend is meshio): The [pyvista](https://pyvista.org/) backend uses {py:func}`pyvista.read` to read in meshes, point data and cell data. `pyvista` relies on [meshio](https://github.com/nschloe/meshio) for most reading operations (including the XDMF ascii format).

Expand Down Expand Up @@ -107,4 +107,4 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduc


## LICENSE
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
4 changes: 2 additions & 2 deletions _toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ parts:
- file: "docs/migration_guide"
- file: "docs/testing.md"
- file: "docs/reading_legacy_data"

- caption: Introduction to IPyParallel
chapters:
- file: "docs/ipyparallel_intro"
Expand Down Expand Up @@ -39,4 +39,4 @@ parts:

- caption: Contributing
chapters:
- file: "CONTRIBUTING"
- file: "CONTRIBUTING"
2 changes: 1 addition & 1 deletion build-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ scikit-build-core[pyproject]>=0.11.0
nanobind>=1.3.2
setuptools>=77.0.3
packaging>=24.2
pkgconfig
pkgconfig
2 changes: 1 addition & 1 deletion docs/adding_backend.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@ def write_mesh(filename: Path | str, comm: MPI.Intracomm, mesh: MeshData,
pass

# ... Implement all other methods defined in IOBackend ...
```
```
2 changes: 1 addition & 1 deletion docs/backends/adios2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ Therefore `ADIOS2` should not be install through PYPI/pip, but has to be install

.. automodule:: io4dolfinx.backends.adios2.backend
:members:
:exclude-members: read_point_data
:exclude-members: read_point_data
2 changes: 1 addition & 1 deletion docs/backends/h5py.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ Note that this code block does not install DOLFINx, it just illustrates how to g

.. automodule:: io4dolfinx.backends.h5py.backend
:members:
:exclude-members: read_point_data
:exclude-members: read_point_data
2 changes: 1 addition & 1 deletion docs/backends/pyvista.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ PyVista-backend

.. automodule:: io4dolfinx.backends.pyvista.backend
:members:
:exclude-members: read_attributes, read_timestamps, write_attributes, write_mesh, write_meshtags, read_meshtags_data, read_dofmap, read_dofs, read_cell_perms, write_function, read_legacy_mesh, snapshot_checkpoint, read_hdf5_array
:exclude-members: read_attributes, read_timestamps, write_attributes, write_mesh, write_meshtags, read_meshtags_data, read_dofmap, read_dofs, read_cell_perms, write_function, read_legacy_mesh, snapshot_checkpoint, read_hdf5_array
2 changes: 1 addition & 1 deletion docs/backends/vtkhdf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ See that backend for detailed installation instructions.

.. automodule:: io4dolfinx.backends.vtkhdf.backend
:members:
:exclude-members: read_attributes, read_timestamps, write_attributes, write_mesh, write_meshtags, read_meshtags_data, read_dofmap, read_dofs, read_cell_perms, write_function, read_legacy_mesh, snapshot_checkpoint, read_hdf5_array
:exclude-members: read_attributes, read_timestamps, write_attributes, write_mesh, write_meshtags, read_meshtags_data, read_dofmap, read_dofs, read_cell_perms, write_function, read_legacy_mesh, snapshot_checkpoint, read_hdf5_array
2 changes: 1 addition & 1 deletion docs/backends/xdmf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ See that backend for detailed installation instructions.

.. automodule:: io4dolfinx.backends.xdmf.backend
:members:
:exclude-members: read_attributes, read_timestamps, write_attributes, write_mesh, write_meshtags, read_meshtags_data, read_dofmap, read_dofs, read_cell_perms, write_function, read_legacy_mesh, snapshot_checkpoint, read_hdf5_array
:exclude-members: read_attributes, read_timestamps, write_attributes, write_mesh, write_meshtags, read_meshtags_data, read_dofmap, read_dofs, read_cell_perms, write_function, read_legacy_mesh, snapshot_checkpoint, read_hdf5_array
2 changes: 0 additions & 2 deletions docs/migration_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,3 @@ io4dolfinx.write_function("solution.bp", u, time=0.0, backend="h5py")
```
````
`````


2 changes: 0 additions & 2 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,5 +171,3 @@ the `backend` argument to most functions.


5. **`xdmf`**: Basic support for reading XDMF data.


2 changes: 1 addition & 1 deletion docs/reading_legacy_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ filename = "legacy_data.h5"
mesh = io4dolfinx.read_mesh_from_legacy_h5(filename, comm, group="/mesh")
```

#### Create the appropriate FunctionSpace
#### Create the appropriate FunctionSpace
You must know the element family and degree used in the legacy simulation
```python
V = dolfinx.fem.functionspace(mesh, ("Lagrange", 1))
Expand Down
2 changes: 1 addition & 1 deletion docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ To ensure broad support, specific workflows test against different configuration
### 3. Documentation (`build_docs.yml`)

Ensures the documentation builds correctly with `jupyter-book` on every push and
pull request, preventing documentation regressions.
pull request, preventing documentation regressions.
12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name = "io4dolfinx"
version = "1.2.0"
description = "Checkpointing functionality for DOLFINx meshes/functions with ADIOS2"
authors = [
{ name = "Jørgen S. Dokken", email = "dokken@simula.no" },
{ name = "Jørgen S. Dokken", email = "dokken@simula.no" },
{ name = "Henrik N.T. Finsberg", email = "henriknf@simula.no" }
]
license = { file = "LICENSE" }
Expand All @@ -15,11 +15,11 @@ dependencies = ["fenics-dolfinx>=0.10.0", "packaging"]

[project.optional-dependencies]
test = [
"pytest",
"coverage",
"ipyparallel",
"io4dolfinx[h5py]",
"io4dolfinx[pyvista]",
"pytest",
"coverage",
"ipyparallel",
"io4dolfinx[h5py]",
"io4dolfinx[pyvista]",
"io4dolfinx[xdmf]"
]
dev = ["pdbpp", "ipython", "mypy", "ruff"]
Expand Down
7 changes: 4 additions & 3 deletions src/io4dolfinx/comm_helpers.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
"""
Helpers for sending and receiving values for checkpointing
"""

from __future__ import annotations

from mpi4py import MPI
Expand All @@ -13,9 +17,6 @@
"send_dofs_and_recv_values",
"numpy_to_mpi",
]
"""
Helpers for sending and receiving values for checkpointing
"""

numpy_to_mpi = {
np.float64: MPI.DOUBLE,
Expand Down
2 changes: 1 addition & 1 deletion src/io4dolfinx/structures.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""Internal library classes for storing mesh and function data"""
# Copyright (C) 2024 Jørgen Schartum Dokken
#
# This file is part of io4dolfinx
Expand All @@ -12,7 +13,6 @@
import numpy.typing as npt
from dolfinx.graph import AdjacencyList

"""Internal library classes for storing mesh and function data"""
__all__ = ["MeshData", "FunctionData", "ReadMeshData", "MeshTagsData"]


Expand Down