petsc-3.3-p7 2013-05-11


Adds a creation method to the TS package.


PetscErrorCode TSRegisterDynamic(const char *name, const char *path, const char *func_name, PetscErrorCode (*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


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

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

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


TS, register

See Also

TSRegisterAll(), TSRegisterDestroy()

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