Skip to main content
`Ctrl`+`K`

# MatSolverFn

Function type for the factor-creation callback registered with `MatSolverTypeRegister()`, used by `MatGetFactor()` to allocate a factored matrix of a particular `MatSolverType` and `MatFactorType`

## Synopsis

    PETSC_EXTERN_TYPEDEF typedef PetscErrorCode MatSolverFn(Mat, MatFactorType, Mat *);

## Synopsis

    #include <petscmat.h>
    PetscErrorCode MatSolverFn(Mat A, MatFactorType ftype, Mat *F)

## Calling Sequence

- A - the matrix to be factored

- ftype - the kind of factorization requested (e.g. `MAT_FACTOR_LU`, `MAT_FACTOR_CHOLESKY`)

- F - on output, the newly created factor `Mat` of the appropriate `MatType` for the solver

## See Also

`Mat`, `MatGetFactor()`, `MatSolverType`, `MatFactorType`, `MatSolverTypeRegister()`, `MatSolverTypeGet()`

## Level

developer

## Location

include/petscmat.h

Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages