Utilities related to the hierarchical matrix library (HML), including functions for setting up permutations of basis functions to increase data locality in the hierarchical matrix data structure. More...
#include "matrix_typedefs.h"#include "basisinfo.h"Go to the source code of this file.
Classes | |
| struct | matrix_utilities_CompareClass< RandomAccessIterator > |
Functions | |
| mat::SizesAndBlocks | prepareMatrixSizesAndBlocks (int n_basis_functions, int sparse_block_size, int factor1, int factor2, int factor3) |
| void | getMatrixPermutation (const BasisInfoStruct &basisInfo, int sparse_block_size, int factor1, int factor2, int factor3, std::vector< int > &permutation) |
| void | getMatrixPermutation (const BasisInfoStruct &basisInfo, int sparse_block_size, int factor1, int factor2, int factor3, std::vector< int > &permutation, std::vector< int > &inversePermutation) |
| void | getMatrixPermutationOnlyFactor2 (const std::vector< ergo_real > &xcoords, const std::vector< ergo_real > &ycoords, const std::vector< ergo_real > &zcoords, int sparse_block_size_lowest, int first_factor, std::vector< int > &permutation, std::vector< int > &inversePermutation) |
| void | getMatrixPermutationOnlyFactor2 (const BasisInfoStruct &basisInfo, int sparse_block_size_lowest, int first_factor, std::vector< int > &permutation, std::vector< int > &inversePermutation) |
| void | fill_matrix_with_random_numbers (int n, symmMatrix &M) |
| void | add_random_diag_perturbation (int n, symmMatrix &M, ergo_real eps) |
| bool | check_if_matrix_contains_strange_elements (const symmMatrix &M, std::vector< int > const &inversePermutationHML) |
| This function is supposed to check if a matrix contains any strange numbers such as "inf" or "nan". | |
| void | output_matrix (int n, const ergo_real *matrix, const char *matrixName) |
| template<class Tmatrix > | |
| ergo_real | compute_maxabs_sparse (const Tmatrix &M) |
| template<typename Tmatrix > | |
| void | get_all_nonzeros (Tmatrix const &A, std::vector< int > const &inversePermutation, std::vector< int > &rowind, std::vector< int > &colind, std::vector< ergo_real > &values) |
| template<typename Tmatrix > | |
| void | write_matrix_in_matrix_market_format (Tmatrix const &A, std::vector< int > const &inversePermutation, std::string filename, std::string identifier, std::string method_and_basis) |
Utilities related to the hierarchical matrix library (HML), including functions for setting up permutations of basis functions to increase data locality in the hierarchical matrix data structure.
| void add_random_diag_perturbation | ( | int | n, | |
| symmMatrix & | M, | |||
| ergo_real | eps | |||
| ) |
References rand_minus1_to_1().
| bool check_if_matrix_contains_strange_elements | ( | const symmMatrix & | M, | |
| std::vector< int > const & | inversePermutationHML | |||
| ) |
This function is supposed to check if a matrix contains any strange numbers such as "inf" or "nan".
The function returns true is any strange numbers are found, and false if the matrix seems ok.
Referenced by SCF_restricted::get_2e_part_and_energy().
| ergo_real compute_maxabs_sparse | ( | const Tmatrix & | M | ) | [inline] |
| void fill_matrix_with_random_numbers | ( | int | n, | |
| symmMatrix & | M | |||
| ) |
| void get_all_nonzeros | ( | Tmatrix const & | A, | |
| std::vector< int > const & | inversePermutation, | |||
| std::vector< int > & | rowind, | |||
| std::vector< int > & | colind, | |||
| std::vector< ergo_real > & | values | |||
| ) | [inline] |
Referenced by write_matrix_in_matrix_market_format().
| void getMatrixPermutation | ( | const BasisInfoStruct & | basisInfo, | |
| int | sparse_block_size, | |||
| int | factor1, | |||
| int | factor2, | |||
| int | factor3, | |||
| std::vector< int > & | permutation, | |||
| std::vector< int > & | inversePermutation | |||
| ) |
References BasisInfoStruct::basisFuncList, BasisFuncStruct::centerCoords, do_output(), getPermutation(), LOG_AREA_UNDEFINED, LOG_CAT_INFO, and BasisInfoStruct::noOfBasisFuncs.
Referenced by calculation_shared(), getMatrixPermutation(), load_density_and_project_sparse(), main(), SCF::MatOptions::prepare(), preparePermutations(), and preparePermutationsHML().
| void getMatrixPermutation | ( | const BasisInfoStruct & | basisInfo, | |
| int | sparse_block_size, | |||
| int | factor1, | |||
| int | factor2, | |||
| int | factor3, | |||
| std::vector< int > & | permutation | |||
| ) |
References getMatrixPermutation().
| void getMatrixPermutationOnlyFactor2 | ( | const BasisInfoStruct & | basisInfo, | |
| int | sparse_block_size_lowest, | |||
| int | first_factor, | |||
| std::vector< int > & | permutation, | |||
| std::vector< int > & | inversePermutation | |||
| ) |
| void getMatrixPermutationOnlyFactor2 | ( | const std::vector< ergo_real > & | xcoords, | |
| const std::vector< ergo_real > & | ycoords, | |||
| const std::vector< ergo_real > & | zcoords, | |||
| int | sparse_block_size_lowest, | |||
| int | first_factor, | |||
| std::vector< int > & | permutation, | |||
| std::vector< int > & | inversePermutation | |||
| ) |
References do_output(), getPermutation(), LOG_AREA_UNDEFINED, and LOG_CAT_INFO.
Referenced by create_mtx_files_with_different_orderings(), and getMatrixPermutationOnlyFactor2().
| void output_matrix | ( | int | n, | |
| const ergo_real * | matrix, | |||
| const char * | matrixName | |||
| ) |
Referenced by dft_get_uxc(), and dft_get_xc().
| mat::SizesAndBlocks prepareMatrixSizesAndBlocks | ( | int | n_basis_functions, | |
| int | sparse_block_size, | |||
| int | factor1, | |||
| int | factor2, | |||
| int | factor3 | |||
| ) |
References do_output(), LOG_AREA_UNDEFINED, and LOG_CAT_INFO.
Referenced by calculation_shared(), get_dipole_moment_fullmat(), load_density_and_project_sparse(), main(), SCF::MatOptions::prepare(), preparePermutations(), and preparePermutationsHML().
| void write_matrix_in_matrix_market_format | ( | Tmatrix const & | A, | |
| std::vector< int > const & | inversePermutation, | |||
| std::string | filename, | |||
| std::string | identifier, | |||
| std::string | method_and_basis | |||
| ) | [inline] |
References get_all_nonzeros(), and VERSION.
Referenced by compute_h_core_matrix_sparse(), SCF_unrestricted::create_mtx_files_D(), SCF_restricted::create_mtx_files_D(), SCF_unrestricted::create_mtx_files_F(), SCF_restricted::create_mtx_files_F(), create_mtx_files_with_different_orderings(), and SCF_general::SCF_general().
1.6.1