KSPRICHARDSON#
The preconditioned Richardson iterative method [Ric11]
Options Database Key#
-ksp_richardson_scale - damping factor on the correction (defaults to 1.0)
Notes#
\( x^{n+1} = x^{n} + scale*B(b - A x^{n})\)
Here B is the application of the preconditioner
This method often (usually) will not converge unless scale is very small.
For some preconditioners, currently PCSOR, the convergence test is skipped to improve speed,
thus it always iterates the maximum number of iterations you’ve selected. When -ksp_monitor
(or any other monitor) is turned on, the norm is computed at each iteration and so the convergence test is run unless
you specifically call KSPSetNormType(ksp,KSP_NORM_NONE);
For some preconditioners, currently PCMG and PCHYPRE with BoomerAMG if -ksp_monitor (and also
any other monitor) is not turned on then the convergence test is done by the preconditioner itself and
so the solver may run more or fewer iterations then if -ksp_monitor is selected.
Supports only left preconditioning
If using direct solvers such as PCLU and PCCHOLESKY one generally uses KSPPREONLY instead of this which uses exactly one iteration
-ksp_type richardson -pc_type jacobi gives one classical Jacobi preconditioning
KSPMatSolve() and KSPMatSolveTranspose() are supported natively, that is, the iteration is performed on a whole batch of right-hand sides at once, a batch being
the whole block unless KSPSetMatSolveBatchSize() is used, except with KSPRichardsonSetSelfScale(), for which the right-hand sides are solved one at a time.
The convergence of each batch is tested on the Frobenius norm of its block of (preconditioned) residuals and, with a nonzero initial guess, the relative tolerance
is by default based on the Frobenius norm of its block of (preconditioned) right-hand sides, as in KSPSolve(). KSPConvergedDefaultSetUIRNorm() can be used to
base it on the initial residual norm instead. Unlike KSPSolve(), KSPMatSolve() does not remove the (transpose) null space of the operator from the block of
right-hand sides, so the caller must make a singular system consistent by projecting B itself
As in KSPSolve(), the iteration is delegated to the preconditioner when it provides a fast Richardson code, the convergence test is the default one or is skipped,
and Pmat has no null space. PCMatApplyRichardson() is used when the preconditioner provides it, otherwise PCApplyRichardson() is applied
to one right-hand side at a time so that KSPMatSolve() computes the same solutions as KSPSolve(). Since KSPMatSolve() is a stripped-down version of KSPSolve(),
monitors are not called during a block iteration and so, unlike in KSPSolve(), they do not prevent this delegation
References#
Lewis Fry Richardson. The approximate arithmetical solution by finite differences of physical problems including differential equations, with an application to the stresses in a masonry dam. Philosophical Transactions of the Royal Society A, 210(459–470):307–357, 1911. doi:10.1098/rsta.1911.0009.
See Also#
KSP: Linear System Solvers, KSPCreate(), KSPSetType(), KSPType, KSP,
KSPRichardsonSetScale(), KSPPREONLY, KSPRichardsonSetSelfScale(), KSPMatSolve(), PCApplyRichardson(), PCMatApplyRichardson()
Level#
beginner
Location#
Examples#
Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages