TaoSetObjectiveAndGradientRoutine
Sets a combined objective function and gradient evaluation routine for minimization
Synopsis
#include "taosolver.h"
PetscErrorCode TaoSetObjectiveAndGradientRoutine(TaoSolver tao, PetscErrorCode (*func)(TaoSolver, Vec, PetscReal *, Vec, void*), void *ctx)
Logically collective on TaoSolver
Input Parameter
| tao | - the TaoSolver context
|
| func | - the gradient function
|
| ctx | - [optional] user-defined context for private data for the gradient evaluation
routine (may be PETSC_NULL)
|
Calling sequence of func
func (TaoSolver tao, Vec x, Vec g, void *ctx);
| x | - input vector
|
| g | - gradient value (output)
|
| ctx | - [optional] user-defined function context
|
See Also
TaoSetObjectiveRoutine(), TaoSetHessianRoutine() TaoSetObjectiveAndGradientRoutine()
Level:beginner
Location:src/interface/taosolver_fg.c
TAO Solver Index
Table of Contents
Examples
src/unconstrained/examples/tutorials/eptorsion1.c.html
src/unconstrained/examples/tutorials/eptorsion2.c.html
src/unconstrained/examples/tutorials/minsurf2.c.html
src/unconstrained/examples/tutorials/rosenbrock1.c.html
src/unconstrained/examples/tutorials/eptorsion2f.F.html
src/unconstrained/examples/tutorials/rosenbrock1f.F.html
src/bound/examples/tutorials/plate2.c.html
src/bound/examples/tutorials/jbearing2.c.html
src/bound/examples/tutorials/plate2f.F.html