dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #18736
[Bug 606343] Re: GenericMatrix::mult doesn't work from Python
x should be replaced by b in
A.mult(x,y) or the other way around...right?
--
GenericMatrix::mult doesn't work from Python
https://bugs.launchpad.net/bugs/606343
You received this bug notification because you are a member of DOLFIN
Team, which is subscribed to DOLFIN.
Status in DOLFIN: Confirmed
Bug description:
The below program throws the error:
File "demo.py", line 19, in <module>
A.mult(x, y)
TypeError: in method 'GenericMatrix_mult', argument 2 of type 'dolfin::GenericVector const &'
from dolfin import *
mesh = UnitSquare(32, 32);
V = FunctionSpace(mesh, "CG", 1)
v = TestFunction(V)
u = TrialFunction(V)
f = Constant(1.0)
a = v*u*dx
L = v*f*dx
A = assemble(a)
b = assemble(L)
y = Vector(b.size())
print A
print b
print y
A.mult(x, y)
References