VecRegister

Adds a new vector component implementation

Synopsis

VecRegister(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

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

   VecRegister("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

Keywords

Vec, register

See Also

VecRegisterAll(), VecRegisterDestroy()

Level:advanced
Location:src/vec/utils/gcreatev.c
Vector Index
Table of Contents