[petsc-dev] SNESNONE type for nonlinear preconditioner?

Barry Smith bsmith at mcs.anl.gov
Thu Mar 6 13:52:58 CST 2014


On Mar 6, 2014, at 1:26 AM, Geoff Oxberry <goxberry at gmail.com> wrote:

> I saw Peter's talk at SIAM CSE 2013 and thought nonlinear preconditioning looked really cool; now I have a problem where I want to try it out. I've looked at snes/ex35, and it looks like adding one from options would involve:
> 
> - calling SNESGetNPC to associate the nonlinear preconditioner SNES with an outer SNES solver
> - calling SNESSetType on the nonlinear preconditioner to set some default value
> - calling SNESGetFromOptions to set a new nonlinear preconditioner from options (if available)
> 
> What if I want that nonlinear preconditioner to do nothing by default? Is there an SNESNONE, comparable to PCNONE?

   There is a little inconsistency in how this is handled in linear and nonlinear case. The linear case “always” has a preconditioner operation applied in the code (which does a copy when PCNONE is used) while the nonlinear case has a big ugly (actually several) if () statements to do different things based on if there is a preconditioner or not.  Loosely speaking with our current understanding, nonlinear preconditioning is a bit more intrusive on the nonlinear solver than linear preconditioning is on the Krylov method. Maybe someday when someone truly understands nonlinear preconditioning as well as linear preconditioning the code can be refactored to have the consistency.

   Barry



> 
> -- 
> Geoffrey Oxberry, Ph.D., E.I.T.
> goxberry at gmail.com




More information about the petsc-dev mailing list