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 A, MatFactorType mtype, Mat *B))

Input Parameters#

  • type - name of the package, for example petsc or superlu, if this is ‘NULL’, then the first result that satisfies the other criteria is returned

  • 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

Calling sequence of createfactor#

  • A - the matrix providing the factor matrix

  • mtype - the MatType of the factor requested

  • B - the new factor matrix that responds to MatXXFactorSymbolic,Numeric() functions, such as MatLUFactorSymbolic()

Note#

When type is NULL the available functions are searched for based on the order of the calls to MatSolverTypeRegister() in MatInitializePackage(). Since different PETSc configurations may have different external solvers, seemingly identical runs with different PETSc configurations may use a different solver. For example if one configuration had –download-mumps while a different one had –download-superlu_dist.

See Also#

Matrices, Mat, MatFactorType, MatType, MatCopy(), MatDuplicate(), MatGetFactorAvailable(), MatSolverTypeRegister(), MatGetFactor(), MatInitializePackage()

Level#

developer

Location#

src/mat/interface/matrix.c


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