# MatFindZeroDiagonals
Finds all the rows of a matrix that have zero or no diagonal entry in the matrix 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatFindZeroDiagonals(Mat mat, IS *is)
```
Collective


## Input Parameter

- ***mat -*** the matrix



## Output Parameter

- ***is -*** if any rows have zero diagonals this contains the list of them





## See Also
 `MatMultTranspose()`, `MatMultAdd()`, `MatMultTransposeAdd()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/interface/matrix.c.html#MatFindZeroDiagonals">src/mat/interface/matrix.c</A>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/aij/mpi/mpiaij.c.html#MatFindZeroDiagonals_MPIAIJ">MatFindZeroDiagonals_MPIAIJ in src/mat/impls/aij/mpi/mpiaij.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/aij/seq/aij.c.html#MatFindZeroDiagonals_SeqAIJ">MatFindZeroDiagonals_SeqAIJ in src/mat/impls/aij/seq/aij.c</A><BR>


---
[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)  
