<div dir="ltr"><span style="font-size:12.8px">Thank you. I had to do this</span><div style="font-size:12.8px"><br> ierr = SNESSetLagJacobian(snes,-2); CHKERRQ(ierr);<br> ierr = SNESSetLagPreconditioner(snes,<wbr>-2); CHKERRQ(ierr);</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Now I see that my FormJacobian function is called only once. Is this correct way to use it ?</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Best</div><div style="font-size:12.8px">praveen</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 26, 2017 at 6:00 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Tue, Sep 26, 2017 at 8:28 AM, Praveen C <span dir="ltr"><<a href="mailto:cpraveen@gmail.com" target="_blank">cpraveen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Dear all<div><br></div><div>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 ?</div></div></blockquote><div> </div></span><div><a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/SNES/SNESSetLagPreconditioner.html" target="_blank">http://www.mcs.anl.gov/petsc/<wbr>petsc-current/docs/<wbr>manualpages/SNES/<wbr>SNESSetLagPreconditioner.html</a></div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div><div>Thanks</div><span class="m_7324833341270479548gmail-HOEnZb"><font color="#888888"><div>praveen</div></font></span></div><span class="HOEnZb"><font color="#888888">
</font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_7324833341270479548gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.caam.rice.edu/~mk51/" target="_blank">https://www.cse.buffalo.edu/~<wbr>knepley/</a><br></div></div></div></div></div>
</font></span></div></div>
</blockquote></div><br></div>