[petsc-users] How to reuse a snes object?

Fande Kong fd.kong at siat.ac.cn
Mon Mar 10 23:29:20 CDT 2014


Hi all,

I am trying to solve two different nonlinear equations. I first solve the
first nonlinear equation using a snes within which a ksp is preconditioned
by a pcasm. And then I want to use the solution of the first nonlinear
equation as an initial guess  to solve the second nonlinear equation, but
this time I want to switch the preconditioner to pcmg. How could I finish
this by creating snes only once, then using snessolve() twice, and
switching preconditioner for linear solvers?


Fande
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140310/19abcde7/attachment.html>


More information about the petsc-users mailing list