:orphan:
# PCFieldSplitSetDetectSaddlePoint
Sets flag indicating whether `PCFIELDSPLIT` will attempt to automatically determine fields based on zero diagonal entries. 
## Synopsis
```
#include "petscpc.h" 
PetscErrorCode PCFieldSplitSetDetectSaddlePoint(PC pc, PetscBool flg)
```
Logically Collective


## Input Parameter

- ***pc   -*** the preconditioner context



## Output Parameter

- ***flg  -*** boolean indicating whether to detect fields or not



## Options Database Key

- ***-pc_fieldsplit_detect_saddle_point <bool> -*** detect and use the saddle point





## Note
Also sets the split type to `PC_COMPOSITE_SCHUR` (see `PCFieldSplitSetType()`) and the Schur preconditioner type to `PC_FIELDSPLIT_SCHUR_PRE_SELF` (see `PCFieldSplitSetSchurPre()`).


## See Also
 [](sec_block_matrices), `PC`, `PCFIELDSPLIT`, `PCFieldSplitGetDetectSaddlePoint()`, `PCFieldSplitSetType()`, `PCFieldSplitSetSchurPre()`, `PC_FIELDSPLIT_SCHUR_PRE_SELF`

## Level
Intermediate

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

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/stag/tutorials/ex2.c.html">src/dm/impls/stag/tutorials/ex2.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/stag/tutorials/ex3.c.html">src/dm/impls/stag/tutorials/ex3.c</A><BR>


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