# ISLocalToGlobalMappingRegister
Registers a method for applying a global to local mapping with an `ISLocalToGlobalMapping` 
## Synopsis
```
#include "petscis.h"  
PetscErrorCode ISLocalToGlobalMappingRegister(const char sname[], PetscErrorCode (*function)(ISLocalToGlobalMapping))
```
Not Collective


## Input Parameters

- ***sname -*** name of a new method
- ***routine_create -*** routine to create method context



## Sample usage
```none
   ISLocalToGlobalMappingRegister("my_mapper",MyCreate);
```


Then, your mapping can be chosen with the procedural interface via
```none
ISLocalToGlobalMappingSetType(ltog,"my_mapper")
```
or at runtime via the option
```none
-islocaltoglobalmapping_type my_mapper
```




## Note
`ISLocalToGlobalMappingRegister()` may be called multiple times to add several user-defined mappings.


## See Also
 [](sec_scatter), `ISLocalToGlobalMappingRegisterAll()`, `ISLocalToGlobalMappingRegisterDestroy()`, `ISLOCALTOGLOBALMAPPINGBASIC`,
`ISLOCALTOGLOBALMAPPINGHASH`, `ISLocalToGlobalMapping`, `ISLocalToGlobalMappingApply()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/utils/isltog.c.html#ISLocalToGlobalMappingRegister">src/vec/is/utils/isltog.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/is/utils/isltog.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)  
