:orphan:
# SNESGetApplicationContext
Gets the user-defined context for the nonlinear solvers set with `SNESGetApplicationContext()` or with `SNESSetComputeApplicationContext()` 
## Synopsis
```
#include "petscsnes.h"  
PetscErrorCode SNESGetApplicationContext(SNES snes, void *usrP)
```
Not Collective


## Input Parameter

- ***snes -*** `SNES` context



## Output Parameter

- ***usrP -*** user context





## Fortran Note
You must 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
 [](ch_snes), `SNESSetApplicationContext()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/interface/snes.c.html#SNESGetApplicationContext">src/snes/interface/snes.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex58.c.html">src/snes/tutorials/ex58.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex5f90.F90.html">src/snes/tutorials/ex5f90.F90</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex5f90t.F90.html">src/snes/tutorials/ex5f90t.F90</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex73f90t.F90.html">src/snes/tutorials/ex73f90t.F90</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/snes/interface/snes.c)


[Index of all SNES routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
