# DMNetworkGetSubnetwork
Returns the information about a requested subnetwork 
## Synopsis
```
#include "petscdmnetwork.h"  
PetscErrorCode DMNetworkGetSubnetwork(DM dm, PetscInt netnum, PetscInt *nv, PetscInt *ne, const PetscInt **vtx, const PetscInt **edge)
```
Not collective


## Input Parameters

- ***dm -*** the DM object
- ***netnum -*** the global index of the subnetwork



## Output Parameters

- ***nv -*** number of vertices (local)
- ***ne -*** number of edges (local)
- ***vtx -*** local vertices of the subnetwork
- ***edge -*** local edges of the subnetwork



## Notes
Cannot call this routine before DMNetworkLayoutSetup()

The local vertices returned on each rank are determined by DMNetwork. The user does not have any control over what vertices are local.




## See Also
 `DMNetworkCreate()`, `DMNetworkAddSubnetwork()`, `DMNetworkLayoutSetUp()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/network/network.c.html#DMNetworkGetSubnetwork">src/dm/impls/network/network.c</A>


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


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