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
scotch.h
1 // Copyright (C) 2010-2020 Garth N. Wells and Chris Richardson
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 "AdjacencyList.h"
10 #include "partition.h"
11 #include <cstdint>
12 #include <mpi.h>
13 #include <string>
14 #include <utility>
15 #include <vector>
16 
19 {
20 
22 enum class strategy
23 {
24  none, // SCOTCH default strategy
25  balance,
26  quality,
27  safety,
28  speed,
29  scalability
30 };
31 
40  double imbalance = 0.025, int seed = 0);
41 
49 std::pair<std::vector<int>, std::vector<int>>
51  std::size_t num_passes = 5);
52 
59 std::pair<std::vector<int>, std::vector<int>>
61  std::string scotch_strategy = "");
62 
63 } // namespace dolfinx::graph::scotch
This class provides a static adjacency list data structure. It is commonly used to store directed gra...
Definition: AdjacencyList.h:47
Interface to SCOTCH-PT.
Definition: scotch.h:19
std::pair< std::vector< int >, std::vector< int > > compute_gps(const AdjacencyList< std::int32_t > &graph, std::size_t num_passes=5)
Compute reordering (map[old] -> new) using Gibbs-Poole-Stockmeyer (GPS) re-ordering.
Definition: scotch.cpp:28
std::pair< std::vector< int >, std::vector< int > > compute_reordering(const AdjacencyList< std::int32_t > &graph, std::string scotch_strategy="")
Compute graph re-ordering.
Definition: scotch.cpp:37
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
strategy
SCOTCH partitioning strategies.
Definition: scotch.h:23
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