Gets the data for the block diagonal matrix format. For the parallel case, this returns information for the local submatrix.


PetscErrorCode PETSCMAT_DLLEXPORT MatBDiagGetData(Mat mat,PetscInt *nd,PetscInt *bs,PetscInt *diag[],PetscInt *bdlen[],PetscScalar ***diagv)

Input Parameters

mat -the matrix, stored in block diagonal format.

Not Collective

Output Parameters

    diag = i/bs - j/bs  (integer division)
Set diag=PETSC_NULL on input for PETSc to dynamically allocate memory as needed (expensive).
m - number of rows
n - number of columns
nd - number of block diagonals
bs - each element of a diagonal is an bs x bs dense matrix
bdlen - array of total block lengths of block diagonals
diag - optional array of block diagonal numbers (length nd). For a matrix element A[i,j], where i=row and j=column, the diagonal number is
diagv - pointer to actual diagonals (in same order as diag array),


See the users manual for further details regarding this storage format.


matrix, block, diagonal, get, data

See Also

MatCreateSeqBDiag(), MatCreateMPIBDiag()

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