# TaoSetTerminationReason

Sets the termination reason

## Synopsis

    #include "tao_solver.h"
    int TaoSetTerminationReason(TAO_SOLVER tao,TaoTerminateReason reason)

Collective on TAO_SOLVER

## Input Parameters

| tao | - the TAO_SOLVER context
| reason | - one of

       TAO_CONVERGED_ATOL (2),        (res <= atol)

       TAO_CONVERGED_RTOL (3),        (res/res0 <= rtol)

       TAO_CONVERGED_TRTOL (4),       (xdiff <= trtol)

       TAO_CONVERGED_MINF (5),        (f <= fmin)

       TAO_CONVERGED_USER (6),        (user defined)

       TAO_DIVERGED_MAXITS (-2),      (its>maxits)

       TAO_DIVERGED_NAN (-4),         (Numerical problems)

       TAO_DIVERGED_MAXFCN (-5),      (nfunc > maxnfuncts)

       TAO_DIVERGED_LS_FAILURE (-6),  (line search failure)

       TAO_DIVERGED_TR_REDUCTION (-7),

       TAO_DIVERGED_USER (-8),        (user defined)

       TAO_CONTINUE_ITERATING  (0)

where

| res | - residual of optimality conditions
| res0 | - initial residual of optimality conditions
| xdiff | - current trust region size
| f | - function value
| atol | - absolute tolerance
| rtol | - relative tolerance
| its | - current iterate number
| maxits | - maximum number of iterates
| nfunc | - number of function evaluations
| maxnfuncts | - maximum number of function evaluations

## Output Parameter

## See Also

TaoGetTerminationReason(), TaoAppSetMonitor(), TaoSetMonitor()

## Keywords

convergence

Level:intermediate
Location:src/interface/tao.c
TAO Solver Index
Table of Contents