petsc-3.7.5 2017-01-01
Report Typos and Errors

TaoLineSearchGetSolution

Returns the solution to the line search

Synopsis

#include "petsctaolinesearch.h" 
PetscErrorCode TaoLineSearchGetSolution(TaoLineSearch ls, Vec x, PetscReal *f, Vec g, PetscReal *steplength, TaoLineSearchConvergedReason *reason)
Collective on TaoLineSearch

Input Parameter

ls -the TaoLineSearch context

Output Parameter

x - the new solution
f - the objective function value at x
g - the gradient at x
steplength - the multiple of the step direction taken by the line search
reason - the reason why the line search terminated

reason will be set to one of

TAOLINESEARCH_FAILED_INFORNAN - function evaluation gives Inf or Nan value
TAOLINESEARCH_FAILED_BADPARAMETER - negative value set as parameter
TAOLINESEARCH_FAILED_ASCENT - initial line search step * g is not descent direction
TAOLINESEARCH_HALTED_MAXFCN - maximum number of function evaluation reached
TAOLINESEARCH_HALTED_UPPERBOUND - step is at upper bound
TAOLINESEARCH_HALTED_LOWERBOUND - step is at lower bound
TAOLINESEARCH_HALTED_RTOL - range of uncertainty is smaller than given tolerance
TAOLINESEARCH_HALTED_USER - user can set this reason to stop line search
TAOLINESEARCH_HALTED_OTHER - any other reason

Level:developer
Location:
src/tao/linesearch/interface/taolinesearch.c
Index of all TaoLineSearch routines
Table of Contents for all manual pages
Index of all manual pages

TAOLINESEARCH_SUCCESS - successful line search