# PCCHOLESKY
Uses a direct solver, based on Cholesky factorization, as a preconditioner 
## Options Database Keys

- ***-pc_factor_reuse_ordering -*** Activate `PCFactorSetReuseOrdering()`
- ***-pc_factor_mat_solver_type -*** Actives `PCFactorSetMatSolverType()` to choose the direct solver, like superlu
- ***-pc_factor_reuse_fill -*** Activates `PCFactorSetReuseFill()`
- ***-pc_factor_fill <fill> -*** Sets fill amount
- ***-pc_factor_in_place -*** Activates in-place factorization
- ***-pc_factor_mat_ordering_type <nd,rcm,...> -*** Sets ordering routine





## Notes
Not all options work for all matrix formats

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`,
`PCILU`, `PCLU`, `PCICC`, `PCFactorSetReuseOrdering()`, `PCFactorSetReuseFill()`, `PCFactorGetMatrix()`,
`PCFactorSetFill()`, `PCFactorSetShiftNonzero()`, `PCFactorSetShiftType()`, `PCFactorSetShiftAmount()`
`PCFactorSetUseInPlace()`, `PCFactorGetUseInPlace()`, `PCFactorSetMatOrderingType()`, `PCFactorSetReuseOrdering()`

## Level
beginner

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

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


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