# TSTrajectorySetTransform
Solution vector will be transformed by provided function before being saved to disk 
## Synopsis
```
#include "petscts.h"  
PetscErrorCode TSTrajectorySetTransform(TSTrajectory tj, PetscErrorCode (*transform)(void *, Vec, Vec *), PetscErrorCode (*destroy)(void *), void *tctx)
```
Collective


## Input Parameters

- ***tj -*** the `TSTrajectory` context
- ***transform -*** the transform function
- ***destroy -*** function to destroy the optional context
- ***ctx -*** optional context used by transform function





## See Also
 [](chapter_ts), `TSTrajectorySetVariableNames()`, `TSTrajectory`, `TSMonitorLGSetTransform()`

## Level
intermediate

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

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