:orphan:
# PCFactorSetAllowDiagonalFill
Causes all diagonal matrix entries to be treated as level 0 fill even if there is no non-zero location. 
## Synopsis
```
#include "petscpc.h" 
PetscErrorCode PCFactorSetAllowDiagonalFill(PC pc, PetscBool flg)
```
Logically Collective


## Input Parameters

- ***pc -*** the preconditioner context
- ***flg -*** `PETSC_TRUE` to turn on, `PETSC_FALSE` to turn off



## Options Database Key

- ***-pc_factor_diagonal_fill <bool> -*** allow the diagonal fill



## Note
Does not apply with 0 fill.




## See Also
 `PCILU`, `PCICC`, `PCFactorGetAllowDiagonalFill()`

## Level
intermediate

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/factor/factimpl.c.html#PCFactorSetAllowDiagonalFill_Factor">PCFactorSetAllowDiagonalFill_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](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
