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

John Mousel john.mousel at gmail.com
Thu Jul 11 16:30:53 CDT 2013


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?

Yes, both solutions were equally accurate.


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

> John Mousel <john.mousel at gmail.com> writes:
>
> > I have two KSP contexts, helm%ksp and proj%ksp. I switch between the two
> by
> > calling KSPSetOperators.
>
> Why call KSPSetOperators?  You should be able to call KSPSetOperators
> once for helm%ksp and once for proj%ksp, then just call
>
> for each step:
>   KSPSolve(helm%ksp, new_rhs, x)
>   update new_rhs
>   KSPSolve(proj%ksp, new_rhs, y)
>
> > There was no performance difference, just a different answer.
>
> Okay, but both equally accurate up to your convergence tolerance?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130711/334a12e0/attachment-0001.html>


More information about the petsc-users mailing list