Skip to main content
`Ctrl`+`K`

# KSPGetApplicationContext

Gets the user-defined context for the linear solver set with `KSPSetApplicationContext()`

## Synopsis

    #include "petscksp.h"
    PetscErrorCode KSPGetApplicationContext(KSP ksp, void *ctx)

Not Collective

## Input Parameter

- ksp - `KSP` context

## Output Parameter

- ctx - user context

## Fortran Note

You may need to write a Fortran interface definition for this function that tells Fortran the Fortran derived data type that you are passing in as the ctx argument.

## See Also

KSP: Linear System Solvers, `KSP`, `KSPSetApplicationContext()`

## Level

intermediate

## Location

src/ksp/ksp/interface/iterativ.c

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