# SNESComputeFunction

Calls the function that has been set with SNESSetFunction().

### Synopsis

    #include "petscsnes.h"
    PetscErrorCode PETSCSNES_DLLEXPORT SNESComputeFunction(SNES snes,Vec x,Vec y)

Collective on SNES

### Input Parameters

| snes | - the SNES context
| x | - input vector

### Output Parameter

y -function vector, as set by SNESSetFunction()

### Notes

SNESComputeFunction() is typically used within nonlinear solvers implementations, so most users would not generally call this routine themselves.

### Keywords

SNES, nonlinear, compute, function

### See Also

SNESSetFunction(), SNESGetFunction()

Level:developer
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/ex27.c.html
src/snes/examples/tutorials/ex1f.F.html