petsc-3.3-p7 2013-05-11

ISRegisterDynamic

Adds a new vector component implementation

Synopsis

PetscErrorCode ISRegisterDynamic(const char *name, const char *path, const char *func_name, PetscErrorCode (*create_func)(IS))
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 routine to create method context
create_func - The creation routine itself

Notes

ISRegisterDynamic() may be called multiple times to add several user-defined vectors

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

Sample usage

    ISRegisterDynamic("my_is_name","/home/username/my_lib/lib/libO/solaris/libmy.a", "MyISCreate", MyISCreate);

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

    ISCreate(MPI_Comm, IS *);
    ISSetType(IS,"my_is_name");
or at runtime via the option
    -is_type my_is_name

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 ISRegister() instead

This is no ISSetFromOptions() and the current implementations do not have a way to dynamically determine type, so dynamic registration of custom IS types will be of limited use to users.

Keywords

IS, register

See Also

ISRegisterAll(), ISRegisterDestroy(), ISRegister()

Level:developer
Location:
src/vec/is/../../../include/petscis.h
Index of all IS routines
Table of Contents for all manual pages
Index of all manual pages