Skip to content

Commit 1767adc

Browse files
authored
Merge pull request #4 from scientificcomputing/pin-jupyter-book
Pin jupyter-book
2 parents 2d1acd2 + 9eb28c6 commit 1767adc

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ mri2mesh = "mri2mesh.cli:main"
3232
[project.optional-dependencies]
3333
mesh = ["wildmeshing", "h5py"]
3434
test = ["pytest", "pytest-cov", "mri2mesh[mesh]"]
35-
docs = ["pyvista[jupyter]", "jupyter-book", "mri2mesh[mesh]"]
35+
docs = ["pyvista[jupyter]", "jupyter-book<2.0", "mri2mesh[mesh]"]
3636

3737

3838

src/mri2mesh/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def dispatch(parser: argparse.ArgumentParser, argv: Optional[Sequence[str]] = No
7373
logger.error(f"Unknown command {command}")
7474
parser.print_help()
7575
except ValueError as e:
76-
logger.error(e)
76+
logger.error(e, exc_info=True, stacklevel=2)
7777
parser.print_help()
7878

7979
return 0

src/mri2mesh/mesh/basic.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,20 +189,26 @@ def convert_mesh_dolfinx(
189189
import basix
190190
import ufl
191191

192+
try:
193+
from dolfinx.io import gmsh as gmshio
194+
except ImportError:
195+
from dolfinx.io import gmshio
196+
192197
point_array = np.load(mesh_dir / "point_array.npy")
193198
cell_array = np.load(mesh_dir / "cell_array.npy")
194199
marker = np.load(mesh_dir / "marker.npy")
195200

196201
comm = MPI.COMM_WORLD
202+
197203
mesh = dolfinx.mesh.create_mesh(
198-
comm,
199-
cell_array.astype(np.int64),
200-
point_array,
201-
ufl.Mesh(basix.ufl.element("Lagrange", "tetrahedron", 1, shape=(3,))),
204+
comm=comm,
205+
cells=cell_array.astype(np.int64),
206+
x=point_array,
207+
e=ufl.Mesh(basix.ufl.element("Lagrange", "tetrahedron", 1, shape=(3,))),
202208
)
203209
tdim = mesh.topology.dim
204210
fdim = tdim - 1
205-
local_entities, local_values = dolfinx.io.gmshio.distribute_entity_data(
211+
local_entities, local_values = gmshio.distribute_entity_data(
206212
mesh,
207213
tdim,
208214
cell_array.astype(np.int64),

0 commit comments

Comments
 (0)