[petsc-users] GAMG PC dependence on right-hand side

John Mousel john.mousel at gmail.com
Thu Jul 11 14:07:31 CDT 2013


Jed,

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.
I just tried -random_seed 1, and it seems to have made all the difference
in the world!

John


On Thu, Jul 11, 2013 at 1:00 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> John Mousel <john.mousel at gmail.com> writes:
>
> > I'm trying to reuse the PC constructed by GAMG during a sub-iterative
> > procedure where KSPSolve is called with the same matrix repeatedly. The
> > right-hand side changes during the sub-iteration. I've been attempting to
> > use SAME_PRECONDITIONER for nit = 2...,
>
> What do you mean by SAME_PRECONDITIONER?  If you are solving with the
> same matrix, you can just call KSPSolve without KSPSetOperators.
>
> > Is there a dependence on the right-hand side in GAMG somewhere?
>
> It uses a pseudo-random number generator for eigenvalue estimation.  Try
> adding
>
>   -random_seed 1
>
> to your run and see if it cuts the variation you see.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130711/3c2de4fe/attachment.html>


More information about the petsc-users mailing list