# TS2SetSolution
Sets the initial solution and time derivative vectors for use by the `TS` routines handling second order equations. 
## Synopsis
```
#include "petscts.h"  
PetscErrorCode TS2SetSolution(TS ts, Vec u, Vec v)
```
Logically Collective on ts


## Input Parameters

- ***ts -*** the `TS` context obtained from `TSCreate()`
- ***u -*** the solution vector
- ***v -*** the time derivative vector





## See Also
 [](chapter_ts), `TS`

## Level
beginner

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

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex43.c.html">src/ts/tutorials/ex43.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>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ts/interface/ts.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)  
