:orphan:
# PCBJacobiSetTotalBlocks
Sets the global number of blocks for the block Jacobi preconditioner. 
## Synopsis
```
#include "petscpc.h" 
PetscErrorCode PCBJacobiSetTotalBlocks(PC pc, PetscInt blocks, const PetscInt lens[])
```
Collective


## Input Parameters

- ***pc -*** the preconditioner context
- ***blocks -*** the number of blocks
- ***lens -*** [optional] integer array containing the size of each block



## Options Database Key

- ***-pc_bjacobi_blocks <blocks> -*** Sets the number of global blocks



## Note
Currently only a limited number of blocking configurations are supported.
All processors sharing the `PC` must call this routine with the same data.




## See Also
 `PCBJACOBI`, `PCSetUseAmat()`, `PCBJacobiSetLocalBlocks()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/bjacobi/bjacobi.c.html#PCBJacobiSetTotalBlocks">src/ksp/pc/impls/bjacobi/bjacobi.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex7.c.html">src/ksp/ksp/tutorials/ex7.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex7f.F90.html">src/ksp/ksp/tutorials/ex7f.F90</A><BR>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/bjacobi/bjacobi.c.html#PCBJacobiSetTotalBlocks_BJacobi">PCBJacobiSetTotalBlocks_BJacobi in src/ksp/pc/impls/bjacobi/bjacobi.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/pc/impls/bjacobi/bjacobi.c)


[Index of all PC routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
