# MatCholeskyFactor
Performs in-place Cholesky factorization of a symmetric matrix. 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatCholeskyFactor(Mat mat, IS perm, const MatFactorInfo *info)
```
Collective


## Input Parameters

- ***mat -*** the matrix
- ***perm -*** row and column permutations
- ***f -*** expected fill as ratio of original fill





## Notes
See `MatLUFactor()` for the nonsymmetric case.  See also `MatGetFactor()`,
`MatCholeskyFactorSymbolic()`, and `MatCholeskyFactorNumeric()`.

Most users should employ the `KSP` interface for linear solvers
instead of working directly with matrix algebra routines such as this.
See, e.g., `KSPCreate()`.


## Developer Note
The Fortran interface is not autogenerated as the
interface definition cannot be generated correctly [due to `MatFactorInfo`]


## See Also
 [Matrix Factorization](sec_matfactor), `MatGetFactor()`, `MatFactorInfo`, `MatLUFactor()`, `MatCholeskyFactorSymbolic()`, `MatCholeskyFactorNumeric()`
`MatGetOrdering()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/interface/matrix.c.html#MatCholeskyFactor">src/mat/interface/matrix.c</A>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/dense/seq/cuda/densecuda.cu.html#MatCholeskyFactor_SeqDenseCUDA">MatCholeskyFactor_SeqDenseCUDA in src/mat/impls/dense/seq/cuda/densecuda.cu</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/dense/seq/dense.c.html#MatCholeskyFactor_SeqDense">MatCholeskyFactor_SeqDense in src/mat/impls/dense/seq/dense.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/dense/seq/hip/densehip.hip.c.html#MatCholeskyFactor_SeqDenseHIP">MatCholeskyFactor_SeqDenseHIP in src/mat/impls/dense/seq/hip/densehip.hip.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/elemental/matelem.cxx.html#MatCholeskyFactor_Elemental">MatCholeskyFactor_Elemental in src/mat/impls/elemental/matelem.cxx</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/sbaij/seq/sbaijfact.c.html#MatCholeskyFactor_SeqSBAIJ">MatCholeskyFactor_SeqSBAIJ in src/mat/impls/sbaij/seq/sbaijfact.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/scalapack/matscalapack.c.html#MatCholeskyFactor_ScaLAPACK">MatCholeskyFactor_ScaLAPACK in src/mat/impls/scalapack/matscalapack.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/interface/matrix.c)


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