:orphan:
# DMCreateSectionSubDM
Returns an `IS` and subDM+subSection encapsulating a subproblem defined by the fields in a `PetscSection` in the `DM`. 
## Synopsis
```
#include "petscdm.h"     
PetscErrorCode DMCreateSectionSubDM(DM dm, PetscInt numFields, const PetscInt fields[], IS *is, DM *subdm)
```
Not Collective


## Input Parameters

- ***dm        -*** The `DM` object
- ***numFields -*** The number of fields in this subproblem
- ***fields    -*** The field numbers of the selected fields



## Output Parameters

- ***is -*** The global indices for the subproblem
- ***subdm -*** The `DM` for the subproblem, which must already have be cloned from `dm`





## Note
This handles all information in the `DM` class and the `PetscSection`. This is used as the basis for creating subDMs in specialized classes,
such as `DMPLEX` and `DMFOREST`


## See Also
`DMCreateSubDM()`, `DMGetLocalSection()`, `DMPlexSetMigrationSF()`, `DMView()`

## Level
intermediate

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


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


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