| network.c (1ed6e3ff8437baa411029a28c2b08f047df9ad9a) | network.c (f13dfd9ea68e0ddeee984e65c377a1819eab8a8a) |
|---|---|
| 1#include <petsc/private/dmnetworkimpl.h> /*I "petscdmnetwork.h" I*/ 2 3PetscLogEvent DMNetwork_LayoutSetUp; 4PetscLogEvent DMNetwork_SetUpNetwork; 5PetscLogEvent DMNetwork_Distribute; 6 7/* 8 Creates the component header and value objects for a network point --- 136 unchanged lines hidden (view full) --- 145$ [first vertex of first edge, second vertex of first edge, first vertex of second edge, second vertex of second edge, etc] 146 147 Output Parameter: 148. netnum - global index of the subnetwork 149 150 Level: beginner 151 152 Notes: | 1#include <petsc/private/dmnetworkimpl.h> /*I "petscdmnetwork.h" I*/ 2 3PetscLogEvent DMNetwork_LayoutSetUp; 4PetscLogEvent DMNetwork_SetUpNetwork; 5PetscLogEvent DMNetwork_Distribute; 6 7/* 8 Creates the component header and value objects for a network point --- 136 unchanged lines hidden (view full) --- 145$ [first vertex of first edge, second vertex of first edge, first vertex of second edge, second vertex of second edge, etc] 146 147 Output Parameter: 148. netnum - global index of the subnetwork 149 150 Level: beginner 151 152 Notes: |
| 153 There is no copy involved in this operation, only the pointer is referenced. The edgelist should | 153 There is no copy involved in this operation, only the pointer is referenced. The `edgelist` should |
| 154 not be destroyed before the call to `DMNetworkLayoutSetUp()` 155 156 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. 157 For a multiple subnetworks, | 154 not be destroyed before the call to `DMNetworkLayoutSetUp()` 155 156 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. 157 For a multiple subnetworks, |
| 158 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. | 158 each subnetwork topology needs to be set on a unique MPI process and the communicator size needs to be at least equal to the number of subnetworks. |
| 159 160 Example usage: 161 Consider the following networks\: 162 1) A single subnetwork\: 163.vb 164 network 0: 165 rank[0]: 166 v0 --> v2; v1 --> v2 --- 1785 unchanged lines hidden (view full) --- 1952 1953 /* View distributed dmnetwork */ 1954 PetscCall(DMViewFromOptions(newDM, NULL, "-dmnetwork_view_distributed")); 1955 1956 *dm = newDM; 1957 PetscFunctionReturn(PETSC_SUCCESS); 1958} 1959 | 159 160 Example usage: 161 Consider the following networks\: 162 1) A single subnetwork\: 163.vb 164 network 0: 165 rank[0]: 166 v0 --> v2; v1 --> v2 --- 1785 unchanged lines hidden (view full) --- 1952 1953 /* View distributed dmnetwork */ 1954 PetscCall(DMViewFromOptions(newDM, NULL, "-dmnetwork_view_distributed")); 1955 1956 *dm = newDM; 1957 PetscFunctionReturn(PETSC_SUCCESS); 1958} 1959 |
| 1960/*@ | 1960/*@C |
| 1961 PetscSFGetSubSF - Returns an `PetscSF` for a specific subset of points. Leaves are re-numbered to reflect the new ordering 1962 1963 Collective 1964 1965 Input Parameters: 1966+ mainsf - `PetscSF` structure 1967- map - a `ISLocalToGlobalMapping` that contains the subset of points 1968 --- 1253 unchanged lines hidden --- | 1961 PetscSFGetSubSF - Returns an `PetscSF` for a specific subset of points. Leaves are re-numbered to reflect the new ordering 1962 1963 Collective 1964 1965 Input Parameters: 1966+ mainsf - `PetscSF` structure 1967- map - a `ISLocalToGlobalMapping` that contains the subset of points 1968 --- 1253 unchanged lines hidden --- |