DOLFIN-X
DOLFIN-X C++ interface
SCOTCH.h
1 // Copyright (C) 2010-2013 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 <cstdint>
11 #include <mpi.h>
12 #include <string>
13 #include <utility>
14 #include <vector>
15 
16 // Developer note: ptscotch.h is not part of the public interface,
17 // therefore this header (SCOTCH.h) should not be placed in the public
18 // interface of DOLFIN.
19 extern "C"
20 {
21 #include <ptscotch.h>
22 }
23 
26 {
27 
39 partition(const MPI_Comm mpi_comm, const int nparts,
40  const AdjacencyList<SCOTCH_Num>& local_graph,
41  const std::vector<std::size_t>& node_weights,
42  std::int32_t num_ghost_nodes, bool ghosting);
43 
50 std::pair<std::vector<int>, std::vector<int>>
52  std::size_t num_passes = 5);
53 
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:28
Interface to SCOTCH-PT (parallel version)
Definition: SCOTCH.h:26
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:29
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:38
AdjacencyList< std::int32_t > partition(const MPI_Comm mpi_comm, const int nparts, const AdjacencyList< SCOTCH_Num > &local_graph, const std::vector< std::size_t > &node_weights, std::int32_t num_ghost_nodes, bool ghosting)
Compute distributed graph partition.
Definition: SCOTCH.cpp:123