Thank you. I had to do this ierr = SNESSetLagJacobian(snes,-2); CHKERRQ(ierr); ierr = SNESSetLagPreconditioner(snes,-2); CHKERRQ(ierr);
Now I see that my FormJacobian function is called only once. Is this correct way to use it ? Best praveen On Tue, Sep 26, 2017 at 6:00 PM, Matthew Knepley <[email protected]> wrote: > On Tue, Sep 26, 2017 at 8:28 AM, Praveen C <[email protected]> wrote: > >> Dear all >> >> I am solving a nonlinear problem using matrix-free approach in snes and I >> give a preconditioner matrix via SNESSetJacobian. My preconditioner is >> based on a first order scheme which is linear and hence preconditioner >> matrix will not change. How do I tell snes not to recompute it ? >> > > http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/SNES/ > SNESSetLagPreconditioner.html > > Matt > > >> Thanks >> praveen >> > > > > -- > What most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which their > experiments lead. > -- Norbert Wiener > > https://www.cse.buffalo.edu/~knepley/ <http://www.caam.rice.edu/~mk51/> >
