Note: this is documentation for an old release. View the latest documentation at docs.fenicsproject.org/v0.3.0/v0.9.0/cpp
DOLFINx  0.3.0
DOLFINx C++ interface
partitioners.h
1 // Copyright (C) 2020 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 <cstdint>
11 #include <dolfinx/graph/AdjacencyList.h>
12 #include <functional>
13 #include <mpi.h>
14 
15 namespace dolfinx::graph
16 {
17 
18 namespace parmetis
19 {
20 #ifdef HAS_PARMETIS
21 
26 graph::partition_fn partitioner(double imbalance = 1.02,
27  std::array<int, 3> options = {0, 0, 0});
28 
29 #endif
30 } // namespace parmetis
31 
33 namespace kahip
34 {
35 #ifdef HAS_KAHIP
45 graph::partition_fn partitioner(int mode = 1, int seed = 1,
46  double imbalance = 0.03,
47  bool suppress_output = true);
48 
49 #endif
50 } // namespace kahip
51 } // namespace dolfinx::graph
graph::partition_fn partitioner(scotch::strategy strategy=strategy::none, double imbalance=0.025, int seed=0)
Create a graph partitioning function that uses SCOTCH.
Definition: scotch.cpp:109
Graph data structures and algorithms.
Definition: AdjacencyList.h:19
std::function< graph::AdjacencyList< std::int32_t >(MPI_Comm comm, int nparts, const AdjacencyList< std::int64_t > &local_graph, std::int32_t num_ghost_nodes, bool ghosting)> partition_fn
Signature of functions for computing the parallel partitioning of a distributed graph.
Definition: partition.h:36