[petsc-users] Store and reuse the factor of matrix

Jed Brown jed at jedbrown.org
Thu Aug 18 23:27:36 CDT 2016


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 --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160818/ee8a406d/attachment.pgp>


More information about the petsc-users mailing list