:orphan: # MatGetBlockSizes Returns the matrix block row and column sizes. ## Synopsis ``` #include "petscmat.h" PetscErrorCode MatGetBlockSizes(Mat mat, PetscInt *rbs, PetscInt *cbs) ``` Not Collective ## Input Parameter - ***mat -*** the matrix ## Output Parameters - ***rbs -*** row block size - ***cbs -*** column block size ## Notes Block row formats are `MATBAIJ` and `MATSBAIJ` ALWAYS have square block storage in the matrix. If you pass a different block size for the columns than the rows, the row block size determines the square block storage. If a block size has not been set yet this routine returns 1. ## See Also [](ch_matrices), `Mat`, `MATBAIJ`, `MATSBAIJ`, `MatCreateSeqBAIJ()`, `MatCreateBAIJ()`, `MatGetBlockSize()`, `MatSetBlockSize()`, `MatSetBlockSizes()` ## Level intermediate ## Location src/mat/interface/matrix.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/interface/matrix.c) [Index of all Mat routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)