# KSPGCRSetRestart
Sets number of iterations at which `KSPGCR` restarts. 
## Synopsis
```
#include "petscksp.h" 
PetscErrorCode KSPGCRSetRestart(KSP ksp, PetscInt restart)
```
Not Collective


## Input Parameters

- ***ksp -*** the Krylov space context
- ***restart -*** integer restart value



## Options Database Key

- ***-ksp_gcr_restart <restart> -*** the number of stored vectors to orthogonalize against





## Note
The default value is 30.


## Developer Note
The API could be made uniform for all `KSP` methods have have a restart.


## See Also
 [](chapter_ksp), `KSPGCR`, `KSPSetTolerances()`, `KSPGCRGetRestart()`, `KSPGMRESSetRestart()`

## Level
intermediate

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/impls/gcr/gcr.c.html#KSPGCRSetRestart_GCR">KSPGCRSetRestart_GCR in src/ksp/ksp/impls/gcr/gcr.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/ksp/impls/gcr/gcr.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)  
