VecRegisterDynamic

Adds a new vector component implementation

Synopsis

int VecRegisterDynamic(char *name_solver,char *path,char *name_create,
int (*routine_create)(MPI_Comm,int,int,Vec*))
Not Collective

Input Parameters

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

Notes

VecRegisterDynamic() 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

   VecRegisterDynamic("my_solver","/home/username/my_lib/lib/libO/solaris/libmine",
               "MyVectorCreate",MyVectorCreate);

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

      VecCreate(MPI_Comm,int n,int N,Vec *);
      VecSetType(Vec,"my_vector_name");
or at runtime via the option
      -vec_type my_vector_name

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

See Also

VecRegisterAll(), VecRegisterDestroy()

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