# MatIsSPDKnown Checks if a matrix knows if it is symmetric positive definite or not and its symmetric positive definite state ## Synopsis ``` #include "petscmat.h" PetscErrorCode MatIsSPDKnown(Mat A, PetscBool *set, PetscBool *flg) ``` Not Collective ## Input Parameter - ***A -*** the matrix to check ## Output Parameters - ***set -*** `PETSC_TRUE` if the matrix knows its symmetric positive definite state (this tells you if the next flag is valid) - ***flg -*** the result (only valid if set is `PETSC_TRUE`) ## Notes Does not check the matrix values directly, so this may return unknown (set = `PETSC_FALSE`). One can declare that a matrix is SPD with `MatSetOption`(mat,`MAT_SPD`,`PETSC_TRUE`) and if it is known to remain SPD after changes to the matrices values one can call `MatSetOption`(mat,`MAT_SPD_ETERNAL`,`PETSC_TRUE`) ## See Also `Mat`, `MAT_SPD_ETERNAL`, `MAT_SPD`, `MatTranspose()`, `MatIsTranspose()`, `MatIsHermitian()`, `MatIsStructurallySymmetric()`, `MatSetOption()`, `MatIsSymmetric()`, `MatIsHermitianKnown()` ## Level advanced ## 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](/docs/manualpages/index.md) [Index of all manual pages](/docs/manualpages/singleindex.md)