# PetscMapRegisterDynamic

Adds a new map component implementation

### Synopsis

    PetscErrorCode PetscMapRegisterDynamic(char *name, char *path, char *func_name, PetscErrorCode (*create_func)(PetscMap))

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

PetscMapRegister() may be called multiple times to add several user-defined maptors

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

### Sample usage

        PetscMapRegisterDynamic("my_map","/home/username/my_lib/lib/libO/solaris/libmy.a", "MyPetscMapCreate", MyPetscMapCreate);

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

        PetscMapCreate(MPI_Comm, PetscMap *);
        PetscMapSetType(PetscMap,"my_map_name");

or at runtime via the option

        -map_type my_map_name

Note: $PETSC_ARCH and $BOPT occuring in pathname will be replaced with appropriate values.

### Keywords

PetscMap, register

### See Also

PetscMapRegisterAll(), PetscMapRegisterDestroy()

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