# KSPGMRESGetCGSRefinementType
Gets the type of iterative refinement to use in the classical Gram Schmidt orthogonalization. 
## Synopsis
```
#include "petscksp.h"  
PetscErrorCode KSPGMRESGetCGSRefinementType(KSP ksp, KSPGMRESCGSRefinementType *type)
```
Not Collective


## Input Parameter

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



## Output Parameter

- ***type -*** the type of refinement



## Options Database Key

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





## See Also
 [](chapter_ksp), `KSPGMRES`, `KSPGMRESSetOrthogonalization()`, `KSPGMRESCGSRefinementType`, `KSPGMRESClassicalGramSchmidtOrthogonalization()`, `KSPGMRESSetCGSRefinementType()`,
`KSPGMRESGetOrthogonalization()`

## Level
intermediate

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/impls/gmres/gmres.c.html#KSPGMRESGetCGSRefinementType_GMRES">KSPGMRESGetCGSRefinementType_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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
