# PFRegisterDynamic

Adds a method to the mathematical function package.

### Synopsis

    PetscErrorCode PFRegisterDynamic(char *name_solver,char *path,char *name_create,PetscErrorCode (*routine_create)(PF))

Not collective

### Input Parameters

| name_solver | - name of a new user-defined solver
| path | - path (either absolute or relative) the library containing this solver
| name_create | - name of routine to create method context
| routine_create | - routine to create method context

### Notes

PFRegisterDynamic() may be called multiple times to add several user-defined functions

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

### Sample usage

       PFRegisterDynamic("my_function","/home/username/my_lib/lib/libO/solaris/mylib",
                  "MyFunctionCreate",MyFunctionSetCreate);

Then, your solver can be chosen with the procedural interface via

        PFSetType(pf,"my_function")

or at runtime via the option

        -pf_type my_function

${PETSC_ARCH}, ${PETSC_DIR}, ${PETSC_LIB_DIR}, or ${any environmental variable} occuring in pathname will be replaced with appropriate values.

### Keywords

PF, register

### See Also

PFRegisterAll(), PFRegisterDestroy(), PFRegister()

Level:advanced
Location: src/vec/pf/interface/pf.c
Index of all PF routines
Table of Contents for all manual pages
Index of all manual pages