# KSPGuessSetType
Sets the type of a `KSPGuess` 
## Synopsis
```
#include "petscksp.h"  
PetscErrorCode KSPGuessSetType(KSPGuess guess, KSPGuessType type)
```
Logically Collective


## Input Parameters

- ***guess -*** the initial guess object for the Krylov method
- ***type  -*** a known `KSPGuessType`



## Options Database Key

- ***-ksp_guess_type  <method> -*** Sets the method; use -help for a list of available methods





## See Also
 [](chapter_ksp), `KSP`, `KSPGuess`, `KSPGuessType`, `KSPGuessRegister()`, `KSPGuessCreate()`

## Level
developer

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


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