# KSPPIPEFGMRES
Implements the Pipelined (1-stage) Flexible Generalized Minimal Residual method. [](sec_pipelineksp). [](sec_flexibleksp) 
## Options Database Keys

- ***-ksp_gmres_restart <restart> -*** the number of Krylov directions to orthogonalize against
- ***-ksp_gmres_haptol <tol> -*** sets the tolerance for "happy ending" (exact convergence)
- ***-ksp_gmres_preallocate -*** preallocate all the Krylov search directions initially (otherwise groups of
- ***-ksp_pipefgmres_shift -*** the shift to use (defaults to 1. See KSPPIPEFGMRESSetShift()
vectors are allocated as needed)
- ***-ksp_gmres_krylov_monitor -*** plot the Krylov space generated





## Notes
This variant is not "explicitly normalized" like `KSPPGMRES`, and requires a shift parameter.

A heuristic for choosing the shift parameter is the largest eigenvalue of the preconditioned operator.

Only right preconditioning is supported (but this preconditioner may be nonlinear/variable/inexact, as with `KSPFGMRES`).

MPI configuration may be necessary for reductions to make asynchronous progress, which is important for performance of pipelined methods.
See [](doc_faq_pipelined)


## Developer Note
This class is subclassed off of `KSPGMRES`.


## Contributed by
P. Sanan and S.M. Schnepp


## Reference
P. Sanan, S.M. Schnepp, and D.A. May,
"Pipelined, Flexible Krylov Subspace Methods,"
SIAM Journal on Scientific Computing 2016 38:5, C441-C470,
DOI: 10.1137/15M1049130


## See Also
 [](chapter_ksp), [](doc_faq_pipelined), [](sec_pipelineksp), [](sec_flexibleksp), `KSPCreate()`, `KSPSetType()`, `KSPType`, `KSP`, `KSPLGMRES`, `KSPPIPECG`, `KSPPIPECR`, `KSPPGMRES`, `KSPFGMRES`
`KSPGMRESSetRestart()`, `KSPGMRESSetHapTol()`, `KSPGMRESSetPreAllocateVectors()`, `KSPGMRESMonitorKrylov()`, `KSPPIPEFGMRESSetShift()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/impls/gmres/pipefgmres/pipefgmres.c.html#KSPPIPEFGMRES">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)  
