MATDIAGONAL — PETSc 3.21.4 documentation

Skip to main content
`Ctrl`+`K`

# MATDIAGONAL

MATDIAGONAL = “diagonal” - A diagonal matrix type with the diagonal implemented as a `Vec`. Useful for cases where `VecPointwiseMult()` or `VecPointwiseDivide()` should be thought of as the actions of a linear operator.

## See Also

Matrices, `Mat`, `MatCreateDiagonal()`, `MatDiagonalRestoreInverseDiagonal()`, `MatDiagonalGetDiagonal()`, `MatDiagonalRestoreDiagonal()`, `MatDiagonalGetInverseDiagonal()`

## Level

advanced

## Location

src/mat/impls/diagonal/diagonal.c

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