# PCSetPreSolve
Sets function used by `PCPreSolve()` which is intended for any preconditioner-specific actions that must be performed before the iterative solve itself. 
## Synopsis
```
#include "petscksp.h" 
PetscErrorCode PCSetPreSolve(PC pc, PetscErrorCode (*presolve)(PC, KSP))
```
Logically Collective


## Input Parameters

- ***pc -*** the preconditioner object
- ***presolve -*** the function to call before the solve



## Calling sequence of presolve
```none
func(PC pc,KSP ksp)
```


- ***pc -*** the PC context
- ***ksp -*** the KSP context





## See Also
 `PC`, `PCSetUp()`, `PCPreSolve()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/interface/precon.c.html#PCSetPreSolve">src/ksp/pc/interface/precon.c</A>


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