DOLFINx
0.5.1
DOLFINx C++ interface
|
Graph data structures and algorithms. More...
Namespaces | |
build | |
Tools for distributed graphs. | |
kahip | |
Interfaces to KaHIP parallel partitioner. | |
Classes | |
class | AdjacencyList |
This class provides a static adjacency list data structure. It is commonly used to store directed graphs. For each node in the contiguous list of nodes [0, 1, 2, ..., n) it stores the connected nodes. The representation is strictly local, i.e. it is not parallel aware. More... | |
Typedefs | |
using | partition_fn = std::function< graph::AdjacencyList< std::int32_t >(MPI_Comm, int, const AdjacencyList< std::int64_t > &, bool)> |
Signature of functions for computing the parallel partitioning of a distributed graph. More... | |
Functions | |
template<typename U > | |
AdjacencyList< typename std::decay_t< U >::value_type > | regular_adjacency_list (U &&data, int degree) |
Construct a constant degree (valency) adjacency list. More... | |
std::vector< std::int32_t > | reorder_gps (const graph::AdjacencyList< std::int32_t > &graph) |
Re-order a graph using the Gibbs-Poole-Stockmeyer algorithm. More... | |
AdjacencyList< std::int32_t > | partition_graph (MPI_Comm comm, int nparts, const AdjacencyList< std::int64_t > &local_graph, bool ghosting) |
Partition graph across processes using the default graph partitioner. More... | |
Graph data structures and algorithms.
Data structures for building and representing graphs, and algorithms on graphs, e.g., re-ordering and partitioning.
using partition_fn = std::function<graph::AdjacencyList<std::int32_t>( MPI_Comm, int, const AdjacencyList<std::int64_t>&, bool)> |
Signature of functions for computing the parallel partitioning of a distributed graph.
[in] | comm | MPI Communicator that the graph is distributed across |
[in] | nparts | Number of partitions to divide graph nodes into |
[in] | local_graph | Node connectivity graph |
[in] | ghosting | Flag to enable ghosting of the output node distribution |
graph::AdjacencyList< std::int32_t > partition_graph | ( | MPI_Comm | comm, |
int | nparts, | ||
const AdjacencyList< std::int64_t > & | local_graph, | ||
bool | ghosting | ||
) |
Partition graph across processes using the default graph partitioner.
[in] | comm | MPI Communicator that the graph is distributed across |
[in] | nparts | Number of partitions to divide graph nodes into |
[in] | local_graph | Node connectivity graph |
[in] | ghosting | Flag to enable ghosting of the output node distribution |
AdjacencyList<typename std::decay_t<U>::value_type> dolfinx::graph::regular_adjacency_list | ( | U && | data, |
int | degree | ||
) |
Construct a constant degree (valency) adjacency list.
A constant degree graph has the same number of edges for every node.
[in] | data | Adjacency array |
[in] | degree | The number of (outgoing) edges for each node |
std::vector< std::int32_t > reorder_gps | ( | const graph::AdjacencyList< std::int32_t > & | graph | ) |
Re-order a graph using the Gibbs-Poole-Stockmeyer algorithm.
The algorithm is described in
An Algorithm for Reducing the Bandwidth and Profile of a Sparse Matrix, SIAM Journal on Numerical Analysis, 13(2): 236-250, 1976, https://www.jstor.org/stable/2156090.
[in] | graph | The graph to compute a re-ordering for |
map
, where map[i]
is the new index of node i