← Back to team overview

dolfin team mailing list archive

Function.vector() and solve()

 

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


Follow ups