Skip to main content
`Ctrl`+`K`

# TSInterpolate

Interpolate the solution computed during the previous step to an arbitrary location in the interval

## Synopsis

    #include "petscts.h"
    PetscErrorCode TSInterpolate(TS ts, PetscReal t, Vec U)

Collective

## Input Parameters

- ts - time stepping context

- t - time to interpolate to

## Output Parameter

- U - state at given time

## Developer Notes

`TSInterpolate()` and the storing of previous steps/stages should be generalized to support delay differential equations and continuous adjoints.

## See Also

TS: Scalable ODE and DAE Solvers, `TS`, `TSSetExactFinalTime()`, `TSSolve()`

## Level

intermediate

## Location

src/ts/interface/ts.c

## Examples

src/ts/tutorials/ex20opt_ic.c
src/ts/tutorials/ex20opt_p.c
src/ts/tutorials/ex19.c
src/ts/tutorials/ex20adj.c
src/ts/tutorials/ex16.c
src/ts/tutorials/ex20fwd.c
src/ts/tutorials/ex20.c

## Implementations

TSInterpolate_ARKIMEX() in src/ts/impls/arkimex/arkimex.c
TSInterpolate_BDF() in src/ts/impls/bdf/bdf.c
TSInterpolate_EIMEX() in src/ts/impls/eimex/eimex.c
TSInterpolate_Euler() in src/ts/impls/explicit/euler/euler.c
TSInterpolate_RK() in src/ts/impls/explicit/rk/rk.c
TSInterpolate_GLEE() in src/ts/impls/glee/glee.c
TSInterpolate_Alpha() in src/ts/impls/implicit/alpha/alpha1.c
TSInterpolate_Alpha() in src/ts/impls/implicit/alpha/alpha2.c
TSInterpolate_DiscGrad() in src/ts/impls/implicit/discgrad/tsdiscgrad.c
TSInterpolate_IRK() in src/ts/impls/implicit/irk/irk.c
TSInterpolate_Sundials() in src/ts/impls/implicit/sundials/sundials.c
TSInterpolate_Theta() in src/ts/impls/implicit/theta/theta.c
TSInterpolate_Mimex() in src/ts/impls/mimex/mimex.c
TSInterpolate_RosW() in src/ts/impls/rosw/rosw.c
TSInterpolate_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