# PCPostSolve
Optional post-solve phase, intended for any preconditioner-specific actions that must be performed after the iterative solve itself. 
## Synopsis
```
#include "petscksp.h" 
PetscErrorCode PCPostSolve(PC pc, KSP ksp)
```
Collective


## Input Parameters

- ***pc -*** the preconditioner context
- ***ksp -*** the Krylov subspace context



## Sample of Usage
```none
    PCPreSolve(pc,ksp);
    KSPSolve(ksp,b,x);
    PCPostSolve(pc,ksp);
```



## Note
`KSPSolve()` calls this routine directly, so it is rarely called by the user.




## See Also
 `PC`, `PCSetPostSolve()`, `PCSetPresolve()`, `PCPreSolve()`, `KSPSolve()`

## Level
developer

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/bddc/bddc.c.html#PCPostSolve_BDDC">PCPostSolve_BDDC in src/ksp/pc/impls/bddc/bddc.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/bjacobi/bjkokkos/bjkokkos.kokkos.cxx.html#PCPostSolve_BJKOKKOS">PCPostSolve_BJKOKKOS in src/ksp/pc/impls/bjacobi/bjkokkos/bjkokkos.kokkos.cxx</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/eisens/eisen.c.html#PCPostSolve_Eisenstat">PCPostSolve_Eisenstat in src/ksp/pc/impls/eisens/eisen.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/shell/shellpc.c.html#PCPostSolve_Shell">PCPostSolve_Shell in src/ksp/pc/impls/shell/shellpc.c</A><BR>


---
[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)  
