numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
|
Namespace of internal implementations of algebraic multigrid method [24]. More...
Classes | |
class | node_connection_list |
Class of lists of connected nodes per node. More... | |
Enumerations | |
enum | node_layer : std::uint8_t { unclassified , coarse , fine } |
Enumeration of types of grids which nodes belong to in AMG method. More... | |
Functions | |
template<typename StorageIndex > | |
auto | build_first_coarse_grid_candidate (const node_connection_list< StorageIndex > &connections, const node_connection_list< StorageIndex > &transposed_connections) -> util::vector< node_layer > |
Build the first candidate of a coarse grid. | |
template<typename StorageIndex > | |
auto | compute_node_scores (const node_connection_list< StorageIndex > &transposed_connections) -> util::vector< StorageIndex > |
Compute the first scores of nodes. | |
template<base::concepts::sparse_matrix Matrix> | |
auto | compute_strong_connection_list (const Matrix &matrix, typename Matrix::Scalar strong_coeff_rate_threshold) -> node_connection_list< typename Matrix::StorageIndex > |
Compute a list of strong connections in a matrix [24]. | |
template<base::concepts::sparse_matrix Matrix> | |
auto | create_coarse_grid (const Matrix &matrix, typename Matrix::Scalar strong_coeff_rate_threshold) -> util::vector< node_layer > |
Create a coarse grid from a sparse matrix using an algorithm in [24]. | |
template<base::concepts::sparse_matrix Matrix> | |
void | create_prolongation_matrix (Matrix &prolongation_matrix, const node_connection_list< typename Matrix::StorageIndex > &transposed_connections, const util::vector< node_layer > &node_classification) |
Create a prolongation matrix. | |
template<typename StorageIndex > | |
auto | find_max_score_index (const util::vector< StorageIndex > &scores, const util::vector< node_layer > &classification) -> std::optional< index_type > |
Find the index of the maximum score among unclassified nodes. | |
template<typename StorageIndex > | |
auto | find_node_unsatisfying_interpolation_condition (const node_connection_list< StorageIndex > &connections, const std::unordered_set< StorageIndex > &neighbors_in_coarse_grid, const std::unordered_set< StorageIndex > &neighbors_in_fine_grid) -> std::optional< StorageIndex > |
Find a neighboring node unsatisfying the condition of interpolation in [24] for a node. | |
template<typename StorageIndex > | |
void | tune_coarse_grid_selection (const node_connection_list< StorageIndex > &connections, const node_connection_list< StorageIndex > &transposed_connections, util::vector< node_layer > &node_classification) |
Tune a coarse grid to satisfy the condition for interpolation specified in [24]. | |
template<typename StorageIndex > | |
void | tune_coarse_grid_selection_for_one_node (const node_connection_list< StorageIndex > &connections, util::vector< node_layer > &node_classification, index_type tested_node_index) |
Tune a node in a coarse grid to satisfy the condition for interpolation specified in [24]. | |
Namespace of internal implementations of algebraic multigrid method [24].
enum num_collect::linear::impl::amg::node_layer : std::uint8_t |
Enumeration of types of grids which nodes belong to in AMG method.
Enumerator | |
---|---|
unclassified | Unclassified. |
coarse | Carse grid. |
fine | Only in finer grid. |
Definition at line 29 of file node_layer.h.
|
inlinenodiscard |
Build the first candidate of a coarse grid.
StorageIndex | Type of indices in storage. |
[in] | connections | List of connections. |
[in] | transposed_connections | Transposed list of connections. |
Definition at line 86 of file build_first_coarse_grid_candidate.h.
|
inlinenodiscard |
Compute the first scores of nodes.
StorageIndex | Type of indices in storage. |
[in] | transposed_connections | Transposed list of connections. |
Definition at line 40 of file build_first_coarse_grid_candidate.h.
|
inline |
Compute a list of strong connections in a matrix [24].
Matrix | Type of the matrix. |
[in] | matrix | Matrix. |
[in] | strong_coeff_rate_threshold | Threshold of the rate of coefficients to determine strong connections. |
Definition at line 40 of file compute_strong_connection_list.h.
|
inlinenodiscard |
Create a coarse grid from a sparse matrix using an algorithm in [24].
Matrix | Type of the matrix. |
[in] | matrix | Matrix. |
[in] | strong_coeff_rate_threshold | Threshold of the rate of coefficients to determine strong connections. |
Definition at line 42 of file create_coarse_grid.h.
void num_collect::linear::impl::amg::create_prolongation_matrix | ( | Matrix & | prolongation_matrix, |
const node_connection_list< typename Matrix::StorageIndex > & | transposed_connections, | ||
const util::vector< node_layer > & | node_classification ) |
Create a prolongation matrix.
Matrix | Type of the prolongation matrix. |
[out] | prolongation_matrix | Prolongation matrix. |
[in] | transposed_connections | Transposed list of connections. |
[in] | node_classification | Classification of nodes. |
Definition at line 43 of file create_prolongation_matrix.h.
|
nodiscard |
Find the index of the maximum score among unclassified nodes.
StorageIndex | Type of indices in storage. |
[in] | scores | Current score. |
[in] | classification | Classification of nodes. |
Definition at line 60 of file build_first_coarse_grid_candidate.h.
|
inlinenodiscard |
Find a neighboring node unsatisfying the condition of interpolation in [24] for a node.
StorageIndex | Type of indices in storage. |
[in] | connections | List of connections. |
[in] | neighbors_in_coarse_grid | Neighboring nodes in coarse grid. |
[in] | neighbors_in_fine_grid | Neighboring nodes only in finer grid. |
Definition at line 45 of file tune_coarse_grid_selection.h.
void num_collect::linear::impl::amg::tune_coarse_grid_selection | ( | const node_connection_list< StorageIndex > & | connections, |
const node_connection_list< StorageIndex > & | transposed_connections, | ||
util::vector< node_layer > & | node_classification ) |
Tune a coarse grid to satisfy the condition for interpolation specified in [24].
StorageIndex | Type of indices in storage. |
[in] | connections | List of connections. |
[in] | transposed_connections | Transposed list of connections. |
[in,out] | node_classification | Classification of nodes. |
Definition at line 121 of file tune_coarse_grid_selection.h.
void num_collect::linear::impl::amg::tune_coarse_grid_selection_for_one_node | ( | const node_connection_list< StorageIndex > & | connections, |
util::vector< node_layer > & | node_classification, | ||
index_type | tested_node_index ) |
Tune a node in a coarse grid to satisfy the condition for interpolation specified in [24].
StorageIndex | Type of indices in storage. |
[in] | connections | List of connections. |
[in,out] | node_classification | Classification of nodes. |
[in] | tested_node_index | Index of the tested node. |
Definition at line 71 of file tune_coarse_grid_selection.h.