TaoConvergedReason#

reason a Tao optimizer was said to have converged or diverged

Synopsis#

typedef enum {               /* converged */
  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 */
  /* diverged */
  TAO_DIVERGED_MAXITS       = -2,
  TAO_DIVERGED_NAN          = -4,
  TAO_DIVERGED_MAXFCN       = -5,
  TAO_DIVERGED_LS_FAILURE   = -6,
  TAO_DIVERGED_TR_REDUCTION = -7,
  TAO_DIVERGED_USER         = -8, /* User defined */
  /* keep going */
  TAO_CONTINUE_ITERATING = 0
} TaoConvergedReason;

Values#

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

Note#

The two most common reasons for divergence are an incorrectly coded or computed gradient or Hessian failure or lack of convergence in the linear system solve (in this case we recommend testing with -pc_type lu to eliminate the linear solver as the cause of the problem).

Developer Note#

The names in KSPConvergedReason, SNESConvergedReason, and TaoConvergedReason should be uniformized

See Also#

TAO: Optimization Solvers, Tao, TaoSolve(), TaoGetConvergedReason(), KSPConvergedReason, SNESConvergedReason

Level#

beginner

Location#

include/petsctao.h

Examples#

src/tao/bound/tutorials/jbearing2.c
src/tao/unconstrained/tutorials/rosenbrock3.c
src/tao/unconstrained/tutorials/rosenbrock2.c
src/tao/constrained/tutorials/maros.c
src/tao/unconstrained/tutorials/burgers_spectral.c


Index of all Tao routines
Table of Contents for all manual pages
Index of all manual pages