MatGetFactor

Returns a matrix suitable to calls to MatXXFactorSymbolic()

Synopsis

#include "petscmat.h" 
PetscErrorCode MatGetFactor(Mat mat, MatSolverType type,MatFactorType ftype,Mat *f)
Collective on Mat

Input Parameters

mat - the matrix
type - name of solver type, for example, superlu, petsc (to use PETSc's default)
ftype - factor type, MAT_FACTOR_LU, MAT_FACTOR_CHOLESKY, MAT_FACTOR_ICC, MAT_FACTOR_ILU,

Output Parameters

f - the factor matrix used with MatXXFactorSymbolic() calls

Notes

Some PETSc matrix formats have alternative solvers available that are contained in alternative packages such as pastix, superlu, mumps etc.

PETSc must have been ./configure to use the external solver, using the option --download-package

Developer Notes

This should actually be called MatCreateFactor() since it creates a new factor object

Level: intermediate

See Also

MatCopy(), MatDuplicate(), MatGetFactorAvailable(), MatFactorGetUseOrdering(), MatSolverTypeRegister()

Location:matrix.c