petsc-3.4.2 2013-07-02

# SNESSetObjective

Sets the objective function minimized by the SNES methods.

### Synopsis

    PetscErrorCode  SNESSetObjective(SNES snes,PetscErrorCode (*SNESObjectiveFunction)(SNES,Vec,PetscReal*,void*),void *ctx)

Logically Collective on SNES

### Input Parameters

| snes | - the SNES context
| SNESObjectiveFunction | - objective evaluation routine
| ctx | - [optional] user-defined context for private data for the function evaluation routine (may be NULL)

Note: If not provided then this defaults to the two norm of the function evaluation (set with SNESSetFunction())

### Keywords

SNES, nonlinear, set, objective

### See Also

SNESGetObjective(), SNESComputeObjective(), SNESSetFunction(), SNESSetJacobian(), SNESObjectiveFunction

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