# PCCompositeGetPC
Gets one of the `PC` objects in the composite `PC`. 
## Synopsis
```
#include "petscksp.h" 
PetscErrorCode PCCompositeGetPC(PC pc, PetscInt n, PC *subpc)
```
Not Collective


## Input Parameters

- ***pc -*** the preconditioner context
- ***n -*** the number of the pc requested



## Output Parameter

- ***subpc -*** the PC requested





## Note
To use a different operator to construct one of the inner preconditioners first call `PCCompositeGetPC()`, then
call `PCSetOperators()` on that `PC`.


## See Also
 `PCCOMPOSITE`, `PCCompositeAddPCType()`, `PCCompositeGetNumberPC()`, `PCSetOperators()`

## Level
intermediate

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

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/composite/composite.c.html#PCCompositeGetPC_Composite">PCCompositeGetPC_Composite in src/ksp/pc/impls/composite/composite.c</A><BR>


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