DOLFIN-X
DOLFIN-X C++ interface
dolfinx
graph
BoostGraphOrdering.h
1
// Copyright (C) 2012 Garth N. Wells
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 <set>
10
#include <utility>
11
#include <vector>
12
#include <cstdint>
13
14
namespace
dolfinx::graph
15
{
16
17
template
<
typename
T>
18
class
AdjacencyList;
19
21
22
class
BoostGraphOrdering
23
{
24
25
public
:
28
static
std::vector<int>
29
compute_cuthill_mckee
(
const
AdjacencyList<std::int32_t>
& graph,
30
bool
reverse =
false
);
31
34
static
std::vector<int>
compute_cuthill_mckee
(
35
const
std::set<std::pair<std::size_t, std::size_t>>& edges,
36
std::size_t size,
bool
reverse =
false
);
37
};
38
}
// namespace dolfinx::graph
dolfinx::graph
Graph data structures and algorithms.
Definition:
AdjacencyList.h:18
dolfinx::graph::AdjacencyList
This class provides a static adjacency list data structure. It is commonly used to store directed gra...
Definition:
AdjacencyList.h:28
dolfinx::graph::BoostGraphOrdering::compute_cuthill_mckee
static std::vector< int > compute_cuthill_mckee(const AdjacencyList< std::int32_t > &graph, bool reverse=false)
Compute re-ordering (map[old] -> new) using Cuthill-McKee algorithm.
Definition:
BoostGraphOrdering.cpp:49
dolfinx::graph::BoostGraphOrdering
This class computes graph re-orderings. It uses Boost Graph.
Definition:
BoostGraphOrdering.h:23
Generated by
1.8.18