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 <[email protected]> wrote:

> John Mousel <[email protected]> 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?
>

Reply via email to