Skip to main content
`Ctrl`+`K`

# KSP_GMRES_CGS_REFINE_IFNEEDED

Do the classical (unmodified) Gram-Schmidt process and one step of iterative refinement if an estimate of the orthogonality of the resulting vectors indicates poor orthogonality.

## Note

This is slower than `KSP_GMRES_CGS_REFINE_NEVER` because it requires an extra norm computation to estimate the orthogonality but is more stable.

## See Also

KSP: Linear System Solvers, `KSPGMRES`, `KSPGMRESCGSRefinementType`, `KSPGMRESClassicalGramSchmidtOrthogonalization()`, `KSPGMRESSetOrthogonalization()`, `KSP`, `KSPGMRESGetOrthogonalization()`, `KSPGMRESSetCGSRefinementType()`, `KSPGMRESGetCGSRefinementType()`, `KSP_GMRES_CGS_REFINE_NEVER`, `KSP_GMRES_CGS_REFINE_ALWAYS`, `KSPGMRESModifiedGramSchmidtOrthogonalization()`

## Level

advanced

## Location

include/petscksp.h

Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages