DMSNESSetObjectiveLocal#
set a local objective evaluation function. This function is called with local vector containing the local vector information PLUS ghost point information. It should compute a result for all local elements and DMSNES will automatically accumulate the overlapping values.
Synopsis#
#include "petscsnes.h"
PetscErrorCode DMSNESSetObjectiveLocal(DM dm, PetscErrorCode (*func)(DM dm, Vec x, PetscReal *obj, PetscCtx ctx), PetscCtx ctx)
Logically Collective
Input Parameters#
dm -
DMto associate callback withfunc - local objective evaluation
ctx - optional context for local objective function evaluation
Calling sequence of func#
dm - the
DMx - the location where the objective is to be evaluated
obj - the value of the objective function
ctx - optional context for the local objective function evaluation
See Also#
Level#
advanced
Location#
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages