MatIsStructurallySymmetric#

Test whether a matrix is structurally symmetric

Synopsis#

#include "petscmat.h" 
PetscErrorCode MatIsStructurallySymmetric(Mat A, PetscBool *flg)

Collective

Input Parameter#

  • A - the matrix to test

Output Parameter#

  • flg - the result

Notes#

If the matrix does yet know it is structurally symmetric this can be an expensive operation, also available MatIsStructurallySymmetricKnown()

One can declare that a matrix is structurally symmetric with MatSetOption(mat,MAT_STRUCTURALLY_SYMMETRIC,PETSC_TRUE) and if it is known to remain structurally symmetric after changes to the matrices values one can call MatSetOption(mat,MAT_STRUCTURAL_SYMMETRY_ETERNAL,PETSC_TRUE)

See Also#

Matrices, Mat, MAT_STRUCTURALLY_SYMMETRIC, MAT_STRUCTURAL_SYMMETRY_ETERNAL, MatTranspose(), MatIsTranspose(), MatIsHermitian(), MatIsSymmetric(), MatSetOption(), MatIsStructurallySymmetricKnown()

Level#

intermediate

Location#

src/mat/interface/matrix.c

Implementations#

MatIsStructurallySymmetric_IS() in src/mat/impls/is/matis.c
MatIsStructurallySymmetric_SeqSBAIJ() in src/mat/impls/sbaij/seq/sbaij.c


Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages