dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #22174
Re: [Question #149919]: PETScKrylovMatrix multiplicationin Python
On Tuesday March 22 2011 08:40:42 Christian Clason wrote:
> Question #149919 on DOLFIN changed:
> https://answers.launchpad.net/dolfin/+question/149919
>
> Christian Clason posted a new comment:
> Johan,
>
> thank you for the explanation. That means I should call the
> PETScKrylovSolver with
>
> y_petsc = PETScVector(V.dim()); y_petsc[:] = y.vector()[:]
> x_petsc = PETScVector(V.dim())
Sure or just:
y_petsc = down_cast(y.vector())
Johan
> NewtonSolver = PETScKrylovSolver('cg', 'none')
> NewtonSolver.solve(H, x_petsc, y_petsc)
>
> right? (I'm trying to get a correct minimal example for the bug report.)
>
> Christian
Follow ups
References