# DMProductSetDM
Set sub-DM associated with a given slot of DMProduct 
## Synopsis
```
PETSC_EXTERN PetscErrorCode DMProductSetDM(DM dm, PetscInt slot, DM subdm)
```
Not collective


## Input Parameters

- ***dm -*** the DMProduct
- ***slot -*** which dimension slot, in the range 0 to dim-1
- ***subdm -*** the sub-DM



## Notes
This function does not destroy the provided sub-DM. You may safely destroy it after calling this function.




## See Also
 `DMPRODUCT`, `DMProductGetDM()`, `DMProductSetDimensionIndex()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/product/productutils.c.html#DMProductSetDM">src/dm/impls/product/productutils.c</A>


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


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