:orphan:
# SNESShellSetSolve
Sets routine to apply as solver 
## Synopsis
```
#include "petscsnes.h"   
PetscErrorCode SNESShellSetSolve(SNES snes, PetscErrorCode (*solve)(SNES, Vec))
```
Logically Collective


## Input Parameters

- ***snes -*** the `SNES` nonlinear solver context
- ***apply -*** the application-provided solver routine



## Calling sequence of `apply`
```none
   PetscErrorCode apply(SNES snes, Vec xout)
```


- ***snes -*** the preconditioner, get the application context with `SNESShellGetContext()` provided with `SNESShelletContext()`
- ***xout -*** solution vector





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

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/impls/shell/snesshell.c.html#SNESShellSetSolve">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>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/impls/shell/snesshell.c.html#SNESShellSetSolve_Shell(SNES snes, PetscErrorCode (*solve)">SNESShellSetSolve_Shell(SNES snes, PetscErrorCode (*solve) in src/snes/impls/shell/snesshell.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)  
