:orphan: # TSSetMaxSteps Sets the maximum number of steps to use. ## Synopsis ``` #include "petscts.h" PetscErrorCode TSSetMaxSteps(TS ts, PetscInt maxsteps) ``` Logically Collective ## Input Parameters - ***ts -*** the `TS` context obtained from `TSCreate()` - ***maxsteps -*** maximum number of steps to use ## Options Database Key - ***-ts_max_steps -*** Sets maxsteps ## Note The default maximum number of steps is 5000 ## See Also [](ch_ts), `TS`, `TSGetMaxSteps()`, `TSSetMaxTime()`, `TSSetExactFinalTime()` ## Level intermediate ## Location src/ts/interface/ts.c ## Examples src/tao/unconstrained/tutorials/burgers_spectral.c
src/tao/unconstrained/tutorials/spectraladjointassimilation.c
src/ts/tutorials/ex1.c
src/ts/tutorials/ex11.c
src/ts/tutorials/ex18.c
src/ts/tutorials/ex1f.F90
src/ts/tutorials/ex2.c
src/ts/tutorials/ex21.c
src/ts/tutorials/ex24.c
src/ts/tutorials/ex26.c
src/ts/tutorials/ex29.c
--- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ts/interface/ts.c) [Index of all TS routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)