# PCFactorSetShiftAmount
adds a quantity to the diagonal of the matrix during numerical factorization, thus the matrix has nonzero pivots 
## Synopsis
```
#include "petscpc.h" 
PetscErrorCode PCFactorSetShiftAmount(PC pc, PetscReal shiftamount)
```
Logically Collective


## Input Parameters

- ***pc -*** the preconditioner context
- ***shiftamount -*** amount of shift or `PETSC_DECIDE` for the default



## Options Database Key

- ***-pc_factor_shift_amount <shiftamount> -*** Sets shift amount or -1 for the default





## See Also
 `PCCHOLESKY`, `PCLU`, ``PCFactorSetZeroPivot()`, `PCFactorSetShiftType()`

## Level
intermediate

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/factor/factimpl.c.html#PCFactorSetShiftAmount_Factor">PCFactorSetShiftAmount_Factor in src/ksp/pc/impls/factor/factimpl.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/pc/impls/factor/factor.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)  
