# ISPairToList
Convert an `IS` pair encoding an integer map to a list of `IS`. Each `IS` on the output list contains the preimage for each index on the second input `IS`. The `IS` on the output list are constructed on the subcommunicators of the input `IS` pair. Each subcommunicator corresponds to the preimage of some index j -- this subcomm contains exactly the ranks that assign some indices i to j.  This is essentially the inverse of `ISListToPair()`. 
## Synopsis
```
#include "petscis.h"  
PetscErrorCode ISPairToList(IS xis, IS yis, PetscInt *listlen, IS **islist)
```
Collective on xis.


## Input Parameters

- ***xis -*** domain IS
- ***yis -*** range IS



## Output Parameters

- ***listlen -*** length of islist
- ***islist  -*** list of ISs breaking up indis by color





## Notes
xis and yis must be of the same length and have congruent communicators.

The resulting `IS` have subcommunicators in a "deadlock-free" order (see `ISListToPair()`).


## See Also
 `IS`, `ISListToPair()`

## Level
developer

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


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