# DMCreateDomainDecompositionScatters
Returns scatters to the subdomain vectors from the global vector 
## Synopsis
```
#include "petscdm.h"          
#include "petscdmlabel.h"     
#include "petscds.h"     
PetscErrorCode DMCreateDomainDecompositionScatters(DM dm, PetscInt n, DM *subdms, VecScatter **iscat, VecScatter **oscat, VecScatter **gscat)
```
Not collective


## Input Parameters

- ***dm -*** the `DM` object
- ***n  -*** the number of subdomain scatters
- ***subdms -*** the local subdomains



## Output Parameters

- ***iscat -*** scatter from global vector to nonoverlapping global vector entries on subdomain
- ***oscat -*** scatter from global vector to overlapping global vector entries on subdomain
- ***gscat -*** scatter from global vector to local vector on subdomain (fills in ghosts)



## Note
This is an alternative to the iis and ois arguments in `DMCreateDomainDecomposition()` that allow for the solution
of general nonlinear problems with overlapping subdomain methods.  While merely having index sets that enable subsets
of the residual equations to be created is fine for linear problems, nonlinear problems require local assembly of
solution and residual data.


## Questions
Can the subdms input be anything or are they exactly the `DM` obtained from `DMCreateDomainDecomposition()`?




## See Also
 `DM`, `DMCreateDomainDecomposition()`, `DMDestroy()`, `DMView()`, `DMCreateInterpolation()`, `DMCreateColoring()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMCreateFieldIS()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/interface/dm.c.html#DMCreateDomainDecompositionScatters">src/dm/interface/dm.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/tutorials/ex14.c.html">src/dm/tutorials/ex14.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex29.c.html">src/ts/tutorials/ex29.c.html</A><BR>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/da/dadd.c.html#DMCreateDomainDecompositionScatters_DA">DMCreateDomainDecompositionScatters_DA in src/dm/impls/da/dadd.c</A><BR>


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


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