:orphan: # TaoSetMaximumIterations Sets a maximum number of iterates to be used in `TaoSolve()` ## Synopsis ``` #include "petsctao.h" PetscErrorCode TaoSetMaximumIterations(Tao tao, PetscInt maxits) ``` Logically Collective ## Input Parameters - ***tao -*** the `Tao` solver context - ***maxits -*** the maximum number of iterates (>=0) ## Options Database Key - ***-tao_max_it -*** sets the maximum number of iterations ## See Also [](ch_tao), `Tao`, `TaoSetTolerances()`, `TaoSetMaximumFunctionEvaluations()` ## Level intermediate ## Location src/tao/interface/taosolver.c ## Examples src/tao/unconstrained/tutorials/rosenbrock2.c
src/tao/unconstrained/tutorials/rosenbrock3.c
--- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/tao/interface/taosolver.c) [Index of all Tao routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)