:orphan:
# SNESShellSetContext
sets the context for a `SNESSHELL` 
## Synopsis
```
#include "petscsnes.h"   
PetscErrorCode SNESShellSetContext(SNES snes, void *ctx)
```
Logically Collective


## Input Parameters

- ***snes -*** the `SNESSHELL`
- ***ctx -*** the context





## Fortran Note
The context can only be an integer or a `PetscObject` it cannot be a Fortran array or derived type.


## See Also
 `SNESSHELL`, `SNESCreateShell()`, `SNESShellGetContext()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/impls/shell/snesshell.c.html#SNESShellSetContext">src/snes/impls/shell/snesshell.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex35.c.html">src/snes/tutorials/ex35.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/snes/impls/shell/snesshell.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)  
