# MatSolverTypeGet
Gets the function that creates the factor matrix if it exist 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatSolverTypeGet(MatSolverType type, MatType mtype, MatFactorType ftype, PetscBool *foundtype, PetscBool *foundmtype, PetscErrorCode (**createfactor)(Mat, MatFactorType, Mat *))
```

## Input Parameters

- ***type -*** name of the package, for example petsc or superlu
- ***ftype -*** the type of factorization supported by the type
- ***mtype -*** the matrix type that works with this type



## Output Parameters

- ***foundtype -*** `PETSC_TRUE` if the type was registered
- ***foundmtype -*** `PETSC_TRUE` if the type supports the requested mtype
- ***createfactor -*** routine that will create the factored matrix ready to be used or `NULL` if not found





## See Also
 `Mat`, `MatFactorType`, `MatType`, `MatCopy()`, `MatDuplicate()`, `MatGetFactorAvailable()`, `MatSolverTypeRegister()`, `MatGetFactor()`

## Level
developer

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


---
[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)  
