[petsc-users] Store and reuse the factor of matrix
Jinlei Shen
jshen25 at jhu.edu
Sun Aug 21 21:12:19 CDT 2016
Hi, Jed,
I agree with you that it's not wise to reuse pc with new operator.
Basically, I just keep pc and matrix updating concurrently.
Thanks for telling me that option in ksp.
It works.
Bests,
Jinlei
On Fri, Aug 19, 2016 at 12:27 AM, Jed Brown <jed at jedbrown.org> wrote:
> Jinlei Shen <jshen25 at jhu.edu> writes:
>
> > Hi Matt,
> >
> > Thanks for speedy reply.
> >
> > It seems effective in SNES.
> >
> > I'm curious about how it works in iterative solver.
> > Let's say I'm using CG with BJACOBI for modified newton, if I Set lag as
> 5,
> > does that mean the ilu decomposition for pc is stored and reused for the
> > next 4 iterations? Will this setting help to reduce the iteration number
> of
> > ksp solver?
>
> Reusing the preconditioner with a new operator will generally converge
> more slowly (or sometimes not at all). Solving the stale linear system
> may cause modified Newton to stagnate/fail, e.g., when it chooses a
> search direction that is not a descent direction.
>
> > Also, I'm wondering how to set the same option for just linear KSP solver
> > since I have coded the modified newton framework manually.
>
> You can call KSPSolve() repeatedly without KSPSetOperators. You can
> also use KSPSetReusePreconditioner to reuse the preconditioner that was
> set up in a previous solve.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160821/acf3f7e5/attachment.html>
More information about the petsc-users
mailing list