:orphan:
# KSPGMRESSetCGSRefinementType
Sets the type of iterative refinement to use in the classical Gram Schmidt orthogonalization. 
## Synopsis
```
#include "petscksp.h"  
PetscErrorCode KSPGMRESSetCGSRefinementType(KSP ksp, KSPGMRESCGSRefinementType type)
```
Logically Collective


## Input Parameters

- ***ksp -*** the Krylov space context
- ***type -*** the type of refinement


```none
  KSP_GMRES_CGS_REFINE_NEVER
  KSP_GMRES_CGS_REFINE_IFNEEDED
  KSP_GMRES_CGS_REFINE_ALWAYS
```



## Options Database Key

- ***-ksp_gmres_cgs_refinement_type <refine_never,refine_ifneeded,refine_always> -*** refinement type





## See Also
 [](ch_ksp), `KSPGMRES`, `KSPGMRESSetOrthogonalization()`, `KSPGMRESCGSRefinementType`, `KSPGMRESClassicalGramSchmidtOrthogonalization()`, `KSPGMRESGetCGSRefinementType()`,
`KSPGMRESGetOrthogonalization()`

## Level
intermediate

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

## Implementations

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


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/ksp/impls/gmres/gmres.c)


[Index of all KSP routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
