tao-2.1-p0 2012-07-24


Monitor the solver and the current solution. This routine will record the iteration number and residual statistics, call any monitors specified by the user, and calls the convergence-check routine.


#include "taosolver.h" 
PetscErrorCode TaoMonitor(TaoSolver tao, PetscInt its, PetscReal f, PetscReal res, PetscReal cnorm, PetscReal steplength, TaoSolverTerminationReason *reason) 

Input Parameters

tao - the TaoSolver context
its - the current iterate number (>=0)
f - the current objective function value
res - the gradient norm, square root of the duality gap, or other measure indicating distince from optimality. This measure will be recorded and used for some termination tests.
cnorm - the infeasibility of the current solution with regard to the constraints.
steplength - multiple of the step direction added to the previous iterate.

Output Parameters

reason -The termination reason, which can equal TAO_CONTINUE_ITERATING

Options Database Key

-tao_monitor -Use the default monitor, which prints statistics to standard output

See Also

TaoGetTerminationReason(), TaoDefaultMonitor(), TaoSetMonitor()

TAO Solver Index
Table of Contents