PetscErrorCode SNESSetObjective(SNES snes,PetscErrorCode (*obj)(SNES,Vec,PetscReal*,void*),void *ctx)Logically Collective on SNES
snes | - the SNES context | |
obj | - objective evaluation routine; see SNESObjectiveFunction for details | |
ctx | - [optional] user-defined context for private data for the function evaluation routine (may be NULL) |
Note: This is not used in the SNESLINESEARCHCP line search.
If not provided then this defaults to the two norm of the function evaluation (set with SNESSetFunction())