# MatInvertVariableBlockDiagonal
Inverts the point block diagonal entries. 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatInvertVariableBlockDiagonal(Mat mat, PetscInt nblocks, const PetscInt *bsizes, PetscScalar *values)
```
Collective; No Fortran Support


## Input Parameters

- ***mat -*** the matrix
- ***nblocks -*** the number of blocks on the process, set with `MatSetVariableBlockSizes()`
- ***bsizes -*** the size of each block on the process, set with `MatSetVariableBlockSizes()`



## Output Parameters

- ***values -*** the block inverses in column major order (FORTRAN-like)





## Notes
Use `MatInvertBlockDiagonal()` if all blocks have the same size

The blocks never overlap between two MPI ranks, use `MatInvertVariableBlockEnvelope()` for that case


## See Also
 `Mat`, `MatInvertBlockDiagonal()`, `MatSetVariableBlockSizes()`, `MatInvertVariableBlockEnvelope()`

## Level
advanced

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/aij/mpi/mpiaij.c.html#MatInvertVariableBlockDiagonal_MPIAIJ">MatInvertVariableBlockDiagonal_MPIAIJ in src/mat/impls/aij/mpi/mpiaij.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/aij/seq/aij.c.html#MatInvertVariableBlockDiagonal_SeqAIJ">MatInvertVariableBlockDiagonal_SeqAIJ in src/mat/impls/aij/seq/aij.c</A><BR>


---
[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)  
