# ISRegister
Adds a new index set implementation 
## Synopsis
```
#include "petscis.h"  
PetscErrorCode ISRegister(const char sname[], PetscErrorCode (*function)(IS))
```
Not Collective


## Input Parameters

- ***name        -*** The name of a new user-defined creation routine
- ***create_func -*** 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
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/is/interface/isreg.c.html#ISRegister">src/vec/is/is/interface/isreg.c</A>


---
[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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
