# KSPPIPEFGMRESSetShift
Set the shift parameter for the flexible, pipelined `KSPPIPEFGMRES` solver. 
## Synopsis
```
#include "petscksp.h"  
PetscErrorCode KSPPIPEFGMRESSetShift(KSP ksp, PetscScalar shift)
```
Logically Collective


## Input Parameters

- ***ksp -*** the Krylov space context
- ***shift -*** the shift



## Options Database Key

- ***-ksp_pipefgmres_shift <shift> -*** set the shift parameter





## Note
A heuristic is to set this to be comparable to the largest eigenvalue of the preconditioned operator.
This can be acheived with PETSc itself by using a few iterations of a Krylov method.
See `KSPComputeEigenvalues()` (and note the caveats there).


## See Also
 [](chapter_ksp), `KSPPIPEFGMRES`, `KSPComputeEigenvalues()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/impls/gmres/pipefgmres/pipefgmres.c.html#KSPPIPEFGMRESSetShift">src/ksp/ksp/impls/gmres/pipefgmres/pipefgmres.c</A>


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