The following minimal example doesn't work
because the assembled bilinearform A is of type
<class 'dolfin.cpp.la.Vector'>
Why? How can I fix this?
The code reads:
from dolfin import *
mesh = UnitSquareMesh(20, 20)
U = FunctionSpace(mesh, "CG", 1)
u = Function(U)
v = TestFunction(U)
rhs = Constant(1.)
bc = DirichletBC(U, 0. , "on_boundary")
A = assemble(inner(grad(u), grad(v))*dx)
b = assemble(rhs*v*dx)
bc.apply(A, b)
solve(A, u.vector(), b)