:orphan: # KSPFCGSetMmax set the maximum number of previous directions `KSPFCG` will store for orthogonalization ## Synopsis ``` #include "petscksp.h" PetscErrorCode KSPFCGSetMmax(KSP ksp, PetscInt mmax) ``` Logically Collective ## Input Parameters - ***ksp -*** the Krylov space context - ***mmax -*** the maximum number of previous directions to orthogonalize against ## Options Database Key - ***-ksp_fcg_mmax -*** maximum number of search directions ## Note mmax + 1 directions are stored (mmax previous ones along with a current one) and whether all are used in each iteration also depends on the truncation strategy (see KSPFCGSetTruncationType()) ## See Also [](ch_ksp), `KSPFCG`, `KSPFCGGetTruncationType()`, `KSPFCGGetNprealloc()`, `KSPFCGetMmax()` ## Level intermediate ## Location src/ksp/ksp/impls/fcg/fcg.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)