petsc-3.12.4 2020-02-04
Report Typos and Errors

# MatIsSymmetric

Test whether a matrix is symmetric

### Synopsis

    #include "petscmat.h"
    PetscErrorCode MatIsSymmetric(Mat A,PetscReal tol,PetscBool  *flg)

Collective on Mat

### Input Parameter

| A | - the matrix to test
| tol | - difference between value and its transpose less than this amount counts as equal (use 0.0 for exact transpose)

### Output Parameters

flg -the result

### Notes

For real numbers MatIsSymmetric() and MatIsHermitian() return identical results

### See Also

MatTranspose(), MatIsTranspose(), MatIsHermitian(), MatIsStructurallySymmetric(), MatSetOption(), MatIsSymmetricKnown()

### Level

intermediate

### Location

src/mat/interface/matrix.c

### Examples

src/ksp/ksp/examples/tutorials/ex72.c.html

### Implementations

MatIsSymmetric_MPIAIJ in src/mat/impls/aij/mpi/mpiaij.c
MatIsSymmetric_SeqAIJ in src/mat/impls/aij/seq/aij.c
MatIsSymmetric_IS in src/mat/impls/is/matis.c
MatIsSymmetric_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