Skip to main content
`Ctrl`+`K`

# PCGetApplicationContext

Gets the user-defined context for the preconditioner set with `PCSetApplicationContext()`

## Synopsis

    #include "petscpc.h"
    PetscErrorCode PCGetApplicationContext(PC pc, PetscCtxRt ctx)

Not Collective

## Input Parameter

- pc - `PC` context

## Output Parameter

- ctx - user context

## Fortran Note

This only works when the context is a Fortran derived type or a `PetscObject`. Define `ctx` with

      type(tUsertype), pointer :: ctx

## See Also

KSP: Linear System Solvers, `PC`, `PCSetApplicationContext()`, `KSPSetApplicationContext()`, `KSPGetApplicationContext()`

## Level

intermediate

## Location

src/ksp/pc/interface/pcset.c

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