:orphan:
# KSPGMRESModifiedGramSchmidtOrthogonalization
This is the basic orthogonalization routine using modified Gram-Schmidt. 
## Synopsis
```
PetscErrorCode KSPGMRESModifiedGramSchmidtOrthogonalization(KSP ksp, PetscInt it)
```
Collective


## Input Parameters

- ***ksp -*** KSP object, must be associated with `KSPGMRES`, `KSPFGMRES`, or `KSPLGMRES` Krylov method
- ***its -*** one less then the current GMRES restart iteration, i.e. the size of the Krylov space



## Options Database Keys

- ***-ksp_gmres_modifiedgramschmidt -*** Activates `KSPGMRESModifiedGramSchmidtOrthogonalization()`





## Notes
In general this is much slower than `KSPGMRESClassicalGramSchmidtOrthogonalization()` but has better stability properties.


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

## Level
intermediate

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

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex5f.F90.html">src/ksp/ksp/tutorials/ex5f.F90</A><BR>


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