# PCJacobiSetType
Causes the Jacobi preconditioner to use either the diagonal, the maximum entry in each row, of the sum of rows entries for the diagonal preconditioner 
## Synopsis
```
#include "petscpc.h" 
PetscErrorCode PCJacobiSetType(PC pc, PCJacobiType type)
```
Logically Collective


## Input Parameters

- ***pc -*** the preconditioner context
- ***type -*** `PC_JACOBI_DIAGONAL`, `PC_JACOBI_ROWMAX`, `PC_JACOBI_ROWSUM`



## Options Database Key

- ***-pc_jacobi_type <diagonal,rowmax,rowsum> -*** the type of diagonal matrix to use for Jacobi





## Developer Note
Why is there a separate function for using the absolute value?


## See Also
 `PCJACOBI`, `PCJacobiSetUseAbs()`, `PCJacobiGetType()`

## Level
intermediate

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

## Implementations

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


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


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