petsc-3.7.1 2016-05-15
Report Typos and Errors

# 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 Many br

### Input Parameters

mat -the matrix Many br

### Output Parameter

trace -the sum of the diagonal entries Many br

Many br

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