← Back to team overview

dolfin team mailing list archive

[Question #103296]: saving output to xml format

 

New question #103296 on DOLFIN:
https://answers.launchpad.net/dolfin/+question/103296

I want to save output from python to checkpoint my code for reading in later.
I thought XML was the right way to do this, but I have problems with saving XML.
Firstly, the demo in tensor-weighted-poisson does not work for me -

-snip-
# Store to file
mesh_file = File("mesh.xml.gz")
c00_file = File("c00.xml.gz")
c01_file = File("c01.xml.gz")
c11_file = File("c11.xml.gz")

mesh_file << mesh
c00_file << c00
c01_file << c01
c11_file << c11
-snip- 

  File "../demo/pde/tensor-weighted-poisson/python/generate_data.py", line 38, in <module>
    mesh_file << mesh
RuntimeError: *** Error: Unable to write XML data, gzipped XML (.xml.gz) not supported for output.

Is there some configuration I am missing???

Secondly, if I try to use uncompressed XML:

T1 = Function(Q)
tfile_xml = File("r1-t.xml")
tfile_xml << T1

RuntimeError: *** Error: Unable to write objects of type Function to Unknown file type files.





-- 
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.