# SNESGetFunction

Returns the vector where the function is stored.

### Synopsis

    #include "petscsnes.h"
    PetscErrorCode PETSCSNES_DLLEXPORT SNESGetFunction(SNES snes,Vec *r,PetscErrorCode (**func)(SNES,Vec,Vec,void*),void **ctx)

Not Collective, but Vec is parallel if SNES is parallel

### Input Parameter

snes -the SNES context

### Output Parameter

| r | - the function (or PETSC_NULL)
| func | - the function (or PETSC_NULL)
| ctx | - the function context (or PETSC_NULL)

### Keywords

SNES, nonlinear, get, function

### See Also

SNESSetFunction(), SNESGetSolution()

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

### Examples

src/snes/examples/tutorials/ex1.c.html
src/snes/examples/tutorials/ex21.c.html
src/snes/examples/tutorials/ex22.c.html
src/snes/examples/tutorials/ex30.c.html