[petsc-users] KSPGMRES preconditioned with a MATSHELL

Thomas Leissing thomas.leissing at cstb.fr
Fri Oct 14 02:42:58 CDT 2011


Dear all,

I need to solve a system of equation Ax = b in which A is a MatShell
object for which I defined a matrix-vector multiplication routine with
MatShellSetOperation. Let's call this routine MyMatMult. The MyMatMult
routine gives me an approximate matrix vector product, and I'm able to
tune the parameters of MyMatMult so that I can choose a trade-off
between calculation time and accuracy of the product. I successfully
solved this problem with a KSPGMRES solver.
So far so good...

Now I'd like to precondition the system to accelerate the solving stage.
To do this I'd like to use a lower-order (less accurate but faster)
solution of Ax=b.

I tried to do this with a PCKSP type preconditioner, but it doesn't seem
to accept MatShell objects as preconditioning matrix.
I also tried to use a PCSHELL preconditioner for which the PCApply
routine consists in solving the lower order Ax=b system.

I didn't manage to get this working properly: the outer solver doesn't
converge to the expected rate. Indeed if I use for the inner loop the
same accuracy than for the outer loop, the outer loop should converge in
one iteration, which is not the case...

Is there another way of doing this ?
Any hint ?

Thanks for your help,
Thomas Leissing
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111014/828a1734/attachment.htm>


More information about the petsc-users mailing list