DOLFINx 0.9.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#include <array>
11
12namespace dolfinx::graph
13{
14namespace scotch
15{
16#ifdef HAS_PTSCOTCH
20enum class strategy
21{
23 none,
24 balance,
25 quality,
26 safety,
27 speed,
28 scalability
29};
30
38graph::partition_fn partitioner(scotch::strategy strategy = strategy::none,
39 double imbalance = 0.025, int seed = 0);
40#endif
41
42} // namespace scotch
43
44namespace parmetis
45{
46#ifdef HAS_PARMETIS
58graph::partition_fn partitioner(double imbalance = 1.02,
59 std::array<int, 3> options = {1, 0, 5});
60
61#endif
62} // namespace parmetis
63
65namespace kahip
66{
67#ifdef HAS_KAHIP
77graph::partition_fn partitioner(int mode = 1, int seed = 1,
78 double imbalance = 0.03,
79 bool suppress_output = true);
80#endif
81} // namespace kahip
82
83} // 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:611
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