tao-2.1-p0 2012-07-24

TaoSetHistory

Sets the array used to hold the convergence history.

Synopsis

#include "taosolver.h" 
PetscErrorCode TaoSetHistory(TaoSolver tao, PetscReal *obj, PetscReal *resid, PetscReal *cnorm, PetscInt na,PetscBool reset)
Logically Collective on TaoSolver

Input Parameters

tao - the TaoSolver solver context
obj - array to hold objective value history
resid - array to hold residual history
cnorm - array to hold constraint violation history
na - size of obj, resid, and cnorm
reset - PetscTrue indicates each new minimization resets the history counter to zero, else it continues storing new values for new minimizations after the old ones

Notes

If set, TAO will fill the given arrays with the indicated information at each iteration. If no information is desired for a given array, then PETSC_NULL may be used.

This routine is useful, e.g., when running a code for purposes of accurate performance monitoring, when no I/O should be done during the section of code that is being timed.

See Also

TaoGetHistory()

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

Examples

src/leastsquares/examples/tutorials/chwirut1.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