<div dir="ltr"><div>Jed,<br><br>I alternate between solving Helmholtz and Poisson equations in an outer loop. The matrix is fixed for both operators during the process, and only the right-hand side is updated for each system.<br>
</div>I just tried -random_seed 1, and it seems to have made all the difference in the world! <br><div><br>John<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 11, 2013 at 1: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'm trying to reuse the PC constructed by GAMG during a sub-iterative<br>
> procedure where KSPSolve is called with the same matrix repeatedly. The<br>
> right-hand side changes during the sub-iteration. I've been attempting to<br>
> use SAME_PRECONDITIONER for nit = 2...,<br>
<br>
</div>What do you mean by SAME_PRECONDITIONER? If you are solving with the<br>
same matrix, you can just call KSPSolve without KSPSetOperators.<br>
<div class="im"><br>
> Is there a dependence on the right-hand side in GAMG somewhere?<br>
<br>
</div>It uses a pseudo-random number generator for eigenvalue estimation. Try<br>
adding<br>
<br>
-random_seed 1<br>
<br>
to your run and see if it cuts the variation you see.<br>
</blockquote></div><br></div>