MatGetTypeFromOptions

Determines from the options database what matrix format the user has specified.

Synopsis

#include "mat.h"  
int MatGetTypeFromOptions(MPI_Comm comm,char *pre,MatType *type,PetscTruth *set)
Collective over MPI_Comm

Input Parameter

comm - the MPI communicator
type - the type of matrix desired, for example MATSEQAIJ, MATMPIAIJ
pre - optional string to prepend to the name

Output Parameters

set -flag indicating whether user set matrix type option; or PETSC_NULL.

Basic Options Database Keys

These options return MATSEQxxx or MATMPIxxx, depending on the communicator, comm.
-mat_aij - AIJ type
-mat_baij - block AIJ type
-mat_dense - dense type
-mat_bdiag - block diagonal type

More Options Database Keys

-mat_seqaij - MATSEQAIJ
-mat_mpiaij - MATMPIAIJ
-mat_seqbaij - MATSEQBAIJ
-mat_mpibaij - MATMPIBAIJ
-mat_seqbdiag - MATSEQBDAIG
-mat_mpibdiag - MATMPIBDIAG
-mat_mpirowbs - MATMPIROWBS
-mat_seqdense - MATSEQDENSE
-mat_mpidense - MATMPIDENSE

Notes

This routine is automatically called within MatCreate() and MatLoad().

Keywords

matrix, get, format, from, options

See Also

MatCreate(), MatLoad()

Examples

src/mat/examples/tutorials/ex1.c
src/sles/examples/tutorials/ex10.c

Level:developer
Location:src/mat/interface/mgtype.c
Matrix Index
Table of Contents