#include "petscdmnetwork.h" PetscErrorCode DMNetworkAddSubnetwork(DM dm,const char* name,PetscInt ne,PetscInt edgelist[],PetscInt *netnum)Collective on dm
dm | - the dm object | |
name | - name of the subnetwork | |
ne | - number of local edges of this subnetwork | |
edgelist | - list of edges for this subnetwork |
netnum | - global index of the subnetwork |
A network can comprise of a single subnetwork OR multiple subnetworks. For a single subnetwork, the subnetwork can be read either in serial or parallel. For a multiple subnetworks, each subnetwork topology needs to be set on a unique rank and the communicator size needs to be at least equal to the number of subnetworks.
network 0: rank[0]: v0 --> v2; v1 --> v2 rank[1]: v3 --> v5; v4 --> v5
The resulting input
subnetwork 0: rank[0]: v0 --> v2; v2 --> v1; v1 --> v3; subnetwork 1: rank[1]: v0 --> v3; v3 --> v2; v2 --> v1;
The resulting input