# PCReset
Resets a PC context to the pcsetupcalled = 0 state and removes any allocated `Vec`s and `Mat`s 
## Synopsis
```
#include "petscksp.h" 
PetscErrorCode PCReset(PC pc)
```
Collective on pc


## Input Parameter

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





## Note
This allows a `PC` to be reused for a different sized linear system but using the same options that have been previously set in the PC


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

## Level
developer

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/amgx/amgx.cxx.html#PCReset_AMGX">PCReset_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#PCReset_ASM">PCReset_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#PCReset_BDDC">PCReset_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#PCReset_BJKOKKOS">PCReset_BJKOKKOS in src/ksp/pc/impls/bjacobi/bjkokkos/bjkokkos.kokkos.cxx</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/composite/composite.c.html#PCReset_Composite">PCReset_Composite in src/ksp/pc/impls/composite/composite.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/cp/cp.c.html#PCReset_CP">PCReset_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#PCReset_Deflation">PCReset_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#PCReset_Eisenstat">PCReset_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#PCReset_Cholesky">PCReset_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#PCReset_ICC">PCReset_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#PCReset_ILU">PCReset_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#PCReset_LU">PCReset_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#PCReset_QR">PCReset_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#PCReset_FieldSplit">PCReset_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#PCReset_Galerkin">PCReset_Galerkin in src/ksp/pc/impls/galerkin/galerkin.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/gamg/gamg.c.html#PCReset_GAMG">PCReset_GAMG in src/ksp/pc/impls/gamg/gamg.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/gasm/gasm.c.html#PCReset_GASM">PCReset_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#PCReset_H2OPUS">PCReset_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#PCReset_HPDDM">PCReset_HPDDM 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#PCReset_HYPRE">PCReset_HYPRE in src/ksp/pc/impls/hypre/hypre.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/jacobi/jacobi.c.html#PCReset_Jacobi">PCReset_Jacobi in src/ksp/pc/impls/jacobi/jacobi.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/ksp/pcksp.c.html#PCReset_KSP">PCReset_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#PCReset_LMVM">PCReset_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#PCReset_LSC">PCReset_LSC in src/ksp/pc/impls/lsc/lsc.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/mg/mg.c.html#PCReset_MG">PCReset_MG in src/ksp/pc/impls/mg/mg.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/ml/ml.c.html#PCReset_ML">PCReset_ML in src/ksp/pc/impls/ml/ml.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/patch/pcpatch.c.html#PCReset_PATCH">PCReset_PATCH in src/ksp/pc/impls/patch/pcpatch.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/redundant/redundant.c.html#PCReset_Redundant">PCReset_Redundant in src/ksp/pc/impls/redundant/redundant.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/svd/svd.c.html#PCReset_SVD">PCReset_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#PCReset_Telescope">PCReset_Telescope in src/ksp/pc/impls/telescope/telescope.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)  
