:orphan: # TaoGetIterationNumber Gets the number of `TaoSolve()` iterations completed at this time. ## Synopsis ``` #include "petsctao.h" PetscErrorCode TaoGetIterationNumber(Tao tao, PetscInt *iter) ``` Not Collective ## Input Parameter - ***tao -*** the `Tao` context ## Output Parameter - ***iter -*** iteration number ## Notes For example, during the computation of iteration 2 this would return 1. ## See Also [](ch_tao), `Tao`, `TaoGetLinearSolveIterations()`, `TaoGetResidualNorm()`, `TaoGetObjective()` ## Level intermediate ## Location src/tao/interface/taosolver.c ## Examples src/tao/unconstrained/tutorials/rosenbrock2.c
src/tao/unconstrained/tutorials/rosenbrock3.c
src/tao/unconstrained/tutorials/spectraladjointassimilation.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)