MatSetType#

Builds matrix object for a particular matrix type

Synopsis#

#include "petscmat.h" 
PetscErrorCode MatSetType(Mat mat, MatType matype)

Collective

Input Parameters#

  • mat - the matrix object

  • matype - matrix type

Options Database Key#

  • -mat_type type - Sets the type; see MatType

Note#

See MatType for possible values

See Also#

Matrices, Mat, PCSetType(), VecSetType(), MatCreate(), MatType

Level#

intermediate

Location#

src/mat/interface/matreg.c

Examples#

src/mat/tutorials/ex1.c
src/mat/tutorials/ex10.c
src/mat/tutorials/ex12.c
src/mat/tutorials/ex2.c
src/mat/tutorials/ex8.c
src/mat/tests/bench_spmv.c
src/mat/tests/ex1.c
src/mat/tests/ex101.c
src/mat/tests/ex102.c
src/mat/tests/ex103.c


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