:orphan:
# PetscSubcommSetTypeGeneral
Divides up a communicator based on a specific user's specification 
## Synopsis
```
#include "petscsys.h"    
PetscErrorCode PetscSubcommSetTypeGeneral(PetscSubcomm psubcomm, PetscMPIInt color, PetscMPIInt subrank)
```
Collective


## Input Parameters

- ***psubcomm -*** `PetscSubcomm` context
- ***color   -*** control of subset assignment (nonnegative integer). Processes with the same color are in the same subcommunicator.
- ***subrank -*** rank in the subcommunicator





## See Also
 `PetscSubcommType`, `PETSC_SUBCOMM_CONTIGUOUS`, `PETSC_SUBCOMM_INTERLACED`, `PetscSubcommCreate()`, `PetscSubcommDestroy()`, `PetscSubcommSetNumber()`, `PetscSubcommSetType()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/objects/subcomm.c.html#PetscSubcommSetTypeGeneral">src/sys/objects/subcomm.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/objects/subcomm.c)


[Index of all Sys routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
