:orphan: # MatQRFactor Performs in-place QR factorization of matrix. ## Synopsis ``` #include "petscmat.h" PetscErrorCode MatQRFactor(Mat mat, IS col, const MatFactorInfo *info) ``` Collective ## Input Parameters - ***mat -*** the matrix - ***col -*** column permutation - ***info -*** options for factorization, includes ```none fill - expected fill as ratio of original fill. dtcol - pivot tolerance (0 no pivot, 1 full column pivoting) Run with the option -info to determine an optimal value to use ``` ## Notes 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()`. This changes the state of the matrix to a factored matrix; it cannot be used for example with `MatSetValues()` unless one first calls `MatSetUnfactored()`. ## Developer Note The Fortran interface is not autogenerated as the interface definition cannot be generated correctly [due to MatFactorInfo] ## See Also [](ch_matrices), `Mat`, [Matrix Factorization](sec_matfactor), `MatFactorInfo`, `MatGetFactor()`, `MatQRFactorSymbolic()`, `MatQRFactorNumeric()`, `MatLUFactor()`, `MatSetUnfactored()`, `MatFactorInfo`, `MatGetFactor()` ## Level developer ## Location src/mat/interface/matrix.c ## Implementations MatQRFactor_SeqDense in src/mat/impls/dense/seq/dense.c
--- [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](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)