dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #06927
Re: Function.vector() and solve()
Then solve should be fixed to expect a GenericVector, what's the problem?
2008/3/30, Anders Logg <logg@xxxxxxxxx>:
> Earlier, it was possible to do this:
>
> u = Function(element, mesh, Vector())
>
> A = assemble(...)
> b = assemble(...)
>
> solve(A, u.vector(), b)
>
> This is no longer possible since solve() expects a Vector, while
> Function.vector() returns a GenericVector.
>
> We could play some tricks in solve() to fix this (and I'm guessing we
> will) but for now, one has to do the following:
>
> x = Vector()
> u = Function(element, mesh, x)
>
> A = assemble(...)
> b = assemble(...)
>
> solve(A, x, b)
>
>
> --
> Anders
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev
>
--
Martin
Follow ups
References