Skip to main content
`Ctrl`+`K`

# MatMissingDiagonal

Determine if sparse matrix is missing a diagonal entry (or block entry for `MATBAIJ` and `MATSBAIJ` matrices) in the nonzero structure

## Synopsis

    #include "petscmat.h"
    PetscErrorCode MatMissingDiagonal(Mat mat, PetscBool *missing, PetscInt *dd)

Not Collective

## Input Parameter

- mat - the matrix

## Output Parameters

- missing - is any diagonal entry missing

- dd - first diagonal entry that is missing (optional) on this process

## Note

This does not return diagonal entries that are in the nonzero structure but happen to have a zero numerical value

## See Also

Matrices, `Mat`

## Level

advanced

## Location

src/mat/interface/matrix.c

## Implementations

MatMissingDiagonal_MPIAIJ() in src/mat/impls/aij/mpi/mpiaij.c
MatMissingDiagonal_SeqAIJ() in src/mat/impls/aij/seq/aij.c
MatMissingDiagonal_MPIBAIJ() in src/mat/impls/baij/mpi/mpibaij.c
MatMissingDiagonal_SeqBAIJ() in src/mat/impls/baij/seq/baij.c
MatMissingDiagonal_ConstantDiagonal() in src/mat/impls/cdiagonal/cdiagonal.c
MatMissingDiagonal_MPIDense() in src/mat/impls/dense/mpi/mpidense.c
MatMissingDiagonal_SeqDense() in src/mat/impls/dense/seq/dense.c
MatMissingDiagonal_Elemental() in src/mat/impls/elemental/matelem.cxx
MatMissingDiagonal_HYPRE() in src/mat/impls/hypre/mhypre.c
MatMissingDiagonal_IS() in src/mat/impls/is/matis.c
MatMissingDiagonal_Nest() in src/mat/impls/nest/matnest.c
MatMissingDiagonal_MPISBAIJ() in src/mat/impls/sbaij/mpi/mpisbaij.c
MatMissingDiagonal_SeqSBAIJ() in src/mat/impls/sbaij/seq/sbaij.c
MatMissingDiagonal_ScaLAPACK() in src/mat/impls/scalapack/matscalapack.c
MatMissingDiagonal_MPISELL() in src/mat/impls/sell/mpi/mpisell.c
MatMissingDiagonal_SeqSELL() in src/mat/impls/sell/seq/sell.c
MatMissingDiagonal_Shell() in src/mat/impls/shell/shell.c

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