<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Tue, Jul 17, 2018 at 1:32 PM zakaryah <<a href="mailto:zakaryah@gmail.com">zakaryah@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="auto">Thanks Matt.<div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-size:small">2) Is there a way to reuse the KSP for (1) to efficiently solve (2), given the method which answers question 1) ?</div></div></blockquote><div><br></div><div>Not really, unless you use some type of factorization for the preconditioner.</div></div></div></blockquote></div><div dir="auto"><br></div><div dir="auto">Can you elaborate?  <div style="font-size:small;display:inline">​I know that KSP can efficiently solve linear systems with the same matrix but different right-hand sides, just by calling KSPSolve successively.  Will this be impossible within the nonlinear solver after calculating the nullspace?​</div></div><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div>
</div>
</blockquote></div><br clear="all"><div>This is what I was referring to. KSP reuse only works if you have some factorization preconditioner. In that case, KSP</div><div>will keep it around if you call KSPSolve() again with a different rhs. You can do that same thing in your case.</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_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/~knepley/</a><br></div></div></div></div></div></div>