petsc-3.7.1 2016-05-15
Report Typos and Errors

SNESObjectiveComputeFunctionDefaultFD

Computes the gradient of a user provided objective

Synopsis

PetscErrorCode SNESObjectiveComputeFunctionDefaultFD(SNES snes,Vec X,Vec F,void *ctx)
Collective on SNES Many br

Input Parameter

snes - the SNES context Many br
X - the state vector Many br
ctx - the (ignored) function context Many br

Output Parameter

F -the function value Many br

Options Database Key

-snes_fd_function_eps - The differencing parameter Many br
-snes_fd_function - Compute function from user provided objective with finite difference Many br

Notes

SNESObjectiveComputeFunctionDefaultFD is similar in character to SNESComputeJacobianDefault. Many brTherefore, it should be used for debugging purposes only. Using it in conjunction with Many brSNESComputeJacobianDefault is excessively costly and produces a Jacobian that is quite Many brnoisy. This is often necessary, but should be done with a grain of salt, even when debugging Many brsmall problems. Many br

Note that this uses quadratic interpolation of the objective to form each value in the function. Many br

Many br

Keywords

SNES, objective, debugging, finite differences, function

See Also

SNESSetFunction(), SNESComputeObjective(), SNESComputeJacobianDefault()

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