DOLFINx
0.11.0.0
DOLFINx C++
Toggle main menu visibility
Loading...
Searching...
No Matches
dolfinx
graph
partitioners.h
1
// Copyright (C) 2020-2023 Garth N. Wells and Igor A. Baratta
2
//
3
// This file is part of DOLFINx (https://www.fenicsproject.org)
4
//
5
// SPDX-License-Identifier: LGPL-3.0-or-later
6
7
#pragma once
8
9
#include "partition.h"
10
#include <array>
11
12
namespace
dolfinx::graph
13
{
14
26
template
<
typename
T>
27
graph::AdjacencyList<int>
compute_destination_ranks
(
28
MPI_Comm comm,
const
graph::AdjacencyList<std::int64_t>& graph,
29
const
std::vector<T>& node_disp,
const
std::vector<T>& part);
30
31
namespace
scotch
32
{
33
#ifdef HAS_PTSCOTCH
37
enum class
strategy : std::uint8_t
38
{
40
none,
41
balance,
42
quality,
43
safety,
44
speed,
45
scalability
46
};
47
55
graph::partition_fn
partitioner(scotch::strategy strategy = strategy::none,
56
double
imbalance = 0.025,
int
seed = 0);
57
#endif
58
59
}
// namespace scotch
60
61
namespace
parmetis
62
{
63
#ifdef HAS_PARMETIS
75
graph::partition_fn
partitioner(
double
imbalance = 1.02,
76
std::array<int, 3> options = {1, 0, 5});
77
78
#endif
79
}
// namespace parmetis
80
82
namespace
kahip
83
{
84
#ifdef HAS_KAHIP
94
graph::partition_fn
partitioner
(
int
mode = 1,
int
seed = 1,
95
double
imbalance = 0.03,
96
bool
suppress_output =
true
);
97
#endif
98
}
// namespace kahip
99
100
}
// namespace dolfinx::graph
dolfinx::graph::kahip
Interfaces to KaHIP parallel partitioner.
Definition
partitioners.h:83
dolfinx::graph::kahip::partitioner
graph::partition_fn partitioner(int mode=1, int seed=1, double imbalance=0.03, bool suppress_output=true)
Create a graph partitioning function that uses KaHIP.
Definition
partitioners.cpp:609
dolfinx::graph
Graph data structures and algorithms.
Definition
AdjacencyList.h:20
dolfinx::graph::partition_fn
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
dolfinx::graph::compute_destination_ranks
graph::AdjacencyList< int > compute_destination_ranks(MPI_Comm comm, const graph::AdjacencyList< std::int64_t > &graph, const std::vector< T > &node_disp, const std::vector< T > &part)
Definition
partitioners.cpp:39
Generated by
1.17.0