PCShellSetApplyBA — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# PCShellSetApplyBA

Sets routine to use as the preconditioner times the operator.

## Synopsis

    #include "petscpc.h"
    PetscErrorCode PCShellSetApplyBA(PC pc, PetscErrorCode (*applyBA)(PC pc, PCSide side, Vec xin, Vec xout, Vec w))

Logically Collective

## Input Parameters

- pc - the preconditioner context

- applyBA - the application-provided BA routine

## Calling sequence of `applyBA`

- pc - the preconditioner

- side - `PC_LEFT`, `PC_RIGHT`, or `PC_SYMMETRIC`

- xin - input vector

- xout - output vector

- w - work vector

## Note

You can get the `PCSHELL` context set with `PCShellSetContext()` using `PCShellGetContext()` if needed by `applyBA`.

## See Also

KSP: Linear System Solvers, `PCSHELL`, `PCShellSetApplyRichardson()`, `PCShellSetSetUp()`, `PCShellSetApplyTranspose()`, `PCShellSetContext()`, `PCShellSetApply()`, `PCShellGetContext()`, `PCSide`

## Level

intermediate

## Location

src/ksp/pc/impls/shell/shellpc.c

## Implementations

PCShellSetApplyBA_Shell(PC pc, PetscErrorCode (*applyBA)() in src/ksp/pc/impls/shell/shellpc.c

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