:orphan:
# TSRHSSplitSetRHSFunction
Set the split right-hand-side functions. 
## Synopsis
```
#include "petscts.h"  
PetscErrorCode TSRHSSplitSetRHSFunction(TS ts, const char splitname[], Vec r, TSRHSFunction rhsfunc, void *ctx)
```
Logically Collective


## Input Parameters

- ***ts        -*** the `TS` context obtained from `TSCreate()`
- ***splitname -*** name of this split
- ***r         -*** vector to hold the residual (or `NULL` to have it created internally)
- ***rhsfunc   -*** the RHS function evaluation routine
- ***ctx       -*** user-defined context for private data for the split function evaluation routine (may be `NULL`)



## Calling sequence of `rhsfun`
```none
PetscErrorCode rhsfunc(TS ts, PetscReal t, Vec u, Vec f,ctx)
```

- ***ts  -*** the `TS` context obtained from `TSCreate()`
- ***t    -*** time at step/stage being solved
- ***u    -*** state vector
- ***f    -*** function vector
- ***ctx  -*** [optional] user-defined context for matrix evaluation routine (may be `NULL`)





## See Also
 [](ch_ts), `TS`, `TSRHSFunction`, `IS`, `TSRHSSplitSetIS()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/interface/tsrhssplit.c.html#TSRHSSplitSetRHSFunction">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](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
