Skip to main content
`Ctrl`+`K`

# TSAdaptRegister

adds a TSAdapt implementation

## Synopsis

    #include "petscts.h"
    PetscErrorCode TSAdaptRegister(const char sname[], PetscErrorCode (*function)(TSAdapt))

Not Collective, No Fortran Support

## 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.

## Example Usage

       TSAdaptRegister("my_scheme", MySchemeCreate);

Then, your scheme can be chosen with the procedural interface via

      TSAdaptSetType(ts, "my_scheme")

or at runtime via the option

      -ts_adapt_type my_scheme

## See Also

TS: Scalable ODE and DAE Solvers, Error control via variable time-stepping, `TSAdaptRegisterAll()`

## Level

advanced

## Location

src/ts/adapt/interface/tsadapt.c

Index of all TS routines
Table of Contents for all manual pages
Index of all manual pages