# DMNetworkAddSharedVertices
Add shared vertices that connect two given subnetworks 
## Synopsis
```
#include "petscdmnetwork.h"  
PetscErrorCode DMNetworkAddSharedVertices(DM dm, PetscInt anetnum, PetscInt bnetnum, PetscInt nsvtx, PetscInt asvtx[], PetscInt bsvtx[])
```
Collective on dm


## Input Parameters

- ***dm -*** the dm object
- ***anetnum -*** first subnetwork global numbering returned by DMNetworkAddSubnetwork()
- ***bnetnum -*** second subnetwork global numbering returned by DMNetworkAddSubnetwork()
- ***nsvtx -*** number of vertices that are shared by the two subnetworks
- ***asvtx -*** vertex index in the first subnetwork
- ***bsvtx -*** vertex index in the second subnetwork





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

## Level
beginner

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