TSRegister

Adds a creation method to the TS package.

Synopsis

#include "petscts.h"  
#undef __FUNCT__  
#define __FUNCT__ "TSRegister"
int TSRegister(const char sname[], const char path[], const char name[], int (*function)(TS))

Synopsis


TSRegister(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

TSRegister() 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

Note: $PETSC_ARCH and $BOPT occuring in pathname will be replaced with appropriate values.

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