MatSetFromOptions#
Creates a matrix where the type is determined from the options database.
Synopsis#
#include "petscmat.h"
PetscErrorCode MatSetFromOptions(Mat B)
Collective
Input Parameter#
B - the matrix
Options Database Keys#
-mat_type seqaij -
MATSEQAIJ
type, usesMatCreateSeqAIJ()
-mat_type mpiaij -
MATMPIAIJ
type, usesMatCreateAIJ()
-mat_type seqdense -
MATSEQDENSE
type, usesMatCreateSeqDense()
-mat_type mpidense -
MATMPIDENSE
, usesMatCreateDense()
-mat_type seqbaij -
MATSEQBAIJ
, usesMatCreateSeqBAIJ()
-mat_type mpibaij -
MATMPIBAIJ
, usesMatCreateBAIJ()
See the manpages for particular formats (e.g., MATSEQAIJ
)
for additional format-specific options.
Notes#
Generates a parallel MPI matrix if the communicator has more than one processor. The default
matrix type is MATAIJ
, using the routines MatCreateSeqAIJ()
and MatCreateAIJ()
if you
do not select a type in the options database.
See Also#
Matrices, Mat
, MatCreateSeqAIJ()
, MatCreateAIJ()
,
MatCreateSeqDense()
, MatCreateDense()
,
MatCreateSeqBAIJ()
, MatCreateBAIJ()
,
MatCreateSeqSBAIJ()
, MatCreateSBAIJ()
,
MatConvert()
Level#
beginner
Location#
Examples#
src/ts/tutorials/ex20fwd.c
src/ts/tutorials/ex24.c
src/ts/tutorials/ex36.c
src/ts/tutorials/ex20td.c
src/ts/tutorials/ex31.c
src/ts/tutorials/ex2.c
src/ts/tutorials/ex44.c
src/ts/tutorials/ex5.c
src/ts/tutorials/ex20.c
src/ts/tutorials/extchem.c
Implementations#
MatSetFromOptions_MKL_CPARDISO() in src/mat/impls/aij/mpi/mkl_cpardiso/mkl_cpardiso.c
MatSetFromOptions_MPIAIJ() in src/mat/impls/aij/mpi/mpiaij.c
MatSetFromOptions_MPIAIJCUSPARSE() in src/mat/impls/aij/mpi/mpicusparse/mpiaijcusparse.cu
MatSetFromOptions_MPIAIJHIPSPARSE() in src/mat/impls/aij/mpi/mpihipsparse/mpiaijhipsparse.hip.c
MatSetFromOptions_MUMPS() in src/mat/impls/aij/mpi/mumps/mumps.c
MatSetFromOptions_MKL_PARDISO() in src/mat/impls/aij/seq/mkl_pardiso/mkl_pardiso.c
MatSetFromOptions_SeqAIJCUSPARSE() in src/mat/impls/aij/seq/seqcusparse/aijcusparse.cu
MatSetFromOptions_SeqAIJHIPSPARSE() in src/mat/impls/aij/seq/seqhipsparse/aijhipsparse.hip.c
MatSetFromOptions_Composite() in src/mat/impls/composite/mcomposite.c
MatSetFromOptions_H2OPUS() in src/mat/impls/h2opus/cuda/math2opus.cu
MatSetFromOptions_Htool() in src/mat/impls/htool/htool.cxx
MatSetFromOptions_IS() in src/mat/impls/is/matis.c
MatSetFromOptions_MFFD() in src/mat/impls/mffd/mffd.c
MatSetFromOptions_MPISELLCUDA() in src/mat/impls/sell/mpi/mpicuda/mpisellcuda.cu
MatSetFromOptions_MPISELLHIP() in src/mat/impls/sell/mpi/mpihip/mpisellhip.hip.c
MatSetFromOptions_MPISELL() in src/mat/impls/sell/mpi/mpisell.c
MatSetFromOptions_SeqSELLCUDA() in src/mat/impls/sell/seq/seqcuda/sellcuda.cu
MatSetFromOptions_SeqSELLHIP() in src/mat/impls/sell/seq/seqhip/sellhip.hip.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages