# KSPPIPEFCGSetMmax
set the maximum number of previous directions `KSPPIPEFCG` will store for orthogonalization 
## Synopsis
```
#include "petscksp.h"  
PetscErrorCode KSPPIPEFCGSetMmax(KSP ksp, PetscInt mmax)
```
Logically Collective on ksp


## Input Parameters

- ***ksp -*** the Krylov space context
- ***mmax -*** the maximum number of previous directions to orthogonalize against



## Options Database Key

- ***-ksp_pipefcg_mmax <N> -*** maximum number of previous directions





## Note
mmax + 1 directions are stored (mmax previous ones along with the current one)
and whether all are used in each iteration also depends on the truncation strategy, see `KSPPIPEFCGSetTruncationType()`


## See Also
 [](chapter_ksp), `KSPPIPEFCG`, `KSPPIPEFCGSetTruncationType()`, `KSPPIPEFCGSetNprealloc()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/impls/fcg/pipefcg/pipefcg.c.html#KSPPIPEFCGSetMmax">src/ksp/ksp/impls/fcg/pipefcg/pipefcg.c</A>


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


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