# KSPGetGuess
Gets the initial guess generator for the `KSP`. 
## Synopsis
```
#include "petscksp.h" 
PetscErrorCode KSPGetGuess(KSP ksp, KSPGuess *guess)
```
Not Collective


## Input Parameters

- ***ksp -*** the Krylov context



## Output Parameters

- ***guess -*** the object





## See Also
 [](chapter_ksp), `KSPGuess`, `KSP`, `KSPSetOptionsPrefix()`, `KSPAppendOptionsPrefix()`, `KSPSetUseFischerGuess()`, `KSPSetGuess()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/interface/itcl.c.html#KSPGetGuess">src/ksp/ksp/interface/itcl.c</A>


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