petsc-3.7.1 2016-05-15
Report Typos and Errors

# SNESShellSetSolve

Sets routine to apply as solver

### Synopsis

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

Logically Collective on SNES Many br

### Input Parameters

| snes | - the nonlinear solver context Many br
| apply | - the application-provided solver routine Many br

### Calling sequence of solve

       PetscErrorCode apply (SNES snes,Vec xout)

Many br

| snes | - the preconditioner, get the application context with SNESShellGetContext() Many br
| xout | - solution vector Many br

Notes: the function MUST return an error code of 0 on success and nonzero on failure. Many br

Many br

### Keywords

SNES, shell, set, apply, user-provided

### See Also

SNESSHELL, SNESShellSetContext(), SNESShellGetContext()

Level:advanced
Location:src/snes/impls/shell/snesshell.c
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/snes/examples/tutorials/ex35.c.html