MatGetType#

Gets the matrix type as a string from the matrix object.

Synopsis#

#include "petscmat.h" 
PetscErrorCode MatGetType(Mat mat, MatType *type)

Not Collective

Input Parameter#

  • mat - the matrix

Output Parameter#

  • type - name of matrix type

Note#

type should not be retained for later use as it will be an invalid pointer if the MatType of mat is changed.

See Also#

Matrices, Mat, MatType, MatSetType(), PetscObjectTypeCompare(), PetscObjectTypeCompareAny()

Level#

intermediate

Location#

src/mat/interface/matreg.c

Examples#

src/mat/tests/ex103.c
src/mat/tests/ex2.c
src/mat/tests/ex217.c
src/mat/tests/ex23.c
src/mat/tests/ex237.c
src/mat/tests/ex243.c
src/mat/tests/ex26.c
src/mat/tests/ex261.c
src/mat/tests/ex309.c
src/mat/tests/ex310.c


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