MatCreateFromOptions#

Creates a matrix whose type is set from the options database

Synopsis#

#include "petscmat.h"  
PetscErrorCode MatCreateFromOptions(MPI_Comm comm, const char *prefix, PetscInt bs, PetscInt m, PetscInt n, PetscInt M, PetscInt N, Mat *A)

Collective

Input Parameters#

Output Parameter#

  • A - the matrix

Options Database Key#

  • -mat_type - see MatType, for example aij, aijcusparse, baij, sbaij, dense, defaults to aij

See Also#

Matrices, Mat, MatCreateSeqAIJ(), MatCreateAIJ(), MatCreateSeqDense(), MatCreateDense(), MatCreateSeqBAIJ(), MatCreateBAIJ(), MatCreateSeqSBAIJ(), MatCreateSBAIJ(), MatConvert(), MatCreate()

Level#

beginner

Location#

src/mat/utils/gcreate.c

Examples#

src/ksp/ksp/tutorials/ex27.c


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