# PCQR
Uses a direct solver, based on QR factorization, as a preconditioner 


## Note
Usually this will compute an "exact" solution in one iteration and does
not need a Krylov method (i.e. you can use -ksp_type preonly, or
`KSPSetType`(ksp,`KSPPREONLY`) for the Krylov method


## See Also
 `PCCreate()`, `PCSetType()`, `PCType`, `PC`, `PCSVD`,
`PCILU`, `PCLU`, `PCCHOLESKY`, `PCICC`, `PCFactorSetReuseOrdering()`, `PCFactorSetReuseFill()`, `PCFactorGetMatrix()`,
`PCFactorSetFill()`, `PCFactorSetUseInPlace()`, `PCFactorSetMatOrderingType()`, `PCFactorSetColumnPivot()`,
`PCFactorSetPivotingInBlocks()`, `PCFactorSetShiftType()`, `PCFactorSetShiftAmount()`
`PCFactorReorderForNonzeroDiagonal()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/factor/qr/qr.c.html#PCQR">src/ksp/pc/impls/factor/qr/qr.c</A>


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


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