petsc-3.10.5 2019-03-28
MatGetTrace
Gets the trace of a matrix. The sum of the diagonal entries.
Synopsis
#include "petscmat.h"
PetscErrorCode MatGetTrace(Mat mat,PetscScalar *trace)
Collective on Mat
Input Parameters
mat -the matrix
Output Parameter
trace -the sum of the diagonal entries
Level
advanced
Location
src/mat/interface/matrix.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages