# MATSOLVERKLU
"klu" - A matrix type providing direct solvers, LU, for sequential matrices via the external package KLU. ./configure --download-suitesparse to install PETSc to use KLU

Use -pc_type lu -pc_factor_mat_solver_type klu to use this direct solver

Consult KLU documentation for more information on the options database keys below.


## Options Database Keys

- ***-mat_klu_pivot_tol <0.001>                  -*** Partial pivoting tolerance
- ***-mat_klu_use_btf <1>                        -*** Use BTF preordering
- ***-mat_klu_ordering <AMD>                     -*** KLU reordering scheme to reduce fill-in (choose one of) AMD COLAMD PETSC
- ***-mat_klu_row_scale <NONE>                   -*** Matrix row scaling (choose one of) NONE SUM MAX


Note: KLU is part of SuiteSparse http://faculty.cse.tamu.edu/davis/suitesparse.html




## See Also
 `PCLU`, `MATSOLVERUMFPACK`, `MATSOLVERCHOLMOD`, `PCFactorSetMatSolverType()`, `MatSolverType`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/aij/seq/klu/klu.c.html#MATSOLVERKLU">src/mat/impls/aij/seq/klu/klu.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/impls/aij/seq/klu/klu.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)  
