SNESSetFunction#
Sets the function evaluation routine and function vector for use by the SNES
routines in solving systems of nonlinear equations.
Synopsis#
#include "petscsnes.h"
PetscErrorCode SNESSetFunction(SNES snes, Vec r, PetscErrorCode (*f)(SNES, Vec, Vec, void *), void *ctx)
Logically Collective
Input Parameters#
snes - the
SNES
contextr - vector to store function values, may be NULL
f - function evaluation routine; see
SNESFunction
for calling sequence detailsctx - [optional] user-defined context for private data for the function evaluation routine (may be NULL)
See Also#
SNES
, SNESGetFunction()
, SNESComputeFunction()
, SNESSetJacobian()
, SNESSetPicard()
, SNESFunction
Level#
beginner
Location#
Examples#
src/snes/tutorials/ex1.c.html
src/snes/tutorials/ex14.c.html
src/snes/tutorials/ex15.c.html
src/snes/tutorials/ex18.c.html
src/snes/tutorials/ex1f.F90.html
src/snes/tutorials/ex2.c.html
src/snes/tutorials/ex21.c.html
src/snes/tutorials/ex22.c.html
src/snes/tutorials/ex28.c.html
src/snes/tutorials/ex3.c.html
src/snes/tutorials/ex31.c.html
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages