# PCApply
Applies the preconditioner to a vector. 
## Synopsis
```
#include "petscksp.h" 
PetscErrorCode PCApply(PC pc, Vec x, Vec y)
```
Collective on pc


## Input Parameters

- ***pc -*** the preconditioner context
- ***x -*** input vector



## Output Parameter

- ***y -*** output vector





## See Also
 `PC`, `PCApplyTranspose()`, `PCApplyBAorAB()`

## Level
developer

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

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex27.c.html">src/ksp/ksp/tutorials/ex27.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex79.c.html">src/ksp/ksp/tutorials/ex79.c.html</A><BR>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/amgx/amgx.cxx.html#PCApply_AMGX">PCApply_AMGX in src/ksp/pc/impls/amgx/amgx.cxx</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/asm/asm.c.html#PCApply_ASM">PCApply_ASM in src/ksp/pc/impls/asm/asm.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/bddc/bddc.c.html#PCApply_BDDC">PCApply_BDDC in src/ksp/pc/impls/bddc/bddc.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/bddc/bddc.c.html#PCApply_BDDCIPC">PCApply_BDDCIPC 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#PCApply_BJKOKKOS">PCApply_BJKOKKOS in src/ksp/pc/impls/bjacobi/bjkokkos/bjkokkos.kokkos.cxx</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/chowiluviennacl/chowiluviennacl.cxx.html#PCApply_CHOWILUVIENNACL">PCApply_CHOWILUVIENNACL in src/ksp/pc/impls/chowiluviennacl/chowiluviennacl.cxx</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/cp/cp.c.html#PCApply_CP">PCApply_CP in src/ksp/pc/impls/cp/cp.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/deflation/deflation.c.html#PCApply_Deflation">PCApply_Deflation in src/ksp/pc/impls/deflation/deflation.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/eisens/eisen.c.html#PCApply_Eisenstat">PCApply_Eisenstat in src/ksp/pc/impls/eisens/eisen.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/factor/cholesky/cholesky.c.html#PCApply_Cholesky">PCApply_Cholesky in src/ksp/pc/impls/factor/cholesky/cholesky.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/factor/icc/icc.c.html#PCApply_ICC">PCApply_ICC in src/ksp/pc/impls/factor/icc/icc.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/factor/ilu/ilu.c.html#PCApply_ILU">PCApply_ILU in src/ksp/pc/impls/factor/ilu/ilu.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/factor/lu/lu.c.html#PCApply_LU">PCApply_LU in src/ksp/pc/impls/factor/lu/lu.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/factor/qr/qr.c.html#PCApply_QR">PCApply_QR in src/ksp/pc/impls/factor/qr/qr.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/fieldsplit/fieldsplit.c.html#PCApply_FieldSplit">PCApply_FieldSplit in src/ksp/pc/impls/fieldsplit/fieldsplit.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/galerkin/galerkin.c.html#PCApply_Galerkin">PCApply_Galerkin in src/ksp/pc/impls/galerkin/galerkin.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/gasm/gasm.c.html#PCApply_GASM">PCApply_GASM in src/ksp/pc/impls/gasm/gasm.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/h2opus/pch2opus.c.html#PCApply_H2OPUS">PCApply_H2OPUS in src/ksp/pc/impls/h2opus/pch2opus.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/hpddm/pchpddm.cxx.html#PCApply_HPDDM">PCApply_HPDDM in src/ksp/pc/impls/hpddm/pchpddm.cxx</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/hpddm/pchpddm.cxx.html#PCApply_HPDDMShell">PCApply_HPDDMShell in src/ksp/pc/impls/hpddm/pchpddm.cxx</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/hypre/hypre.c.html#PCApply_HYPRE">PCApply_HYPRE in src/ksp/pc/impls/hypre/hypre.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/hypre/hypre.c.html#PCApply_PFMG">PCApply_PFMG in src/ksp/pc/impls/hypre/hypre.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/hypre/hypre.c.html#PCApply_SysPFMG">PCApply_SysPFMG in src/ksp/pc/impls/hypre/hypre.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/hypre/hypre.c.html#PCApply_SMG">PCApply_SMG in src/ksp/pc/impls/hypre/hypre.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/is/nn/nn.c.html#PCApply_NN">PCApply_NN in src/ksp/pc/impls/is/nn/nn.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/jacobi/jacobi.c.html#PCApply_Jacobi">PCApply_Jacobi in src/ksp/pc/impls/jacobi/jacobi.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/kaczmarz/kaczmarz.c.html#PCApply_Kaczmarz">PCApply_Kaczmarz in src/ksp/pc/impls/kaczmarz/kaczmarz.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/ksp/pcksp.c.html#PCApply_KSP">PCApply_KSP in src/ksp/pc/impls/ksp/pcksp.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/lmvm/lmvmpc.c.html#PCApply_LMVM">PCApply_LMVM in src/ksp/pc/impls/lmvm/lmvmpc.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/lsc/lsc.c.html#PCApply_LSC">PCApply_LSC in src/ksp/pc/impls/lsc/lsc.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/mat/pcmat.c.html#PCApply_Mat">PCApply_Mat in src/ksp/pc/impls/mat/pcmat.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/mg/mg.c.html#PCApply_MG">PCApply_MG in src/ksp/pc/impls/mg/mg.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/mpi/pcmpi.c.html#PCApply_Seq">PCApply_Seq in src/ksp/pc/impls/mpi/pcmpi.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/mpi/pcmpi.c.html#PCApply_MPI">PCApply_MPI in src/ksp/pc/impls/mpi/pcmpi.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/none/none.c.html#PCApply_None">PCApply_None in src/ksp/pc/impls/none/none.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/parms/parms.c.html#PCApply_PARMS">PCApply_PARMS in src/ksp/pc/impls/parms/parms.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/patch/pcpatch.c.html#PCApply_PATCH">PCApply_PATCH in src/ksp/pc/impls/patch/pcpatch.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/redistribute/redistribute.c.html#PCApply_Redistribute">PCApply_Redistribute in src/ksp/pc/impls/redistribute/redistribute.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/redundant/redundant.c.html#PCApply_Redundant">PCApply_Redundant in src/ksp/pc/impls/redundant/redundant.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/rowscalingviennacl/rowscalingviennacl.cxx.html#PCApply_ROWSCALINGVIENNACL">PCApply_ROWSCALINGVIENNACL in src/ksp/pc/impls/rowscalingviennacl/rowscalingviennacl.cxx</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/saviennacl/saviennacl.cxx.html#PCApply_SAVIENNACL">PCApply_SAVIENNACL in src/ksp/pc/impls/saviennacl/saviennacl.cxx</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/shell/shellpc.c.html#PCApply_Shell">PCApply_Shell in src/ksp/pc/impls/shell/shellpc.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/sor/sor.c.html#PCApply_SOR">PCApply_SOR in src/ksp/pc/impls/sor/sor.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/spai/ispai.c.html#PCApply_SPAI">PCApply_SPAI in src/ksp/pc/impls/spai/ispai.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/svd/svd.c.html#PCApply_SVD">PCApply_SVD in src/ksp/pc/impls/svd/svd.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/telescope/telescope.c.html#PCApply_Telescope">PCApply_Telescope in src/ksp/pc/impls/telescope/telescope.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/vpbjacobi/vpbjacobi.c.html#PCApply_VPBJacobi">PCApply_VPBJacobi in src/ksp/pc/impls/vpbjacobi/vpbjacobi.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)  
