KSPCGS — PETSc 3.25.0 documentation

Skip to main content
`Ctrl`+`K`

# KSPCGS

This code implements the CGS (Conjugate Gradient Squared) method [Son89].

## Notes

Does not require a symmetric matrix. Does not apply transpose of the matrix.

Supports left and right preconditioning, but not symmetric.

## Developer Note

Has this weird support for doing the convergence test with the natural norm, I assume this works only with no preconditioning and symmetric positive definite operator.

## References

[Son89]

Peter Sonneveld. CGS, a fast Lanczos-type solver for nonsymmetric linear systems. SIAM J. Sci. Stat. Comput., 10:36–52, 1989.

## See Also

KSP: Linear System Solvers, `KSPCreate()`, `KSPSetType()`, `KSPType`, `KSP`, `KSPBCGS`, `KSPSetPCSide()`

## Level

beginner

## Location

src/ksp/ksp/impls/cgs/cgs.c

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