DOLFIN-X
DOLFIN-X C++ interface
ParMETIS.h
1 // Copyright (C) 2008-2009 Niclas Jansson, Ola Skavhaug, Anders Logg,
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 <cstddef>
10 #include <cstdint>
11 #include <dolfinx/common/MPI.h>
12 #include <dolfinx/graph/AdjacencyList.h>
13 #include <vector>
14 
15 // FIXME: Avoid exposing ParMETIS publicly
16 #ifdef HAS_PARMETIS
17 #include <parmetis.h>
18 #endif
19 
20 // Interface to ParMETIS parallel partitioner
21 namespace dolfinx::graph::ParMETIS
22 {
23 #ifdef HAS_PARMETIS
24 // Standard ParMETIS partition
25 AdjacencyList<std::int32_t> partition(MPI_Comm mpi_comm, idx_t nparts,
26  const AdjacencyList<idx_t>& adj_graph,
27  bool ghosting);
28 
29 #endif
30 } // namespace dolfinx::graph::ParMETIS
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