# PCASMCreateSubdomains
Creates the index sets for the overlapping Schwarz preconditioner, `PCASM`,  for any problem on a general grid. 
## Synopsis
```
#include "petscpc.h" 
PetscErrorCode PCASMCreateSubdomains(Mat A, PetscInt n, IS *outis[])
```
Collective


## Input Parameters

- ***A -*** The global matrix operator
- ***n -*** the number of local blocks



## Output Parameters

- ***outis -*** the array of index sets defining the subdomains





## Note
This generates nonoverlapping subdomains; the `PCASM` will generate the overlap
from these if you use `PCASMSetLocalSubdomains()`


## Fortran Note
You must provide the array outis[] already allocated of length n.


## See Also
 `PCASM`, `PCASMSetLocalSubdomains()`, `PCASMDestroySubdomains()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/asm/asm.c.html#PCASMCreateSubdomains">src/ksp/pc/impls/asm/asm.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/pc/impls/asm/asm.c)


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