# TSAdaptSetStepLimits
Set the minimum and maximum step sizes to be considered by the time step controller 
## Synopsis
```
#include "petscts.h" 
PetscErrorCode TSAdaptSetStepLimits(TSAdapt adapt, PetscReal hmin, PetscReal hmax)
```
Logically collective


## Input Parameters

- ***adapt -*** time step adaptivity context, usually gotten with `TSGetAdapt()`
- ***hmin -*** minimum time step
- ***hmax -*** maximum time step



## Options Database Keys

- ***-ts_adapt_dt_min <min> -*** to set minimum time step
- ***-ts_adapt_dt_max <max> -*** to set maximum time step





## See Also
 [](chapter_ts), `TSAdapt`, `TSAdaptGetStepLimits()`, `TSAdaptChoose()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/adapt/interface/tsadapt.c.html#TSAdaptSetStepLimits">src/ts/adapt/interface/tsadapt.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex40.c.html">src/ts/tutorials/ex40.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex41.c.html">src/ts/tutorials/ex41.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex44.c.html">src/ts/tutorials/ex44.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/extchem.c.html">src/ts/tutorials/extchem.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/extchemfield.c.html">src/ts/tutorials/extchemfield.c.html</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ts/adapt/interface/tsadapt.c)


[Index of all TS routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
