Hello,
I have been looking for solutions to this problem on the forum but cannot find anything that works. I am using the dolfinx 0.8.0 docker image and Paraview 5.12.1, I generate a simple xdmf file with the following code but Paraview crashes when I try to render the results. Any help is appreciated.
import dolfinx
from mpi4py import MPI
mesh = dolfinx.mesh.create_unit_square(MPI.COMM_WORLD, 10, 10)
file = dolfinx.io.XDMFFile(
mesh.comm,
"example.xdmf",
"w",
encoding=dolfinx.io.XDMFFile.Encoding.ASCII
)
V = dolfinx.fem.functionspace(mesh, ("CG", 1))
v = dolfinx.fem.Function(V)
file.write_mesh(mesh)
v.name = "velocity"
file.write_function(v)
file.close()