# MatSNESMFRegisterDynamic

Adds a method to the MatSNESMF registry.

### Synopsis

    PetscErrorCode MatSNESMFRegisterDynamic(char *name_solver,char *path,char *name_create,PetscErrorCode (*routine_create)(MatSNESMF))

Not Collective

### Input Parameters

| name_solver | - name of a new user-defined compute-h module
| 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

MatSNESMFRegisterDynamic) may be called multiple times to add several user-defined solvers.

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

### Sample usage

       MatSNESMFRegisterDynamic"my_h",/home/username/my_lib/lib/libO/solaris/mylib.a,
                   "MyHCreate",MyHCreate);

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

        MatSNESMFSetType(mfctx,"my_h")

or at runtime via the option

        -snes_mf_type my_h

### Keywords

MatSNESMF, register

### See Also

MatSNESMFRegisterAll(), MatSNESMFRegisterDestroy()

Level:developer
Location: src/snes/../../include/petscsnes.h
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages