Skip to content

Commit 9595062

Browse files
committed
Rename package
1 parent 925bcc5 commit 9595062

26 files changed

Lines changed: 199 additions & 199 deletions

.coveragerc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[run]
22
parallel = true
3-
source = adios4dolfinx
3+
source = io4dolfinx
44

55
[html]
66
directory= htmlcov

.github/workflows/create_legacy_checkpoint.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Generate adios4dolfinx legacy data
1+
name: Generate io4dolfinx legacy data
22

33
on:
44
workflow_call:
@@ -12,15 +12,15 @@ jobs:
1212
create-adios-data:
1313
env:
1414
data_dir: "legacy_checkpoint"
15-
adios4dolfinx_version: "0.7.1"
15+
io4dolfinx_version: "0.7.1"
1616
runs-on: "ubuntu-latest"
1717
container: ghcr.io/fenics/dolfinx/dolfinx:v0.7.3
1818

1919
steps:
2020
- uses: actions/checkout@v6
2121

22-
- name: Install legacy version of adios4dolfinx
23-
run: python3 -m pip install adios4dolfinx==${adios4dolfinx_version}
22+
- name: Install legacy version of io4dolfinx
23+
run: python3 -m pip install io4dolfinx==${io4dolfinx_version}
2424

2525
- name: Create datasets
2626
run: python3 ./tests/create_legacy_checkpoint.py --output-dir=$data_dir

docs/backends/adios2.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ADIOS2-backend
22
--------------
33

4-
.. automodule:: adios4dolfinx.backends.adios2.backend
4+
.. automodule:: io4dolfinx.backends.adios2.backend
55
:members:
66
:exclude-members: read_point_data

docs/backends/h5py.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
H5PY-backend
22
-------------
33

4-
.. automodule:: adios4dolfinx.backends.h5py.backend
4+
.. automodule:: io4dolfinx.backends.h5py.backend
55
:members:
66
:exclude-members: read_point_data

docs/backends/pyvista.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PyvVsta-backend
22
----------------
33

4-
.. automodule:: adios4dolfinx.backends.pyvista.backend
4+
.. automodule:: io4dolfinx.backends.pyvista.backend
55
:members:
66
: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

docs/backends/xdmf.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
XDMF-backend
22
-------------
33

4-
.. automodule:: adios4dolfinx.backends.xdmf.backend
4+
.. automodule:: io4dolfinx.backends.xdmf.backend
55
:members:
66
: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

docs/original_checkpoint.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# # Checkpoint on input mesh
22
# As we have discussed earlier, one can choose to store function data in a way that
3-
# is N-to-M compatible by using {py:func}`adios4dolfinx.write_checkpoint`.
3+
# is N-to-M compatible by using {py:func}`io4dolfinx.write_checkpoint`.
44
# This stores the distributed mesh in it's current (partitioned) ordering, and does
55
# use the original input data ordering for the cells and connectivity.
66
# This means that you cannot use your original mesh (from `.xdmf` files) or mesh tags
@@ -10,7 +10,7 @@
1010
# An optional way of store an N-to-M checkpoint is to store the function data in the same
1111
# ordering as the mesh. The write operation will be more expensive, as it requires data
1212
# communication to ensure contiguous data being written to the checkpoint.
13-
# The method is exposed as {py:func}`adios4dolfinx.write_function_on_input_mesh`.
13+
# The method is exposed as {py:func}`io4dolfinx.write_function_on_input_mesh`.
1414
# Below we will demonstrate this method.
1515

1616
# +
@@ -65,18 +65,18 @@ def write_function(
6565

6666
import dolfinx
6767

68-
import adios4dolfinx
68+
import io4dolfinx
6969

7070
with dolfinx.io.XDMFFile(MPI.COMM_WORLD, mesh_filename, "r") as xdmf:
7171
mesh = xdmf.read_mesh()
7272
V = dolfinx.fem.functionspace(mesh, element)
7373
u = dolfinx.fem.Function(V)
7474
u.interpolate(f)
7575

76-
adios4dolfinx.write_function_on_input_mesh(
76+
io4dolfinx.write_function_on_input_mesh(
7777
function_filename.with_suffix(".bp"),
7878
u,
79-
mode=adios4dolfinx.FileMode.write,
79+
mode=io4dolfinx.FileMode.write,
8080
time=0.0,
8181
name="Output",
8282
)
@@ -112,13 +112,13 @@ def verify_checkpoint(
112112
import dolfinx
113113
import numpy as np
114114

115-
import adios4dolfinx
115+
import io4dolfinx
116116

117117
with dolfinx.io.XDMFFile(MPI.COMM_WORLD, mesh_filename, "r") as xdmf:
118118
in_mesh = xdmf.read_mesh()
119119
V = dolfinx.fem.functionspace(in_mesh, element)
120120
u_in = dolfinx.fem.Function(V)
121-
adios4dolfinx.read_function(function_filename.with_suffix(".bp"), u_in, time=0.0, name="Output")
121+
io4dolfinx.read_function(function_filename.with_suffix(".bp"), u_in, time=0.0, name="Output")
122122

123123
# Compute exact interpolation
124124
u_ex = dolfinx.fem.Function(V)

docs/snapshot_checkpoint.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# does not require extra RAM.
1313

1414
# In this example, we will demonstrate how to write a
15-
# {py:func}`snapshot checkpoint<adios4dolfinx.snapshot_checkpoint>` to disk.
15+
# {py:func}`snapshot checkpoint<io4dolfinx.snapshot_checkpoint>` to disk.
1616

1717
# First we define a {py:class}`function<dolfinx.fem.Function>` `f` that we want to represent in
1818
# the {py:class}`function space<dolfinx.fem.FunctionSpace>`.
@@ -33,7 +33,7 @@ def f(x):
3333
# -
3434

3535
# Next, we create a mesh and an appropriate function space and read and write from file.
36-
# Note that for both these operations, we use {py:func}`adios4dolfinx.snapshot_checkpoint`,
36+
# Note that for both these operations, we use {py:func}`io4dolfinx.snapshot_checkpoint`,
3737
# with different read and write modes.
3838

3939

@@ -43,20 +43,20 @@ def read_write_snapshot(filename: Path):
4343
import dolfinx
4444
import numpy as np
4545

46-
import adios4dolfinx
46+
import io4dolfinx
4747

4848
mesh = dolfinx.mesh.create_unit_cube(MPI.COMM_WORLD, 3, 7, 4)
4949
V = dolfinx.fem.functionspace(mesh, ("Lagrange", 5))
5050
u = dolfinx.fem.Function(V)
5151
u.interpolate(f)
5252
u.name = "Current_solution"
5353
# Next, we store the solution to file
54-
adios4dolfinx.snapshot_checkpoint(u, filename, adios4dolfinx.FileMode.write)
54+
io4dolfinx.snapshot_checkpoint(u, filename, io4dolfinx.FileMode.write)
5555

5656
# Next, we create a new function and load the solution into it
5757
u_new = dolfinx.fem.Function(V)
5858
u_new.name = "Read_solution"
59-
adios4dolfinx.snapshot_checkpoint(u_new, filename, adios4dolfinx.FileMode.read)
59+
io4dolfinx.snapshot_checkpoint(u_new, filename, io4dolfinx.FileMode.read)
6060

6161
# Next, we verify that the solution is correct
6262
np.testing.assert_allclose(u_new.x.array, u.x.array, atol=np.finfo(float).eps)

docs/time_dependent_mesh.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import ipyparallel as ipp
1818

19-
import adios4dolfinx
19+
import io4dolfinx
2020

2121

2222
def compute_volume(mesh, time_stamp):
@@ -39,7 +39,7 @@ def write_meshes(filename: Path):
3939
import dolfinx
4040
import numpy as np
4141

42-
import adios4dolfinx
42+
import io4dolfinx
4343

4444
# Create a unit cube
4545
mesh = dolfinx.mesh.create_unit_cube(
@@ -52,15 +52,15 @@ def write_meshes(filename: Path):
5252
)
5353

5454
# Write mesh to file, associated with time stamp 1.5
55-
adios4dolfinx.write_mesh(filename, mesh, time=1.5)
55+
io4dolfinx.write_mesh(filename, mesh, time=1.5)
5656
compute_volume(mesh, 1.5)
5757
mesh.geometry.x[:, 0] += 0.1 * mesh.geometry.x[:, 0]
5858
mesh.geometry.x[:, 1] += 0.3 * mesh.geometry.x[:, 1] * np.sin(mesh.geometry.x[:, 2])
5959
compute_volume(mesh, 3.3)
6060
# Write mesh to file, associated with time stamp 3.3
6161
# Note that we set the mode to append, as we have already created the file
6262
# and we do not want to overwrite the existing data
63-
adios4dolfinx.write_mesh(filename, mesh, time=3.3, mode=adios4dolfinx.FileMode.append)
63+
io4dolfinx.write_mesh(filename, mesh, time=3.3, mode=io4dolfinx.FileMode.append)
6464

6565

6666
# -
@@ -82,14 +82,14 @@ def write_meshes(filename: Path):
8282

8383
# # Reading a time dependent mesh
8484
# The only thing we need to do to read the mesh is to send in the associated time stamp,
85-
# which we do by adding `time=time_stamp` when calling {py:func}`adios4dolfinx.read_mesh`.
85+
# which we do by adding `time=time_stamp` when calling {py:func}`io4dolfinx.read_mesh`.
8686

87-
second_mesh = adios4dolfinx.read_mesh(
87+
second_mesh = io4dolfinx.read_mesh(
8888
mesh_file, comm=MPI.COMM_WORLD, backend="adios2", backend_args={"engine": "BP4"}, time=3.3
8989
)
9090
compute_volume(second_mesh, 3.3)
9191

92-
first_mesh = adios4dolfinx.read_mesh(
92+
first_mesh = io4dolfinx.read_mesh(
9393
mesh_file, comm=MPI.COMM_WORLD, backend="adios2", backend_args={"engine": "BP4"}, time=1.5
9494
)
9595
compute_volume(first_mesh, 1.5)

pyproject.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
requires = ["setuptools>=61.0.0", "wheel"]
33

44
[project]
5-
name = "adios4dolfinx"
5+
name = "io4dolfinx"
66
version = "0.11.0.dev0"
77
description = "Checkpointing functionality for DOLFINx meshes/functions with ADIOS2"
88
authors = [{ name = "Jørgen S. Dokken", email = "dokken@simula.no" }]
@@ -15,9 +15,9 @@ test = [
1515
"pytest",
1616
"coverage",
1717
"ipyparallel",
18-
"adios4dolfinx[h5py]",
19-
"adios4dolfinx[pyvista]",
20-
"adios4dolfinx[xdmf]"
18+
"io4dolfinx[h5py]",
19+
"io4dolfinx[pyvista]",
20+
"io4dolfinx[xdmf]"
2121
]
2222
dev = ["pdbpp", "ipython", "mypy", "ruff"]
2323
h5py = ["h5py"]
@@ -30,10 +30,10 @@ docs = [
3030
"jupytext",
3131
"ipykernel<7.0.0", # Note: Remove once https://github.com/ipython/ipykernel/issues/1450 is in a release
3232
"sphinx-codeautolink",
33-
"adios4dolfinx[h5py]",
33+
"io4dolfinx[h5py]",
3434
"sphinx_external_toc<1.1.0",
3535
]
36-
all = ["adios4dolfinx[test,dev,docs]"]
36+
all = ["io4dolfinx[test,dev,docs]"]
3737

3838
[tool.pytest.ini_options]
3939
addopts = ["--import-mode=importlib"]
@@ -64,7 +64,7 @@ select = [
6464

6565

6666
[tool.ruff.lint.isort]
67-
known-first-party = ["adios4dolfinx"]
67+
known-first-party = ["io4dolfinx"]
6868
known-third-party = [
6969
"basix",
7070
"dolfinx",

0 commit comments

Comments
 (0)