DOLFINx
0.12.0.0
DOLFINx C++
Toggle main menu visibility
Loading...
Searching...
No Matches
dolfinx
graph
ordering.h
1
// Copyright (C) 2021 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 <cstddef>
11
#include <cstdint>
12
#include <functional>
13
#include <span>
14
#include <variant>
15
#include <vector>
16
17
namespace
dolfinx::graph
18
{
39
std::vector<std::int32_t>
40
reorder_rcm
(
const
graph::AdjacencyList<std::int32_t>& graph);
41
43
using
reorder_graph_fn
= std::function<std::vector<std::int32_t>(
44
const
graph::AdjacencyList<std::int32_t>
&)>;
45
52
using
reorder_geom_fn
= std::function<std::vector<std::int32_t>(
53
std::span<const double> x,
int
gdim)>;
54
59
using
Reorder
= std::variant<reorder_graph_fn, reorder_geom_fn>;
60
}
// namespace dolfinx::graph
dolfinx::graph::AdjacencyList
This class provides a static adjacency list data structure.
Definition
AdjacencyList.h:41
dolfinx::graph
Graph data structures and algorithms.
Definition
AdjacencyList.h:23
dolfinx::graph::reorder_graph_fn
std::function< std::vector< std::int32_t >( const graph::AdjacencyList< std::int32_t > &)> reorder_graph_fn
Signature of functions that reorder the nodes of a graph.
Definition
ordering.h:43
dolfinx::graph::Reorder
std::variant< reorder_graph_fn, reorder_geom_fn > Reorder
A graph or geometric reordering function for mesh cells.
Definition
ordering.h:59
dolfinx::graph::reorder_geom_fn
std::function< std::vector< std::int32_t >( std::span< const double > x, int gdim)> reorder_geom_fn
Signature of functions that reorder points from their positions.
Definition
ordering.h:52
dolfinx::graph::reorder_rcm
std::vector< std::int32_t > reorder_rcm(const graph::AdjacencyList< std::int32_t > &graph)
Re-order a graph using the Reverse Cuthill-McKee algorithm.
Definition
ordering.cpp:149
Generated by
1.18.0