[petsc-users] Initial Guess for KSP in SNES

Derek Gaston friedmud at gmail.com
Sun Apr 29 12:24:05 CDT 2018


I'm interested in setting the initial guess for the first KSP solve in SNES
(used in a transient calculation) - and whether anyone thinks it could be a
good thing to do.

I see some previous discussion on this from Jed and Matt here:
https://lists.mcs.anl.gov/mailman/htdig/petsc-users/2014-September/022779.html
https://lists.mcs.anl.gov/mailman/htdig/petsc-users/2014-September/022780.html

I realize that the Newton solver is solving for the update... but that
doesn't necessarily mean that guessing 0 is the best plan.  For instance:
for fairly linear problems in time (or slightly nonlinear depending on how
you look at it!) it might be a good idea to guess the first update to be
the difference between the previous two time steps (or: more generally some
sort of "projected" update based on your time integration scheme).

Indeed - for a perfectly linear problem in time (with constant dt) this
would yield a "perfect" guess for the linear solver and it would return
immediately.

I suppose that if you use a "predictor" for predicting the guess for the
nonlinear system (which we often do - but not always)... then 0 for your
first update is probably a decent choice (what else would you choose?).
But if you're simply using the old timestep solution (which is what is
commonly done)... then that first update is more likely to look like the
difference between the last two timesteps than it looks like 0.

Thoughts?

Derek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180429/3adfec5e/attachment.html>


More information about the petsc-users mailing list