KSPCG

The preconditioned conjugate gradient (PCG) iterative method

Options Database Keys

-ksp_cg_type Hermitian - (for complex matrices only) indicates the matrix is Hermitian
-ksp_cg_type symmetric - (for complex matrices only) indicates the matrix is symmetric

Notes: The PCG method requires both the matrix and preconditioner to be symmetric positive (semi) definite

References

Methods of Conjugate Gradients for Solving Linear Systems, Magnus R. Hestenes and Eduard Stiefel, Journal of Research of the National Bureau of Standards Vol. 49, No. 6, December 1952 Research Paper 2379 pp. 409--436.

See Also

KSPCreate(), KSPSetType(), KSPType (for list of available types), KSP,
KSPCGSetType()

Level:beginner
Location:
src/ksp/ksp/impls/cg/cg.c
Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/ksp/pc/examples/tutorials/ex1.c.html
src/ksp/pc/examples/tutorials/ex2.c.html
src/ksp/ksp/examples/tutorials/ex38.c.html
src/ksp/ksp/examples/tutorials/ex39.c.html
src/ksp/ksp/examples/tutorials/ex40.c.html