# KSPFCGSetNprealloc
set the number of directions to preallocate with `KSPFCG` 
## Synopsis
```
#include "petscksp.h"  
PetscErrorCode KSPFCGSetNprealloc(KSP ksp, PetscInt nprealloc)
```
Logically Collective


## Input Parameters

- ***ksp -*** the Krylov space context
- ***nprealloc -*** the number of vectors to preallocate



## Options Database Key

- ***-ksp_fcg_nprealloc <N> -*** number of directions to preallocate





## See Also
 [](chapter_ksp), `KSPFCG`, `KSPFCGGetTruncationType()`, `KSPFCGGetNprealloc()`, `KSPFCGSetMmax()`, `KSPFCGGetMmax()`

## Level
advanced

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


---
[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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
