# PCCOMPOSITE
Build a preconditioner by composing together several preconditioners 
## Options Database Keys

- ***-pc_composite_type <type: one of multiplicative, additive, symmetric_multiplicative, special> -*** Sets composite preconditioner type
- ***-pc_use_amat -*** activates `PCSetUseAmat()`
- ***-pc_composite_pcs -*** <pc0,pc1,...> list of PCs to compose





## Notes
To use a Krylov method inside the composite preconditioner, set the `PCType` of one or more
inner `PC`s to be `PCKSP`. Using a Krylov method inside another Krylov method can be dangerous (you get divergence or
the incorrect answer) unless you use `KSPFGMRES` as the outer Krylov method

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


## See Also
 `PCCreate()`, `PCSetType()`, `PCType`, `PC`,
`PCSHELL`, `PCKSP`, `PCCompositeSetType()`, `PCCompositeSpecialSetAlpha()`, `PCCompositeAddPCType()`,
`PCCompositeGetPC()`, `PCSetUseAmat()`, `PCCompositeAddPC()`, `PCCompositeGetNumberPC()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/composite/composite.c.html#PCCOMPOSITE">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>


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