:orphan:
# MatFindOffBlockDiagonalEntries
Finds all the rows of a matrix that have entries outside of the main diagonal block (defined by the matrix block size) 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatFindOffBlockDiagonalEntries(Mat mat, IS *is)
```
Collective


## Input Parameter

- ***mat -*** the matrix



## Output Parameter

- ***is -*** contains the list of rows with off block diagonal entries





## See Also
 [](ch_matrices), `Mat`, `MatMultTranspose()`, `MatMultAdd()`, `MatMultTransposeAdd()`

## Level
developer

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/aij/mpi/mpiaij.c.html#MatFindOffBlockDiagonalEntries_MPIAIJ">MatFindOffBlockDiagonalEntries_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#MatFindOffBlockDiagonalEntries_SeqAIJ">MatFindOffBlockDiagonalEntries_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](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
