# MatSetVariableBlockSizes
Sets diagonal point-blocks of the matrix that need not be of the same size 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatSetVariableBlockSizes(Mat mat, PetscInt nblocks, PetscInt *bsizes)
```
Logically Collective


## Input Parameters

- ***mat -*** the matrix
- ***nblocks -*** the number of blocks on this process, each block can only exist on a single process
- ***bsizes -*** the block sizes





## Notes
Currently used by `PCVPBJACOBI` for `MATAIJ` matrices

Each variable point-block set of degrees of freedom must live on a single MPI rank. That is a point block cannot straddle two MPI ranks.


## See Also
 `Mat`, `MatCreateSeqBAIJ()`, `MatCreateBAIJ()`, `MatGetBlockSize()`, `MatSetBlockSizes()`, `MatGetBlockSizes()`, `MatGetVariableBlockSizes()`,
`MatComputeVariableBlockEnvelope()`, `PCVPBJACOBI`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/interface/matrix.c.html#MatSetVariableBlockSizes">src/mat/interface/matrix.c</A>


---
[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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
