:orphan:
# ISColoringCreate
Generates an `ISColoring` context from lists (provided by each MPI process) of colors for each node. 
## Synopsis
```
#include "petscis.h"  
PetscErrorCode ISColoringCreate(MPI_Comm comm, PetscInt ncolors, PetscInt n, const ISColoringValue colors[], PetscCopyMode mode, ISColoring *iscoloring)
```
Collective


## Input Parameters

- ***comm -*** communicator for the processors creating the coloring
- ***ncolors -*** max color value
- ***n -*** number of nodes on this processor
- ***colors -*** array containing the colors for this MPI rank, color numbers begin at 0, for each local node
- ***mode -*** see `PetscCopyMode` for meaning of this flag.



## Output Parameter

- ***iscoloring -*** the resulting coloring data structure



## Options Database Key

- ***-is_coloring_view -*** Activates `ISColoringView()`





## Notes
By default sets coloring type to  `IS_COLORING_GLOBAL`


## See Also
 `ISColoring`, `ISColoringValue`, `MatColoringCreate()`, `ISColoringView()`, `ISColoringDestroy()`, `ISColoringSetType()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/is/utils/iscoloring.c.html#ISColoringCreate">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](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
