DOLFINx 0.8.0
DOLFINx C++ interface
Loading...
Searching...
No Matches
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
11namespace dolfinx::graph
12{
13namespace scotch
14{
15#ifdef HAS_PTSCOTCH
19enum class strategy
20{
22 none,
23 balance,
24 quality,
25 safety,
26 speed,
27 scalability
28};
29
37graph::partition_fn partitioner(scotch::strategy strategy = strategy::none,
38 double imbalance = 0.025, int seed = 0);
39#endif
40
41} // namespace scotch
42
43namespace parmetis
44{
45#ifdef HAS_PARMETIS
57graph::partition_fn partitioner(double imbalance = 1.02,
58 std::array<int, 3> options = {1, 0, 5});
59
60#endif
61} // namespace parmetis
62
64namespace kahip
65{
66#ifdef HAS_KAHIP
76graph::partition_fn partitioner(int mode = 1, int seed = 1,
77 double imbalance = 0.03,
78 bool suppress_output = true);
79#endif
80} // namespace kahip
81
82} // namespace dolfinx::graph
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:608
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:32