# TSGetSolutionComponents
Returns any solution components at the present timestep, if available for the time integration method being used. Solution components are quantities that share the same size and structure as the solution vector. 
## Synopsis
```
#include "petscts.h"  
PetscErrorCode TSGetSolutionComponents(TS ts, PetscInt *n, Vec *v)
```
Not Collective, but v returned is parallel if ts is parallel


## Parameters 

- ***ts -*** the `TS` context obtained from `TSCreate()` (input parameter).
- ***n -*** If v is PETSC_NULL, then the number of solution components is
returned through n, else the n-th solution component is
returned in v.
- ***v -*** the vector containing the n-th solution component
(may be PETSC_NULL to use this function to find out
the number of solutions components).





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

## Level
advanced

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/glee/glee.c.html#TSGetSolutionComponents_GLEE">TSGetSolutionComponents_GLEE in src/ts/impls/glee/glee.c</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)  
