<div class="gmail_quote">On Wed, Oct 12, 2011 at 09:56, behzad baghapour <span dir="ltr"><<a href="mailto:behzad.baghapour@gmail.com">behzad.baghapour@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 id=":4vg">I found that I should set up KSP in each Newton iteration ( if I don't want to use SNES I think!). <br></div></blockquote><div><br></div><div>You probably should use SNES. :-)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":4vg">Then KSP linear solver converged and my problem is solved.<br>By the way, Is it correct to re-setup KSP in each Newton iteration or I can use a better way?</div></blockquote></div><br><div>You can just call KSPSetOperators() before KSPSolve() in each Newton iteration.</div>