FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::Adjacency::CuthillMcKee Class Reference

Cuthill McKee implementation. More...

#include <cuthill_mckee.hpp>

Public Types

enum class  RootType { standard = 0 , minimum_degree = 1 , maximum_degree = 2 }
 Root type enumeration. More...
 
enum class  SortType { standard = 0 , asc = 1 , desc = 2 }
 Sort type enumeration. More...
 

Static Public Member Functions

static Permutation compute (const Graph &graph, bool reverse=false, CuthillMcKee::RootType R_type=RootType::standard, CuthillMcKee::SortType s_type=SortType::standard)
 Cuthill-McKee permutation computation function. More...
 
static Permutation compute (std::vector< Index > &layers, const Graph &graph, bool reverse=false, CuthillMcKee::RootType r_type=RootType::standard, CuthillMcKee::SortType t_type=SortType::standard)
 Cuthill-McKee permutation computation function. More...
 

Detailed Description

Cuthill McKee implementation.

Todo:
detailed description
Author
Constantin Christof

Definition at line 26 of file cuthill_mckee.hpp.

Member Enumeration Documentation

◆ RootType

Root type enumeration.

This enumeration specifies how the root node of the Cuthill-McKee algorithm is chosen.

Enumerator
standard 

Default root.

In this mode, the first admissible node is chosen.

minimum_degree 

Minimum-degree root.

In this mode, a node of minimum degree is chosen as the root node.

maximum_degree 

Maximum-degree root.

In this mode, a node of maximum degree is chosen as the root node.

Definition at line 35 of file cuthill_mckee.hpp.

◆ SortType

Sort type enumeration.

This enumeration specifies the order, that is used to arrange the nodes of each level.

Enumerator
standard 

Default sorting type.

In this mode, the nodes are not sorted at all.

asc 

Ascending order.

In this mode, the nodes are arranged in an ascending order corresponding to their degrees.

desc 

Descending order.

In this mode, the nodes are arranged in a descending order corresponding to their degrees.

Definition at line 64 of file cuthill_mckee.hpp.

Member Function Documentation

◆ compute() [1/2]

Permutation FEAT::Adjacency::CuthillMcKee::compute ( const Graph graph,
bool  reverse = false,
CuthillMcKee::RootType  R_type = RootType::standard,
CuthillMcKee::SortType  s_type = SortType::standard 
)
static

Cuthill-McKee permutation computation function.

This function creates a Cuthill-McKee permutation of the given graph.

Parameters
[in]graphThe transient graph that the permutation is calculated for.
[in]reverseThis bool determines, if the reverse Cuthill-McKee permutation should be calculated. If true, then the reversed permutation is used.
[in]RootType::typeThis parameter determines the way, the root nodes are chosen.
[in]SortType::typeThis parameter determines, which sorting is used in each level of the Cuthill-McKee algorithm.
Returns
The Cuthill-McKee permutation.

Definition at line 15 of file cuthill_mckee.cpp.

References compute().

◆ compute() [2/2]

Permutation FEAT::Adjacency::CuthillMcKee::compute ( std::vector< Index > &  layers,
const Graph graph,
bool  reverse = false,
CuthillMcKee::RootType  r_type = RootType::standard,
CuthillMcKee::SortType  t_type = SortType::standard 
)
static

Cuthill-McKee permutation computation function.

This function creates a Cuthill-McKee permutation of the given graph.

Parameters
[in]graphThe transient graph that the permutation is calculated for.
[in]reverseThis bool determines, if the reverse Cuthill-McKee permutation should be calculated. If true, then the reversed permutation is used.
[in]RootType::typeThis parameter determines the way, the root nodes are chosen.
[in]SortType::typeThis parameter determines, which sorting is used in each level of the Cuthill-McKee algorithm.
Returns
The Cuthill-McKee permutation.

Definition at line 25 of file cuthill_mckee.cpp.

References asc, FEAT::Adjacency::Permutation::calc_swap_from_perm(), FEAT::Adjacency::Graph::degree(), desc, FEAT::Adjacency::Graph::get_domain_ptr(), FEAT::Adjacency::Graph::get_image_idx(), FEAT::Adjacency::Permutation::get_perm_pos(), maximum_degree, minimum_degree, standard, XABORTM, and XASSERTM.

Referenced by compute(), and FEAT::Geometry::MeshPermutation< Shape_ >::create_cmk().


The documentation for this class was generated from the following files: