Skip to main content
`Ctrl`+`K`

# SNESShellSetSolve

Sets routine to apply as solver to a `SNESSHELL` `SNES` object

## Synopsis

    #include "petscsnes.h"
    PetscErrorCode SNESShellSetSolve(SNES snes, PetscErrorCode (*solve)(SNES snes, Vec xout))

Logically Collective

## Input Parameters

- snes - the `SNES` nonlinear solver context

- solve - the application-provided solver routine

## Calling sequence of `apply`

- snes - the preconditioner, get the application context with `SNESShellGetContext()` provided with `SNESShellSetContext()`

- xout - solution vector

## See Also

SNES: Nonlinear Solvers, `SNES`, `SNESSHELL`, `SNESShellSetContext()`, `SNESShellGetContext()`

## Level

advanced

## Location

src/snes/impls/shell/snesshell.c

## Examples

src/snes/tutorials/ex35.c

## Implementations

SNESShellSetSolve_Shell(SNES snes, PetscErrorCode (*solve)() in src/snes/impls/shell/snesshell.c

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