Hello
I want to write mesh in h5 file format. There is an explanation for this;
http://fenicsproject.org/qa/274/consistent-io-of-mesh-and-function-in-parallel
when I use this commend i get this error;
In 1: from dolfin import *
In [2]: mesh = UnitSquareMesh(5, 5)
In [3]: V = FunctionSpace(mesh, 'CG', 1)
In [4]: u = project(Expression('x[0]'), V)
Solving linear system of size 36 x 36 (PETSc Krylov solver).
In [5]: f = HDF5File('u.h5', 'w')
TypeError Traceback (most recent call last)
in ()
----> 1 f = HDF5File('u.h5', 'w')
/usr/lib/python2.7/dist-packages/dolfin/cpp/io.pyc in init(self, args)
909
910 """
--> 911 _io.HDF5File_swiginit(self,_io.new_HDF5File(args))
912 swig_destroy = _io.delete_HDF5File
913 def close(self):
TypeError: new_HDF5File expected 3 arguments, got 2
In [6]: f.write(mesh, 'mesh')
NameError Traceback (most recent call last)
in ()
----> 1 f.write(mesh, 'mesh')
NameError: name 'f' is not defined
In [7]: f.write(u, 'u')
NameError Traceback (most recent call last)
in ()
----> 1 f.write(u, 'u')
NameError: name 'f' is not defined
Any idea for this?
Thanks