# TSComputeTransientVariable
transforms state (primitive) variables to transient (conservative) variables 
## Synopsis
```
#include "petscts.h"  
PetscErrorCode TSComputeTransientVariable(TS ts, Vec U, Vec C)
```
Logically Collective


## Input Parameters

- ***ts -*** TS on which to compute
- ***U -*** state vector to be transformed to transient variables



## Output Parameters

- ***C -*** transient (conservative) variable





## Developer Note
If `DMTSSetTransientVariable()` has not been called, then C is not modified in this routine and C = NULL is allowed.
This makes it safe to call without a guard.  One can use `TSHasTransientVariable()` to check if transient variables are
being used.


## See Also
 [](chapter_ts), `TS`, `TSBDF`, `DMTSSetTransientVariable()`, `TSComputeIFunction()`, `TSComputeIJacobian()`

## Level
developer

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


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