:orphan: # MatGetOption Gets a parameter option that has been set for a matrix. ## Synopsis ``` #include "petscmat.h" PetscErrorCode MatGetOption(Mat mat, MatOption op, PetscBool *flg) ``` Logically Collective ## Input Parameters - ***mat -*** the matrix - ***option -*** the option, this only responds to certain options, check the code for which ones ## Output Parameter - ***flg -*** turn the option on (`PETSC_TRUE`) or off (`PETSC_FALSE`) ## Notes Can only be called after `MatSetSizes()` and `MatSetType()` have been set. Certain option values may be unknown, for those use the routines `MatIsSymmetric()`, `MatIsHermitian()`, `MatIsStructurallySymmetric()`, or `MatIsSymmetricKnown()`, `MatIsHermitianKnown()`, `MatIsStructurallySymmetricKnown()` ## See Also [](ch_matrices), `Mat`, `MatOption`, `MatSetOption()`, `MatIsSymmetric()`, `MatIsHermitian()`, `MatIsStructurallySymmetric()`, `MatIsSymmetricKnown()`, `MatIsHermitianKnown()`, `MatIsStructurallySymmetricKnown()` ## Level intermediate ## Location src/mat/interface/matrix.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/interface/matrix.c) [Index of all Mat routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)