Skip to content

Commit

Permalink
API changes related to FEniCS/dolfinx#2818 (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgensd authored Oct 23, 2023
1 parent 28fa7de commit 727e051
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description = "Wrappers for reading/writing DOLFINx meshes/functions with ADIOS2
authors = [{ name = "Jørgen S. Dokken", email = "[email protected]" }]
license = { file = "LICENSE" }
readme = "README.md"
dependencies = ["fenics-dolfinx>=0.7.0"]
dependencies = ["fenics-dolfinx>0.7.0"]

[project.optional-dependencies]
test = ["pytest", "coverage"]
Expand Down
2 changes: 1 addition & 1 deletion src/adios4dolfinx/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def index_owner(


def compute_dofmap_pos(
V: dolfinx.fem.FunctionSpaceBase,
V: dolfinx.fem.FunctionSpace,
) -> Tuple[npt.NDArray[np.int32], npt.NDArray[np.int32]]:
"""
Compute a map from each owned dof in the dofmap to a single cell owned by the
Expand Down
4 changes: 2 additions & 2 deletions tests/test_legacy_readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def test_legacy_function():
comm = MPI.COMM_WORLD
path = (pathlib.Path("legacy") / "mesh.h5").absolute()
mesh = read_mesh_from_legacy_h5(comm, path, "/mesh")
V = dolfinx.fem.FunctionSpace(mesh, ("DG", 2))
V = dolfinx.fem.functionspace(mesh, ("DG", 2))
u = ufl.TrialFunction(V)
v = ufl.TestFunction(V)
a = ufl.inner(u, v) * ufl.dx
Expand Down Expand Up @@ -96,7 +96,7 @@ def test_read_legacy_function_from_checkpoint():
path = (pathlib.Path("legacy") / "mesh_checkpoint.h5").absolute()
mesh = read_mesh_from_legacy_h5(comm, path, "/Mesh/mesh")

V = dolfinx.fem.FunctionSpace(mesh, ("DG", 2))
V = dolfinx.fem.functionspace(mesh, ("DG", 2))
u = ufl.TrialFunction(V)
v = ufl.TestFunction(V)
a = ufl.inner(u, v) * ufl.dx
Expand Down
8 changes: 4 additions & 4 deletions tests/test_snapshot_checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_read_write_2D(family, degree, cell_type):
def f(x):
return (np.full(x.shape[1], np.pi) + x[0], x[1])

V = dolfinx.fem.FunctionSpace(mesh, el)
V = dolfinx.fem.functionspace(mesh, el)
u = dolfinx.fem.Function(V)
u.interpolate(f)

Expand All @@ -49,7 +49,7 @@ def test_read_write_3D(family, degree, cell_type):
def f(x):
return (np.full(x.shape[1], np.pi) + x[0], x[1], x[1] * x[2])

V = dolfinx.fem.FunctionSpace(mesh, el)
V = dolfinx.fem.functionspace(mesh, el)
u = dolfinx.fem.Function(V)
u.interpolate(f)

Expand All @@ -75,7 +75,7 @@ def test_read_write_P_2D(family, degree, cell_type):
def f(x):
return (np.full(x.shape[1], np.pi) + x[0], x[1])

V = dolfinx.fem.FunctionSpace(mesh, el)
V = dolfinx.fem.functionspace(mesh, el)
u = dolfinx.fem.Function(V)
u.interpolate(f)

Expand All @@ -101,7 +101,7 @@ def test_read_write_P_3D(family, degree, cell_type):
def f(x):
return (np.full(x.shape[1], np.pi) + x[0], x[1] + 2 * x[0], np.cos(x[2]))

V = dolfinx.fem.FunctionSpace(mesh, el)
V = dolfinx.fem.functionspace(mesh, el)
u = dolfinx.fem.Function(V)
u.interpolate(f)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


def write_function(mesh, el, f, dtype) -> str:
V = dolfinx.fem.FunctionSpace(mesh, el)
V = dolfinx.fem.functionspace(mesh, el)
uh = dolfinx.fem.Function(V, dtype=dtype)
uh.interpolate(f)
el_hash = (
Expand Down

0 comments on commit 727e051

Please sign in to comment.