# TSRHSSplitGetSubTSs
Get an array of all sub-`TS` contexts. 
## Synopsis
```
#include "petscts.h"  
PetscErrorCode TSRHSSplitGetSubTSs(TS ts, PetscInt *n, TS *subts[])
```
Logically Collective


## Input Parameter

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



## Output Parameters

- ***n -*** the number of splits
- ***subksp -*** the array of `TS` contexts





## Note
After `TSRHSSplitGetSubTS()` the array of `TS`s is to be freed by the user with `PetscFree()`
(not the `TS` just the array that contains them).


## See Also
 [](chapter_ts), `TS`, `IS`, `TSGetRHSSplitFunction()`

## Level
advanced

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


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