[petsc-users] KSP step not accelerating despite good preconditioning in SNES

Timothée Nicolas timothee.nicolas at gmail.com
Mon Sep 28 02:53:48 CDT 2015


Hi all,

I have something strange in my application and I don't know what could
cause this. I am trying to do an implicit MHD problem and I thought I
finally figured out the preconditioner step, but somehow I don't get the
expected result, not even close.

For the preconditioning, I am using an approximate Schur complement, which
requires two relatively easy KSP inversions at each preconditioner
application. I apply this algorithm directly to the result function at the
end of the routine FormFunction. I have checked that the approximation to
the inversion of the Jacobian is good, in the sense that when I multiply
the preconditioned vector by the *total* Jacobian matrix, I indeed recover
almost the initial unpreconditioned vector. Also, I know that my Jacobian
matrix is correct, because (i) I have checked manually that F(X + dX) ~
F(X) + J * dX and (ii) when I don't use -snes_mf and use the provided
Jacobian matrix the result is pretty much equivalent to using -snes_mf.

In my understanding, this means that what I effectively feed to SNES at the
end of my FormFunction routine is a good approximation to J^(-1) F. As a
result, I naturally expect that the number of KSP iterations necessary to
achieve one SNES iteration be drastically reduced. However, I observe
virtually no change whatsoever in the number of iterations.

Any thoughts about what I could be missing ? Maybe I forgot to set a SNES
or KSP option somewhere ? I can send pieces of code if needs be.

Best

Timothee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150928/b04c978f/attachment.html>


More information about the petsc-users mailing list