MatDiagonalGetInverseDiagonal#
Get the inverse diagonal of a MATDIAGONAL
Synopsis#
#include "petscmat.h"
PetscErrorCode MatDiagonalGetInverseDiagonal(Mat A, Vec *inv_diag)
Input Parameter#
A - the
MATDIAGONAL
Output Parameter#
inv_diag - the
Vecthat defines the inverse diagonal
Note#
The user must call
MatDiagonalRestoreInverseDiagonal() before using the matrix again.
If a matrix is created only to call MatSolve() (which happens for MATLMVMDIAGBROYDEN),
using MatDiagonalGetInverseDiagonal() and MatDiagonalRestoreInverseDiagonal() avoids copies
and avoids any call to VecReciprocal().
See Also#
Matrices, MATDIAGONAL, MatCreateDiagonal(), MatDiagonalRestoreInverseDiagonal(), MatDiagonalGetDiagonal(), MATLMVMBROYDEN, MatSolve()
Level#
developer
Location#
Implementations#
MatDiagonalGetInverseDiagonal_Diagonal() in src/mat/impls/diagonal/diagonal.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages