tao-2.1-p0 2012-07-24

TaoGetTerminationReason

Gets the reason the TaoSolver iteration was stopped.

Synopsis

#include "taosolver.h" 
PetscErrorCode TaoGetTerminationReason(TaoSolver tao, TaoSolverTerminationReason *reason) 
Not Collective

Input Parameter

tao -the TaoSolver 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/interface/taosolver.c
TAO Solver Index
Table of Contents

Examples

src/unconstrained/examples/tutorials/eptorsion1.c.html
src/unconstrained/examples/tutorials/eptorsion2.c.html
src/unconstrained/examples/tutorials/minsurf2.c.html
src/unconstrained/examples/tutorials/rosenbrock1.c.html
src/unconstrained/examples/tutorials/eptorsion2f.F.html
src/unconstrained/examples/tutorials/rosenbrock1f.F.html
src/bound/examples/tutorials/plate2.c.html
src/bound/examples/tutorials/jbearing2.c.html
src/leastsquares/examples/tutorials/chwirut1f.F.html
src/pde_constrained/examples/tutorials/elliptic.c.html
src/pde_constrained/examples/tutorials/parabolic.c.html
src/pde_constrained/examples/tutorials/hyperbolic.c.html