#include "petsctao.h" PetscErrorCode TaoSetConvergenceHistory(Tao tao, PetscReal obj[], PetscReal resid[], PetscReal cnorm[], PetscInt lits[], PetscInt na,PetscBool reset)Logically Collective on Tao
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 | |
lits | - integer array holds the number of linear iterations for each Tao iteration | |
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 |
Any convergence information after iteration number 'na' will not be stored.
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.