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 - DM to associate callback with

  • func - local objective evaluation

  • ctx - optional context for local objective function evaluation

Calling sequence of func#

  • dm - the DM

  • x - 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#

DMSNESSetFunctionLocal(), DMSNESSetJacobianLocal()

Level#

advanced

Location#

src/snes/utils/dmlocalsnes.c


Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages