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_block_size size - set the block size used to store the matrix; see
MatSetBlockSize()-mat_type type - set the matrix type; see
MatTypeandMatSetType()-mat_vec_type vtype - set the
VecTypeused byMatCreateVecs(); seeMatSetVecType()-mat_is_symmetric tol - check symmetry during
MatAssemblyEnd()with an optional tolerance; seeMatIsSymmetric()-mat_null_space_test (true|false) - test the attached null space during
MatAssemblyEnd(); seeMatNullSpaceTest()-mat_error_if_failure (true|false) - generate an error if matrix factorization fails; see
MatSetErrorIfFailure()-mat_spd (true|false) - set the
MAT_SPDproperty withMatSetOption()-mat_new_nonzero_location_err (true|false) - generate an error if insertion creates a new nonzero location; see
MAT_NEW_NONZERO_LOCATION_ERRinMatSetOption()-mat_new_nonzero_allocation_err (true|false) - generate an error if insertion requires additional nonzero allocation; see
MAT_NEW_NONZERO_ALLOCATION_ERRinMatSetOption()-mat_ignore_zero_entries (true|false) - ignore eligible zero entries during insertion; see
MAT_IGNORE_ZERO_ENTRIESinMatSetOption()-mat_form_explicit_transpose (true|false) - hint to form an explicit transpose for operations such as
MatMultTranspose()-mat_bind_below size - bind the matrix to the CPU if its number of local rows is less than size; see
MatBindToCPU()
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 the manpages for particular formats (e.g., MATSEQAIJ)
for additional format-specific options.
See Also#
Matrices, Mat, MatType, MatCreateSeqAIJ(), MatCreateAIJ(),
MatCreateSeqDense(), MatCreateDense(),
MatCreateSeqBAIJ(), MatCreateBAIJ(),
MatCreateSeqSBAIJ(), MatCreateSBAIJ(),
MatConvert()
Level#
beginner
Location#
Examples#
src/mat/tutorials/ex10.c
src/mat/tutorials/ex15.c
src/mat/tutorials/ex15f.F90
src/mat/tutorials/ex16.c
src/mat/tutorials/ex17.c
src/mat/tutorials/ex17f.F90
src/mat/tutorials/ex18.c
src/mat/tutorials/ex19.c
src/mat/tutorials/ex4.c
src/mat/tutorials/ex4f.F90
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.cxx
MatSetFromOptions_MUMPS() in src/mat/impls/aij/mpi/mumps/impl/imumps.c
MatSetFromOptions_PaStiX() in src/mat/impls/aij/mpi/pastix/pastix.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.cxx
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/impl/ihtool.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.cxx
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.cxx
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages