KSPRichardsonSetSelfScale#
Sets Richardson to automatically determine optimal scaling at each iteration to minimize the 2-norm of the preconditioned residual
Synopsis#
#include "petscksp.h"
PetscErrorCode KSPRichardsonSetSelfScale(KSP ksp, PetscBool scale)
Logically Collective
Input Parameters#
ksp - the iterative context
scale -
PETSC_TRUEor the default ofPETSC_FALSE
Options Database Key#
-ksp_richardson_self_scale - Use self-scaling
Notes#
Requires two extra work vectors. Uses an extra VecAXPY() and VecDotNorm2() per iteration.
Changing this flag runs KSPSetUp() again, since the number of work vectors depends on it. The self-scaled variant has no block analog, so turning it on makes
KSPMatSolve() solve the right-hand sides one at a time instead of iterating on the whole block at once, and releases the work space that block iteration cached
Developer Note#
Could also minimize the 2-norm of the true residual with one less work vector
See Also#
KSP: Linear System Solvers, KSPRICHARDSON, KSPRichardsonSetScale(), KSPMatSolve()
Level#
intermediate
Location#
Implementations#
KSPRichardsonSetSelfScale_Richardson() in src/ksp/ksp/impls/rich/rich.c
Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages