petsc-3.14.5 2021-03-03
Report Typos and Errors

# VecScatterRegister

Adds a new vector scatter component implementation

### Synopsis

    #include "petscvec.h"
    PetscErrorCode VecScatterRegister(const char sname[], PetscErrorCode (*function)(VecScatter))

Not Collective

### Input Parameters

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

### Notes

VecScatterRegister() may be called multiple times to add several user-defined vectors

### Sample usage

        VecScatterRegister("my_vecscatter",MyVecScatterCreate);

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

        VecScatterCreate(MPI_Comm, VecScatter *);
        VecScatterSetType(VecScatter,"my_vectorscatter_name");

or at runtime via the option

        -vecscatter_type my_vectorscatter_name

### See Also

VecScatterRegisterAll(), VecScatterRegisterDestroy()

### Level

advanced

### Location

src/vec/vscat/interface/vscreate.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages