TS2GetSolution — PETSc 3.23.0 documentation

Skip to main content
`Ctrl`+`K`

# TS2GetSolution

Returns the solution and time derivative at the present timestep for second order equations.

## Synopsis

    #include "petscts.h"
    PetscErrorCode TS2GetSolution(TS ts, Vec *u, Vec *v)

Not Collective

## Input Parameter

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

## Output Parameters

- u - the vector containing the solution

- v - the vector containing the time derivative

## Notes

It is valid to call this routine inside the function that you are evaluating in order to move to the new timestep. This vector not changed until the solution at the next timestep has been calculated.

## See Also

TS: Scalable ODE and DAE Solvers, `TS`, `TS2SetSolution()`, `TSGetTimeStep()`, `TSGetTime()`

## Level

intermediate

## Location

src/ts/interface/ts.c

## Examples

src/ts/tutorials/ex44.c

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