#include "petsctao.h" PetscErrorCode TaoSetRecycleHistory(Tao tao, PetscBool recycle)For conjugate gradient methods (BNCG), this re-uses the latest search direction from the previous TaoSolve() call when computing the first search direction in a new solution. By default, CG methods set the first search direction to the negative gradient.
For quasi-Newton family of methods (BQNLS, BQNKLS, BQNKTR, BQNKTL), this re-uses the accumulated quasi-Newton Hessian approximation from the previous TaoSolve() call. By default, QN family of methods reset the initial Hessian approximation to the identity matrix.
For any other algorithm, this setting has no effect.
Logically collective on Tao
|tao||- the Tao context|
|recycle||- boolean flag|