9#include "AdjacencyList.h"
31using partition_fn = std::function<graph::AdjacencyList<std::int32_t>(
67std::tuple<graph::AdjacencyList<std::int64_t>, std::vector<int>,
68 std::vector<std::int64_t>, std::vector<int>>
89std::tuple<std::vector<std::int64_t>, std::vector<int>,
90 std::vector<std::int64_t>, std::vector<int>>
91distribute(MPI_Comm comm, std::span<const std::int64_t> list,
92 std::array<std::size_t, 2> shape,
118std::vector<std::int64_t>
120 std::span<const std::int64_t> owned_indices,
121 std::span<const std::int64_t> ghost_indices,
122 std::span<const int> ghost_owners);
134std::vector<std::int64_t>
136 std::span<const std::int32_t> local);
146std::vector<std::int32_t>
148 std::span<const std::int64_t> local1_to_global);
Definition topologycomputation.h:24
std::vector< std::int64_t > compute_ghost_indices(MPI_Comm comm, std::span< const std::int64_t > owned_indices, std::span< const std::int64_t > ghost_indices, std::span< const int > ghost_owners)
Take a set of distributed input global indices, including ghosts, and determine the new global indice...
Definition partition.cpp:394
std::vector< std::int64_t > compute_local_to_global(std::span< const std::int64_t > global, std::span< const std::int32_t > local)
Definition partition.cpp:534
std::tuple< graph::AdjacencyList< std::int64_t >, std::vector< int >, std::vector< std::int64_t >, std::vector< int > > distribute(MPI_Comm comm, const graph::AdjacencyList< std::int64_t > &list, const graph::AdjacencyList< std::int32_t > &destinations)
Distribute adjacency list nodes to destination ranks.
Definition partition.cpp:38
std::vector< std::int32_t > compute_local_to_local(std::span< const std::int64_t > local0_to_global, std::span< const std::int64_t > local1_to_global)
Compute a local0-to-local1 map from two local-to-global maps with common global indices.
Definition partition.cpp:556
Graph data structures and algorithms.
Definition dofmapbuilder.h:26
std::function< graph::AdjacencyList< std::int32_t >( MPI_Comm, int, const AdjacencyList< std::int64_t > &, bool)> partition_fn
Signature of functions for computing the parallel partitioning of a distributed graph.
Definition partition.h:31
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.
Definition partition.cpp:21