Jinlei Shen <[email protected]> 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.
signature.asc
Description: PGP signature
