:orphan:
# TaoShellSetSolve
Sets routine to apply as solver 
## Synopsis
```
#include "petsctao.h" 
PetscErrorCode TaoShellSetSolve(Tao tao, PetscErrorCode (*solve)(Tao))
```
Logically Collective


## Input Parameters

- ***tao -*** the nonlinear solver context
- ***solve -*** the application-provided solver routine



## Calling sequence of `solve`
```none
PetscErrorCode solve(Tao tao)
```

- ***tao -*** the optimizer, get the application context with `TaoShellGetContext()`





## See Also
 `Tao`, `TAOSHELL`, `TaoShellSetContext()`, `TaoShellGetContext()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/shell/taoshell.c.html#TaoShellSetSolve">src/tao/shell/taoshell.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/constrained/tutorials/tomographyADMM.c.html">src/tao/constrained/tutorials/tomographyADMM.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/tao/shell/taoshell.c)


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