# TSTrajectorySetUp
Sets up the internal data structures, e.g. stacks, for the later use of a `TS` `TSTrajectory`. 
## Synopsis
```
#include "petscts.h"  
PetscErrorCode TSTrajectorySetUp(TSTrajectory tj, TS ts)
```
Collective on tj


## Input Parameters

- ***tj -*** the `TSTrajectory` context
- ***ts -*** the TS context obtained from `TSCreate()`





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

## Level
developer

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/trajectory/impls/basic/trajbasic.c.html#TSTrajectorySetUp_Basic">TSTrajectorySetUp_Basic in src/ts/trajectory/impls/basic/trajbasic.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/trajectory/impls/memory/trajmemory.c.html#TSTrajectorySetUp_Memory">TSTrajectorySetUp_Memory in src/ts/trajectory/impls/memory/trajmemory.c</A><BR>


---
[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)  
