custom preconditioner: how are they treated?

Asked by Nico Schlömer on 2013-04-16

For the sake of trying it out, I'd like to precondition my system with the mass matrix of the system. To this end, I did something along the lines of

solver = PETScKrylovSolver('gmres')
A_petsc = as_backend_type(A)
M_petsc = as_backend_type(M)
solver.set_operators(A_petsc, M_petsc)
b_petsc = as_backend_type(b)
phi_petsc = as_backend_type(phi.vector())
solver.solve(phi_petsc, b_petsc)

This tells Dolfin to solve the system

M^{-1} A x = M^{-1} b

-- right? How are the systems M^{-1} solved in each step?

Question information

Language:
English Edit question
Status:
Answered
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Last query:
2013-04-16
Last reply:
2013-05-09
Garth Wells (garth-wells) said : #1

On 16 April 2013 23:21, Nico Schlömer
<email address hidden> wrote:
> New question #226857 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/226857
>
> For the sake of trying it out, I'd like to precondition my system with the mass matrix of the system. To this end, I did something along the lines of
>
> solver = PETScKrylovSolver('gmres')
> A_petsc = as_backend_type(A)
> M_petsc = as_backend_type(M)
> solver.set_operators(A_petsc, M_petsc)
> b_petsc = as_backend_type(b)
> phi_petsc = as_backend_type(phi.vector())
> solver.solve(phi_petsc, b_petsc)
>
> This tells Dolfin to solve the system
>
> M^{-1} A x = M^{-1} b
>
> -- right? How are the systems M^{-1} solved in each step?
>

It will use the default preconditioner for the chosen backend. I
believe that PETSc defaults to ILU in serial.

Take a look at the stoke-iterative demo to set the preconditioner.

Garth

> You received this question notification because you are a member of
> DOLFIN Team, which is an answer contact for DOLFIN.

Anders Logg (logg) said : #2

FEniCS no longer uses Launchapd for Questions & Answers. Please
consult the documentation on the FEniCS web page for where and
how to (re)post your question: http://fenicsproject.org/support/

Anders Logg (logg) said : #3

FEniCS no longer uses Launchapd for Questions & Answers. Please
consult the documentation on the FEniCS web page for where and
how to (re)post your question: http://fenicsproject.org/support/

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.