Issue with HDF5 writing

Issue #1051 new
Camilla Bressan created an issue

Dear all,

the following code used to work in FEniCS versions < 2018.1.0.

from dolfin import *
mesh = UnitSquareMesh(20,20 )
V = FunctionSpace(mesh, "Lagrange", 1)
tmpfile = HDF5File(mesh.mpi_comm(), "./tmp_file.h5", "w")
f = Expression("10",degree=1)
u = Function(V)
u.interpolate(f)
norm_u = assemble(inner(u, u)*dx)
tmpfile.write(norm_u, "/norm")

The error I find is:

AttributeError: 'float' object has no attribute '_cpp_object'

Thanks and Regards,

Comments (2)

  1. Log in to comment