Skip to main content
`Ctrl`+`K`

# 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

## Note

Use `PETSC_CURRENT` to keep the current value for either parameter

## Fortran Note

Use `PETSC_CURRENT_REAL`

## See Also

TS: Scalable ODE and DAE Solvers, Error control via variable time-stepping, `TSAdapt`, `TSAdaptGetStepLimits()`, `TSAdaptChoose()`

## Level

intermediate

## Location

src/ts/adapt/interface/tsadapt.c

## Examples

src/ts/tutorials/extchem.c
src/ts/tutorials/extchemfield.c
src/ts/tutorials/ex44.c
src/ts/tutorials/ex41.c
src/ts/tutorials/ex40.c

Index of all TS routines
Table of Contents for all manual pages
Index of all manual pages