PCComputeOperator — PETSc 3.24.5 documentation

Skip to main content
`Ctrl`+`K`

# PCComputeOperator

Computes the explicit preconditioned operator as a matrix `Mat`.

## Synopsis

    #include "petscksp.h"
    PetscErrorCode PCComputeOperator(PC pc, MatType mattype, Mat *mat)

Collective

## Input Parameters

- pc - the `PC` preconditioner object

- mattype - the `MatType` to be used for the operator

## Output Parameter

- mat - the explicit preconditioned operator

## Note

This computation is done by applying the operators to columns of the identity matrix. This routine is costly in general, and is recommended for use only with relatively small systems. Currently, this routine uses a dense matrix format when `mattype` == `NULL`

## Developer Note

This should be called `PCCreateExplicitOperator()`

## See Also

KSP: Linear System Solvers, `PC`, `KSPComputeOperator()`, `MatType`

## Level

advanced

## Location

src/ksp/pc/interface/precon.c

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