petsc-3.7.1 2016-05-15
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 Many br

Input Parameter

ls -the TaoLineSearch context Many br

Output Parameter

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

reason will be set to one of

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

Many br

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 Many br