DARegisterDynamic

Adds a new DA component implementation

Synopsis

PetscErrorCode DARegisterDynamic(char *name, char *path, char *func_name, PetscErrorCode (*create_func)(DA))
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

DARegisterDynamic() may be called multiple times to add several user-defined DAs

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

Sample usage

    DARegisterDynamic("my_da","/home/username/my_lib/lib/libO/solaris/libmy.a", "MyDACreate", MyDACreate);

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

    DACreate(MPI_Comm, DA *);
    DASetType(DA,"my_da_name");
or at runtime via the option
    -da_type my_da_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 DARegister() instead

Keywords

DA, register

See Also

DARegisterAll(), DARegisterDestroy(), DARegister()

Level:advanced
Location:
src/dm/da/../../../include/petscda.h
Index of all DA routines
Table of Contents for all manual pages
Index of all manual pages