# TSTrajectoryGetUpdatedHistoryVecs
Get updated state and time-derivative history vectors. 
## Synopsis
```
#include "petscts.h"  
PetscErrorCode TSTrajectoryGetUpdatedHistoryVecs(TSTrajectory tj, TS ts, PetscReal time, Vec *U, Vec *Udot)
```
Collective


## Input Parameters

- ***tj   -*** the `TSTrajectory` context
- ***ts   -*** the `TS` solver context
- ***time -*** the requested time



## Output Parameters

- ***U    -*** state vector at given time (can be interpolated)
- ***Udot -*** time-derivative vector at given time (can be interpolated)





## Notes
The vectors are interpolated if time does not match any time step stored in the `TSTrajectory()`. Pass NULL to not request a vector.

This function differs from `TSTrajectoryGetVecs()` since the vectors obtained cannot be modified, and they need to be returned by
calling `TSTrajectoryRestoreUpdatedHistoryVecs()`.


## See Also
 [](chapter_ts), `TSTrajectory`, `TSSetSaveTrajectory()`, `TSTrajectoryCreate()`, `TSTrajectoryDestroy()`, `TSTrajectoryRestoreUpdatedHistoryVecs()`, `TSTrajectoryGetVecs()`

## Level
developer

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


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