TSStep — PETSc 3.21.4 documentation

Skip to main content
`Ctrl`+`K`

# TSStep

Steps one time step

## Synopsis

    #include "petscts.h"
    PetscErrorCode TSStep(TS ts)

Collective

## Input Parameter

- ts - the `TS` context obtained from `TSCreate()`

## Notes

The public interface for the ODE/DAE solvers is `TSSolve()`, you should almost for sure be using that routine and not this routine.

The hook set using `TSSetPreStep()` is called before each attempt to take the step. In general, the time step size may be changed due to adaptive error controller or solve failures. Note that steps may contain multiple stages.

This may over-step the final time provided in `TSSetMaxTime()` depending on the time-step used. `TSSolve()` interpolates to exactly the time provided in `TSSetMaxTime()`. One can use `TSInterpolate()` to determine an interpolated solution within the final timestep.

## See Also

TS: Scalable ODE and DAE Solvers, `TS`, `TSCreate()`, `TSSetUp()`, `TSDestroy()`, `TSSolve()`, `TSSetPreStep()`, `TSSetPreStage()`, `TSSetPostStage()`, `TSInterpolate()`

## Level

developer

## Location

src/ts/interface/ts.c

## Implementations

TSStep_ARKIMEX() in src/ts/impls/arkimex/arkimex.c
TSStep_BDF() in src/ts/impls/bdf/bdf.c
TSStep_EIMEX() in src/ts/impls/eimex/eimex.c
TSStep_Euler() in src/ts/impls/explicit/euler/euler.c
TSStep_RK() in src/ts/impls/explicit/rk/rk.c
TSStep_SSP() in src/ts/impls/explicit/ssp/ssp.c
TSStep_GLEE() in src/ts/impls/glee/glee.c
TSStep_Alpha() in src/ts/impls/implicit/alpha/alpha1.c
TSStep_Alpha() in src/ts/impls/implicit/alpha/alpha2.c
TSStep_DiscGrad() in src/ts/impls/implicit/discgrad/tsdiscgrad.c
TSStep_IRK() in src/ts/impls/implicit/irk/irk.c
TSStep_Sundials() in src/ts/impls/implicit/sundials/sundials.c
TSStep_Theta() in src/ts/impls/implicit/theta/theta.c
TSStep_Mimex() in src/ts/impls/mimex/mimex.c
TSStep_MPRK() in src/ts/impls/multirate/mprk.c
TSStep_MPRKSPLIT() in src/ts/impls/multirate/mprk.c
TSStep_Pseudo() in src/ts/impls/pseudo/posindep.c
TSStep_RosW() in src/ts/impls/rosw/rosw.c
TSStep_BasicSymplectic() in src/ts/impls/symplectic/basicsymplectic/basicsymplectic.c

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