solve() on vectors, specify relative tolerance?

Asked by Nico Schlömer on 2013-03-19

Is there a way to specify the (relative) tolerance when using solve() on vector objects?
This

A = assemble(a2)
b = assemble(L2)
solve(A, p.vector(), b, 'cg', 'ilu', tol=1.0e-6)

doesn't work.

Question information

Language:
English Edit question
Status:
Answered
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Last query:
2013-03-19
Last reply:
2013-03-19

Den Mar 19, 2013 kl. 8:01 PM skrev Nico Schlömer:

> New question #224662 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/224662
>
> Is there a way to specify the (relative) tolerance when using solve() on vector objects?
> This
>
> A = assemble(a2)
> b = assemble(L2)

parameters['krylov_solver']['relative_tolerance'] = 1e-8
solve(A, p.vector(), b, 'cg', 'ilu')

should do the trick I believe

Mikael

> solve(A, p.vector(), b, 'cg', 'ilu', tol=1.0e-6)
>
> doesn't work.
>
> --
> You received this question notification because you are a member of
> DOLFIN Team, which is an answer contact for DOLFIN.

Can you help with this problem?

Provide an answer of your own, or ask Nico Schlömer for more information if necessary.

To post a message you must log in.