petsc-dev 2014-07-23
Report Typos and Errors

TaoSetHistory

Sets the array used to hold the convergence history.

Synopsis

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

Input Parameters

tao - the Tao 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 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/tao/interface/taosolver.c
Index of all Tao routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/tao/leastsquares/examples/tutorials/chwirut1.c.html
src/tao/leastsquares/examples/tutorials/chwirut1f.F.html
src/tao/pde_constrained/examples/tutorials/elliptic.c.html
src/tao/pde_constrained/examples/tutorials/parabolic.c.html
src/tao/pde_constrained/examples/tutorials/hyperbolic.c.html