Skip to content

Commit

Permalink
Fix deprecated xdmffile from scifem
Browse files Browse the repository at this point in the history
  • Loading branch information
finsberg committed Nov 24, 2024
1 parent 7cb6b6c commit 6f2a3bd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/cardiac_geometries/fibers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ def save_microstructure(
# Save for paraview visualization

if functions[0].function_space.ufl_element().family_name == "quadrature":
from scifem.xdmf import create_pointcloud
from scifem.xdmf import XDMFFile

with XDMFFile(Path(outdir) / "microstructure-viz.xdmf", functions) as xdmf:
xdmf.write(0.0)

create_pointcloud(functions=functions, filename=Path(outdir) / "microstructure-viz.xdmf")
else:
try:
with dolfinx.io.VTXWriter(
Expand Down

0 comments on commit 6f2a3bd

Please sign in to comment.