<div dir="ltr"><div>I call it because the KSPs get passed to an AxbSolver routine that sets up the linear solve. That routine calls KSPSetOperators. Does it cause a problem in doing that if I want to reuse the PC?<br></div>
<br>Yes, both solutions were equally accurate. <br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 11, 2013 at 4:00 PM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">John Mousel <<a href="mailto:john.mousel@gmail.com">john.mousel@gmail.com</a>> writes:<br>
<br>
> I have two KSP contexts, helm%ksp and proj%ksp. I switch between the two by<br>
> calling KSPSetOperators.<br>
<br>
</div>Why call KSPSetOperators?  You should be able to call KSPSetOperators<br>
once for helm%ksp and once for proj%ksp, then just call<br>
<br>
for each step:<br>
  KSPSolve(helm%ksp, new_rhs, x)<br>
  update new_rhs<br>
  KSPSolve(proj%ksp, new_rhs, y)<br>
<div class="im"><br>
> There was no performance difference, just a different answer.<br>
<br>
</div>Okay, but both equally accurate up to your convergence tolerance?<br>
</blockquote></div><br></div>