TSRegisterDynamic

Adds a creation method to the TS package.

Synopsis


TSRegisterDynamic(char *name, char *path, char *func_name, int (*create_func)(TS))

Not Collective

Input Parameters

name - The name of a new user-defined creation routine
path - The path (either absolute or relative) of the library containing this routine
func_name - The name of the creation routine
create_func - The creation routine itself

Notes

TSRegisterDynamic() may be called multiple times to add several user-defined tses.

If dynamic libraries are used, then the fourth input argument (create_func) is ignored.

Sample usage

  TSRegisterDynamic("my_ts", "/home/username/my_lib/lib/libO/solaris/libmy.a", "MyTSCreate", MyTSCreate);

Then, your ts type can be chosen with the procedural interface via

    TSCreate(MPI_Comm, TS *);
    TSSetType(vec, "my_ts")
or at runtime via the option
    -ts_type my_ts

Notes: $PETSC_ARCH and $BOPT occuring in pathname will be replaced with appropriate values. If your function is not being put into a shared library then use TSRegister() instead

Keywords

TS, register

See Also

TSRegisterAll(), TSRegisterDestroy()

Level:advanced
Location:
src/ts/interface/tsreg.c
Index of all TS routines
Table of Contents for all manual pages
Index of all manual pages