:orphan:
# KSPCGS
This code implements the CGS (Conjugate Gradient Squared) method. 


## 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

- **** -*** Sonneveld, 1989.



## See Also
 [](ch_ksp), `KSPCreate()`, `KSPSetType()`, `KSPType`, `KSP`, `KSPBCGS`, `KSPSetPCSide()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/impls/cgs/cgs.c.html#KSPCGS">src/ksp/ksp/impls/cgs/cgs.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/ksp/impls/cgs/cgs.c)


[Index of all KSP routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
