diff --git a/src/cardiac_geometries/fibers/utils.py b/src/cardiac_geometries/fibers/utils.py index 0ef35c2..b27ad3a 100644 --- a/src/cardiac_geometries/fibers/utils.py +++ b/src/cardiac_geometries/fibers/utils.py @@ -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(