1212import numpy .typing as npt
1313import pytest
1414
15- import adios4dolfinx
15+ import io4dolfinx
1616
1717
1818def find_backends ():
@@ -71,7 +71,7 @@ def _write_function(
7171 uh .interpolate (f )
7272 uh .name = name
7373 el_hash = (
74- adios4dolfinx .utils .element_signature (V )
74+ io4dolfinx .utils .element_signature (V )
7575 .replace (" " , "" )
7676 .replace ("," , "" )
7777 .replace ("(" , "" )
@@ -90,13 +90,13 @@ def _write_function(
9090 filename = (f_path / f"mesh_{ file_hash } " ).with_suffix (suffix )
9191 if mesh .comm .size != 1 :
9292 if not append :
93- adios4dolfinx .write_mesh (filename , mesh , backend = backend )
94- adios4dolfinx .write_function (filename , uh , time = 0.0 , backend = backend )
93+ io4dolfinx .write_mesh (filename , mesh , backend = backend )
94+ io4dolfinx .write_function (filename , uh , time = 0.0 , backend = backend )
9595 else :
9696 if MPI .COMM_WORLD .rank == 0 :
9797 if not append :
98- adios4dolfinx .write_mesh (filename , mesh , backend = backend )
99- adios4dolfinx .write_function (filename , uh , time = 0.0 , backend = backend )
98+ io4dolfinx .write_mesh (filename , mesh , backend = backend )
99+ io4dolfinx .write_function (filename , uh , time = 0.0 , backend = backend )
100100
101101 return filename
102102
@@ -108,7 +108,7 @@ def read_function():
108108 def _read_function (
109109 comm , el , f , path , dtype , backend : typing .Literal ["adios2" , "h5py" ], name = "uh"
110110 ):
111- mesh = adios4dolfinx .read_mesh (
111+ mesh = io4dolfinx .read_mesh (
112112 path ,
113113 comm ,
114114 ghost_mode = dolfinx .mesh .GhostMode .shared_facet ,
@@ -117,7 +117,7 @@ def _read_function(
117117 V = dolfinx .fem .functionspace (mesh , el )
118118 v = dolfinx .fem .Function (V , dtype = dtype )
119119 v .name = name
120- adios4dolfinx .read_function (path , v , backend = backend )
120+ io4dolfinx .read_function (path , v , backend = backend )
121121 v_ex = dolfinx .fem .Function (V , dtype = dtype )
122122 v_ex .interpolate (f )
123123
@@ -157,7 +157,7 @@ def _write_function_time_dep(
157157 uh = dolfinx .fem .Function (V , dtype = dtype )
158158 uh .interpolate (f0 )
159159 el_hash = (
160- adios4dolfinx .utils .element_signature (V )
160+ io4dolfinx .utils .element_signature (V )
161161 .replace (" " , "" )
162162 .replace ("," , "" )
163163 .replace ("(" , "" )
@@ -174,17 +174,17 @@ def _write_function_time_dep(
174174 suffix = ".h5"
175175 filename = (f_path / f"mesh_{ file_hash } " ).with_suffix (suffix )
176176 if mesh .comm .size != 1 :
177- adios4dolfinx .write_mesh (filename , mesh , backend = backend )
178- adios4dolfinx .write_function (filename , uh , time = t0 , backend = backend )
177+ io4dolfinx .write_mesh (filename , mesh , backend = backend )
178+ io4dolfinx .write_function (filename , uh , time = t0 , backend = backend )
179179 uh .interpolate (f1 )
180- adios4dolfinx .write_function (filename , uh , time = t1 , backend = backend )
180+ io4dolfinx .write_function (filename , uh , time = t1 , backend = backend )
181181
182182 else :
183183 if MPI .COMM_WORLD .rank == 0 :
184- adios4dolfinx .write_mesh (filename , mesh , backend = backend )
185- adios4dolfinx .write_function (filename , uh , time = t0 , backend = backend )
184+ io4dolfinx .write_mesh (filename , mesh , backend = backend )
185+ io4dolfinx .write_function (filename , uh , time = t0 , backend = backend )
186186 uh .interpolate (f1 )
187- adios4dolfinx .write_function (filename , uh , time = t1 , backend = backend )
187+ io4dolfinx .write_function (filename , uh , time = t1 , backend = backend )
188188
189189 return filename
190190
@@ -196,7 +196,7 @@ def read_function_time_dep():
196196 def _read_function_time_dep (
197197 comm , el , f0 , f1 , t0 , t1 , path , dtype , backend : typing .Literal ["adios2" , "h5py" ]
198198 ):
199- mesh = adios4dolfinx .read_mesh (
199+ mesh = io4dolfinx .read_mesh (
200200 path ,
201201 comm ,
202202 ghost_mode = dolfinx .mesh .GhostMode .shared_facet ,
@@ -205,14 +205,14 @@ def _read_function_time_dep(
205205 V = dolfinx .fem .functionspace (mesh , el )
206206 v = dolfinx .fem .Function (V , dtype = dtype )
207207
208- adios4dolfinx .read_function (path , v , time = t1 , backend = backend )
208+ io4dolfinx .read_function (path , v , time = t1 , backend = backend )
209209 v_ex = dolfinx .fem .Function (V , dtype = dtype )
210210 v_ex .interpolate (f1 )
211211
212212 res = np .finfo (dtype ).resolution
213213 assert np .allclose (v .x .array , v_ex .x .array , atol = 10 * res , rtol = 10 * res )
214214
215- adios4dolfinx .read_function (path , v , time = t0 , backend = backend )
215+ io4dolfinx .read_function (path , v , time = t0 , backend = backend )
216216 v_ex = dolfinx .fem .Function (V , dtype = dtype )
217217 v_ex .interpolate (f0 )
218218
0 commit comments