:orphan: # TaoSetMaximumFunctionEvaluations Sets a maximum number of function evaluations allowed for a `TaoSolve()`. ## Synopsis ``` #include "petsctao.h" PetscErrorCode TaoSetMaximumFunctionEvaluations(Tao tao, PetscInt nfcn) ``` Logically Collective ## Input Parameters - ***tao -*** the `Tao` solver context - ***nfcn -*** the maximum number of function evaluations (>=0) ## Options Database Key - ***-tao_max_funcs -*** sets the maximum number of function evaluations ## See Also [](ch_tao), `Tao`, `TaoSetTolerances()`, `TaoSetMaximumIterations()` ## Level intermediate ## Location src/tao/interface/taosolver.c ## Examples src/tao/constrained/tutorials/ex1.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)