petsc-3.6.4 2016-04-12
Report Typos and Errors

TaoGetConvergedReason

Gets the reason the Tao iteration was stopped.

Synopsis

#include "petsctao.h" 
PetscErrorCode TaoGetConvergedReason(Tao tao, TaoConvergedReason *reason)
Not Collective

Input Parameter

tao -the Tao solver context

Output Parameter

reason -one of
 TAO_CONVERGED_FATOL (1)           f(X)-f(X*) <= fatol
 TAO_CONVERGED_FRTOL (2)           |f(X) - f(X*)|/|f(X)| < frtol
 TAO_CONVERGED_GATOL (3)           ||g(X)|| < gatol
 TAO_CONVERGED_GRTOL (4)           ||g(X)|| / f(X)  < grtol
 TAO_CONVERGED_GTTOL (5)           ||g(X)|| / ||g(X0)|| < gttol
 TAO_CONVERGED_STEPTOL (6)         step size small
 TAO_CONVERGED_MINF (7)            F < F_min
 TAO_CONVERGED_USER (8)            User defined
 TAO_DIVERGED_MAXITS (-2)          its > maxits
 TAO_DIVERGED_NAN (-4)             Numerical problems
 TAO_DIVERGED_MAXFCN (-5)          fevals > max_funcsals
 TAO_DIVERGED_LS_FAILURE (-6)      line search failure
 TAO_DIVERGED_TR_REDUCTION (-7)    trust region failure
 TAO_DIVERGED_USER(-8)             (user defined)
$ TAO_CONTINUE_ITERATING (0)

where

X - current solution
X0 - initial guess
f(X) - current function value
f(X*) - true solution (estimated)
g(X) - current gradient
its - current iterate number
maxits - maximum number of iterates
fevals - number of function evaluations
max_funcsals - maximum number of function evaluations

See Also

TaoSetConvergenceTest(), TaoSetTolerances()

Level:intermediate
Location:
src/tao/interface/taosolver.c
Index of all Tao routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/ts/examples/tutorials/ex16opt_p.c.html
src/ts/examples/tutorials/ex16opt_ic.c.html
src/ts/examples/tutorials/ex20opt_p.c.html
src/ts/examples/tutorials/ex20opt_ic.c.html
src/tao/unconstrained/examples/tutorials/eptorsion1.c.html
src/tao/unconstrained/examples/tutorials/eptorsion2.c.html
src/tao/unconstrained/examples/tutorials/minsurf2.c.html
src/tao/unconstrained/examples/tutorials/rosenbrock1.c.html
src/tao/unconstrained/examples/tutorials/eptorsion2f.F.html
src/tao/unconstrained/examples/tutorials/rosenbrock1f.F.html
src/tao/constrained/examples/tutorials/maros.c.html