#include "petsctaolinesearch.h" PetscErrorCode TaoLineSearchSetObjectiveAndGTSRoutine(TaoLineSearch ls, PetscErrorCode(*func)(TaoLineSearch ls, Vec x, Vec s, PetscReal *, PetscReal *, void*), void *ctx)Logically Collective on TaoLineSearch Many br
ls | - the TaoLineSearch context Many br | |
func | - the objective and gradient evaluation routine Many br | |
ctx | - the (optional) user-defined context for private data Many br |
func (TaoLinesearch ls, Vec x, PetscReal *f, PetscReal *gts, void *ctx);
x | - input vector Many br | |
s | - step direction Many br | |
f | - function value Many br | |
gts | - inner product of gradient and step direction vectors Many br | |
ctx (optional) user | - defined context Many br |
Note: The gradient will still need to be computed at the end of the line Many brsearch, so you will still need to set a line search gradient evaluation Many brroutine Many br
Note: Bounded line searches (those used in bounded optimization algorithms) Many brdon't use g's directly, but rather (g'x - g'x0)/steplength. You can get the Many brx0 and steplength with TaoLineSearchGetStartingVector() and TaoLineSearchGetStepLength() Many br
Many br
Level:advanced
Location:src/tao/linesearch/interface/taolinesearch.c
Index of all TaoLineSearch routines
Table of Contents for all manual pages
Index of all manual pages