petsc-3.7.1 2016-05-15
TaoLineSearchSetObjectiveRoutine
Sets the function evaluation routine for the line search
Synopsis
#include "petsctaolinesearch.h"
PetscErrorCode TaoLineSearchSetObjectiveRoutine(TaoLineSearch ls, PetscErrorCode(*func)(TaoLineSearch ls, Vec x, PetscReal*, void*), void *ctx)
Logically Collective on TaoLineSearch Many br
Input Parameter
| ls | - the TaoLineSearch context Many br |
| func | - the objective function evaluation routine Many br |
| ctx | - the (optional) user-defined context for private data Many br |
Calling sequence of func
func (TaoLinesearch ls, Vec x, PetscReal *f, void *ctx);
| x | - input vector Many br |
| f | - function value Many br |
| ctx (optional) user | - defined context Many br |
Many br
Note
Use this routine only if you want the line search objective Many brevaluation routine to be different from the Tao's objective Many brevaluation routine. If you use this routine you must also set Many brthe line search gradient and/or function/gradient routine. Many br
Note
Some algorithms (lcl, gpcg) set their own objective routine for the Many brline search, application programmers should be wary of overriding the Many brdefault objective routine. Many br
See Also
TaoLineSearchCreate(), TaoLineSearchSetGradientRoutine(), TaoLineSearchSetObjectiveAndGradientRoutine(), TaoLineSearchUseTaoRoutines()
Level:beginner
Location:src/tao/linesearch/interface/taolinesearch.c
Index of all TaoLineSearch routines
Table of Contents for all manual pages
Index of all manual pages