:orphan:
# TSAdaptRegister
adds a TSAdapt implementation 
## Synopsis
```
#include "petscts.h" 
PetscErrorCode TSAdaptRegister(const char sname[], PetscErrorCode (*function)(TSAdapt))
```
Not Collective


## Input Parameters

- ***sname -*** name of user-defined adaptivity scheme
- ***function -*** routine to create method context





## Notes
`TSAdaptRegister()` may be called multiple times to add several user-defined families.


## Sample usage
```none
   TSAdaptRegister("my_scheme", MySchemeCreate);
```


Then, your scheme can be chosen with the procedural interface via
```none
TSAdaptSetType(ts, "my_scheme")
```
or at runtime via the option
```none
-ts_adapt_type my_scheme
```


## See Also
 [](ch_ts), `TSAdaptRegisterAll()`

## Level
advanced

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


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