# ISColoringGetIS
Extracts index sets from the coloring context. Each is contains the nodes of one color 
## Synopsis
```
#include "petscis.h"  
PetscErrorCode ISColoringGetIS(ISColoring iscoloring, PetscCopyMode mode, PetscInt *nn, IS *isis[])
```
Collective on iscoloring


## Input Parameters

- ***iscoloring -*** the coloring context
- ***mode -*** if this value is `PETSC_OWN_POINTER` then the caller owns the pointer and must free the array of `IS` and each `IS` in the array



## Output Parameters

- ***nn -*** number of index sets in the coloring context
- ***is -*** array of index sets





## Note
If mode is `PETSC_USE_POINTER` then `ISColoringRestoreIS()` must be called when the `IS` are no longer needed


## See Also
 `ISColoring`, `IS`, `ISColoringRestoreIS()`, `ISColoringView()`, `ISColoringGetColoring()`, `ISColoringGetColors()`

## Level
advanced

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


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