petsc-3.7.1 2016-05-15
Report Typos and Errors

VecRegister

Adds a new vector component implementation

Synopsis

#include "petscvec.h"  
PetscErrorCode  VecRegister(const char sname[], PetscErrorCode (*function)(Vec))
Not Collective Many br

Input Parameters

name - The name of a new user-defined creation routine Many br
create_func - The creation routine itself Many br

Notes

VecRegister() may be called multiple times to add several user-defined vectors Many br

Sample usage

    VecRegister("my_vec",MyVectorCreate);
Many br

Then, your vector type can be chosen with the procedural interface via Many br

    VecCreate(MPI_Comm, Vec *);
    VecSetType(Vec,"my_vector_name");
Many bror at runtime via the option Many br
    -vec_type my_vector_name
Many br

Many br

Keywords

Vec, register

See Also

VecRegisterAll(), VecRegisterDestroy()

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