:orphan: # ISRegister Adds a new index set implementation ## Synopsis ``` #include "petscis.h" PetscErrorCode ISRegister(const char sname[], PetscErrorCode (*function)(IS)) ``` Not Collective ## Input Parameters - ***sname -*** The name of a new user-defined creation routine - ***function -*** The creation routine itself ## Sample usage ```none ISRegister("my_is_name", MyISCreate); ``` Then, your vector type can be chosen with the procedural interface via ```none ISCreate(MPI_Comm, IS *); ISSetType(IS,"my_is_name"); ``` or at runtime via the option ```none -is_type my_is_name ``` ## Notes `ISRegister()` may be called multiple times to add several user-defined vectors This is no `ISSetFromOptions()` and the current implementations do not have a way to dynamically determine type, so dynamic registration of custom `IS` types will be of limited use to users. ## See Also [](sec_scatter), `IS`, `ISType`, `ISSetType()`, `ISRegisterAll()`, `ISRegisterDestroy()`, `ISRegister()` ## Level developer ## Location src/vec/is/is/interface/isreg.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/is/is/interface/isreg.c) [Index of all IS routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)