# DMNetworkGetComponent
Gets the component key, the component data, and the number of variables at a given network point 
## Synopsis
```
#include "petscdmnetwork.h"  
PetscErrorCode DMNetworkGetComponent(DM dm, PetscInt p, PetscInt compnum, PetscInt *compkey, void **component, PetscInt *nvar)
```
Not Collective


## Input Parameters

- ***dm -*** the DMNetwork object
- ***p -*** vertex/edge point
- ***compnum -*** component number; use ALL_COMPONENTS if sum up all the components



## Output Parameters

- ***compkey -*** the key obtained when registering the component (use NULL if not required)
- ***component -*** the component data (use NULL if not required)
- ***nvar  -*** number of variables (use NULL if not required)





## See Also
 `DMNetworkAddComponent()`, `DMNetworkGetNumComponents()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/network/network.c.html#DMNetworkGetComponent">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)  
