# PCGASMDestroySubdomains
Destroys the index sets created with `PCGASMCreateSubdomains()` or `PCGASMCreateSubdomains2D()`. Should be called after setting subdomains with `PCGASMSetSubdomains()`. 
## Synopsis
```
#include "petscpc.h" 
PetscErrorCode PCGASMDestroySubdomains(PetscInt n, IS **iis, IS **ois)
```
Collective


## Input Parameters

- ***n   -*** the number of index sets
- ***iis -*** the array of inner subdomains,
- ***ois -*** the array of outer subdomains, can be NULL





## Note
This is a convenience subroutine that walks each list,
destroys each `IS` on the list, and then frees the list. At the end the
list pointers are set to NULL.


## See Also
 `PCGASM`, `PCGASMCreateSubdomains()`, `PCGASMSetSubdomains()`

## Level
intermediate

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

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex62.c.html">src/ksp/ksp/tutorials/ex62.c.html</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/pc/impls/gasm/gasm.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)  
