:orphan: # KSPFCG Implements the Flexible Conjugate Gradient method (FCG). Unlike most `KSP` methods this allows the preconditioner to be nonlinear. [](sec_flexibleksp) ## Options Database Keys - ***-ksp_fcg_mmax -*** maximum number of search directions - ***-ksp_fcg_nprealloc -*** number of directions to preallocate - ***-ksp_fcg_truncation_type -*** truncation approach for directions ## Note Supports left preconditioning only. ## Contributed by Patrick Sanan ## References - **** -*** Notay, Y."Flexible Conjugate Gradients", SIAM J. Sci. Comput. 22:4, 2000 - **** -*** Axelsson, O. and Vassilevski, P. S. "A Black Box Generalized Conjugate Gradient Solver with Inner Iterations and Variable step Preconditioning", SIAM J. Matrix Anal. Appl. 12:4, 1991 ## See Also [](ch_ksp), [](sec_flexibleksp), `KSPGCR`, `KSPFGMRES`, `KSPCG`, `KSPFCGSetMmax()`, `KSPFCGGetMmax()`, `KSPFCGSetNprealloc()`, `KSPFCGGetNprealloc()`, `KSPFCGSetTruncationType()`, `KSPFCGGetTruncationType()`, `KSPFCGGetTruncationType` ## Level beginner ## Location src/ksp/ksp/impls/fcg/fcg.c ## Examples src/ksp/ksp/tutorials/ex7.c
--- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/ksp/impls/fcg/fcg.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)