This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

lossless I/O

+3 votes

I'd like to compute the solution of a time-dependent PDE and write out the results to files such that I can later read in the solutions without loss of precision. What are appropriate file formats for the task?

(So far I have been using XDMF, but I can't seem to be able to read all states back into FEniCS.)

asked Jul 25, 2013 by nschloe FEniCS User (7,120 points)

What about pickle?

1 Answer

+3 votes
 
Best answer

XDMF is lossy. Try using the new HDF5 formats. Look at

dolfin/io/HDF5File.h

for how to use the HDF5 interface.

answered Jul 25, 2013 by Garth N. Wells FEniCS Expert (35,930 points)
selected Jul 25, 2013 by nschloe

How do I read with HDF5File in Python?

...