# MatSubdomainsCreateCoalesce
Creates index subdomains by coalescing adjacent ranks' ownership ranges. 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatSubdomainsCreateCoalesce(Mat A, PetscInt N, PetscInt *n, IS *iss[])
```
Collective


## Input Parameters

- ***A   -*** the matrix to create subdomains from
- ***N   -*** requested number of subdomains



## Output Parameters

- ***n   -*** number of subdomains resulting on this rank
- ***iss -*** `IS` list with indices of subdomains on this rank





## Note
The number of subdomains must be smaller than the communicator size


## See Also
 `Mat`, `IS`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/interface/matrix.c.html#MatSubdomainsCreateCoalesce">src/mat/interface/matrix.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/interface/matrix.c)


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