# MatGetBlockSize

Returns the matrix block size; useful especially for the block row and block diagonal formats.

### Synopsis

    #include "petscmat.h"
    PetscErrorCode  MatGetBlockSize(Mat mat,PetscInt *bs)

Not Collective

### Input Parameter

mat -the matrix

### Output Parameter

bs -block size

### C++ variants

| PetscInt MatGetBlockSize(Mat mat) |  | -> |  | MatGetBlockSize(mat,&a); return a;

### Notes

Block diagonal formats are MATSEQBDIAG, MATMPIBDIAG. Block row formats are MATSEQBAIJ, MATMPIBAIJ, MATSEQSBAIJ, MATMPISBAIJ

### See Also

MatCreateSeqBAIJ(), MatCreateMPIBAIJ(), MatCreateSeqBDiag(), MatCreateMPIBDiag()

Level:intermediate
Location: src/mat/interface/matrix.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages