PCCompositeSetType — PETSc 3.21.4 documentation

Skip to main content
`Ctrl`+`K`

# PCCompositeSetType

Sets the type of composite preconditioner.

## Synopsis

    #include "petscksp.h"
    PetscErrorCode PCCompositeSetType(PC pc, PCCompositeType type)

Logically Collective

## Input Parameters

- pc - the preconditioner context

- type - `PC_COMPOSITE_ADDITIVE` (default), `PC_COMPOSITE_MULTIPLICATIVE`, `PC_COMPOSITE_SPECIAL`

## Options Database Key

- -pc_composite_type <type: one of multiplicative, additive, special> - Sets composite preconditioner type

## See Also

KSP: Linear System Solvers, `PCCOMPOSITE`, `PC_COMPOSITE_ADDITIVE`, `PC_COMPOSITE_MULTIPLICATIVE`, `PC_COMPOSITE_SPECIAL`, `PCCompositeType`, `PCCompositeGetType()`

## Level

advanced

## Location

src/ksp/pc/impls/composite/composite.c

## Examples

src/ksp/ksp/tutorials/ex71.c
src/ksp/ksp/tutorials/ex60.c

## Implementations

PCCompositeSetType_Composite() in src/ksp/pc/impls/composite/composite.c

Index of all PC routines
Table of Contents for all manual pages
Index of all manual pages