failure to read xdmf files generated by Fenics

Seems I didn’t generate the xdmf file correctly.
I did it in python with the following commands:

First I create the file before my time loop

xdmffile_u = XDMFFile(‘velocity.xdmf’)

then I save the time values within the time loop to file (XDMF/HDF5)

xdmffile_u.write(u, t)

Thanks to https://fenicsproject.discourse.group/t/loading-xdmf-file-in-paraview/2291

I solved the issue inserting the command

xdmffile_u.parameters[“flush_output”] = True

just after the file creation:

xdmffile_u = XDMFFile(‘velocity.xdmf’)
xdmffile_u.parameters[“flush_output”] = True

Now all three xdmf readers work correctly. No need to use xdfm3 btw.

1 Like