tao-2.1-p0 2012-07-24

TaoSetMonitor

Sets an ADDITIONAL function that is to be used at every iteration of the solver to display the iteration's progress.

Synopsis

#include "taosolver.h" 
PetscErrorCode TaoSetMonitor(TaoSolver tao, PetscErrorCode (*func)(TaoSolver, void*), void *ctx,PetscErrorCode (*dest)(void**))
Logically Collective on TaoSolver

Input Parameters

tao - the TaoSolver solver context
mymonitor - monitoring routine
mctx - [optional] user-defined context for private data for the monitor routine (may be PETSC_NULL)

Calling sequence of mymonitor

    int mymonitor(TaoSolver tao,void *mctx)

tao - the TaoSolver solver context
mctx - [optional] monitoring context

Options Database Keys

-tao_monitor - sets TaoDefaultMonitor()
-tao_smonitor - sets short monitor
-tao_cmonitor - same as smonitor plus constraint norm
-tao_view_solution - view solution at each iteration
-tao_view_gradient - view gradient at each iteration
-tao_view_separableobjective - view separable objective function at each iteration
-tao_cancelmonitors - cancels all monitors that have been hardwired into a code by calls to TaoSetMonitor(), but does not cancel those set via the options database.

Notes

Several different monitoring routines may be set by calling TaoSetMonitor() multiple times; all will be called in the order in which they were set.

Fortran Notes: Only one monitor function may be set

See Also

TaoDefaultMonitor(), TaoCancelMonitors(), TaoSetDestroyRoutine()

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

Examples

src/unconstrained/examples/tutorials/minsurf2.c.html
src/unconstrained/examples/tutorials/eptorsion2f.F.html
src/bound/examples/tutorials/jbearing2.c.html
src/leastsquares/examples/tutorials/chwirut2.c.html
src/leastsquares/examples/tutorials/chwirut1f.F.html