|
ergo
|
Test serial recursive expansion on a random symmetric matrix or matrix from a given binary file. More...
#include "purification_sp2.h"#include "purification_sp2acc.h"#include "matrix_typedefs.h"#include "realtype.h"#include "matrix_utilities.h"#include "integral_matrix_wrappers.h"#include "SizesAndBlocks.h"#include "Matrix.h"#include "Vector.h"#include "MatrixSymmetric.h"#include "MatrixTriangular.h"#include "MatrixGeneral.h"#include "VectorGeneral.h"#include "output.h"#include <iostream>#include <fstream>#include <sstream>#include <string.h>#include "random_matrices.h"#include "get_eigenvectors.h"Classes | |
| struct | data_for_recexp |
Macros | |
| #define | SQRT_EPSILON_REAL template_blas_sqrt(mat::getMachineEpsilon<real>()) |
| #define | TEST_COUNT 8 |
Typedefs | |
| typedef struct data_for_recexp | data_for_recexp_t |
Functions | |
| void | plot_results (const Purification_sp2< MatrixType > &Puri) |
| template<typename Matrix> | |
| void | init_matrix (Matrix &X, const int N) |
| void | prepare_data_for_recexp (int testnum, data_for_recexp_t &DATA) |
| void | set_test_1_data (data_for_recexp_t &DATA) |
| void | set_test_2_data (data_for_recexp_t &DATA) |
| void | set_test_3_data (data_for_recexp_t &DATA) |
| void | set_test_4_data (data_for_recexp_t &DATA) |
| void | set_test_5_data (data_for_recexp_t &DATA) |
| void | set_test_6_data (data_for_recexp_t &DATA) |
| void | set_test_7_data (data_for_recexp_t &DATA) |
| void | set_test_8_data (data_for_recexp_t &DATA) |
| int | main (int argc, char *argv[]) |
Variables | |
| real | TOL_ERR_SUBS_DEFAULT = SQRT_EPSILON_REAL |
| real | TOL_TRACE_ERROR_DEFAULT = SQRT_EPSILON_REAL |
Test serial recursive expansion on a random symmetric matrix or matrix from a given binary file.
Matrix in a binary file should contain only the upper triangle. Note: to get homo-lumo gap all matrix eigenvalues are computed.
| #define SQRT_EPSILON_REAL template_blas_sqrt(mat::getMachineEpsilon<real>()) |
| #define TEST_COUNT 8 |
Referenced by main().
| typedef struct data_for_recexp data_for_recexp_t |
| void init_matrix | ( | Matrix & | X, |
| const int | N ) |
| int main | ( | int | argc, |
| char * | argv[] ) |
References PuriInfo::accumulated_error_subspace, mat::MatrixBase< Treal, Tmatrix >::clear(), PuriInfo::converged, data_for_recexp::err_eig, data_for_recexp::err_sub, PuriInfo::error_subspace, get_all_eigenvalues_of_matrix(), get_random_symm_matrix(), mat::Params::getMatrixParallelLevel(), mat::Params::getNProcs(), data_for_recexp::homo_in, data_for_recexp::homo_lumo_bounds_known, data_for_recexp::homo_out, PurificationGeneral< MatrixType >::info, PurificationGeneral< MatrixType >::initialize(), data_for_recexp::lumo_in, data_for_recexp::lumo_out, data_for_recexp::maxit, data_for_recexp::N, data_for_recexp::N_occ, data_for_recexp::normPuri, data_for_recexp::normPuriStopCrit, prepare_data_for_recexp(), PuriInfo::print_collected_info_printf(), PurificationGeneral< MatrixType >::PurificationStart(), mat::Params::setMatrixParallelLevel(), mat::Params::setNProcs(), template_blas_fabs(), TEST_COUNT, TOL_TRACE_ERROR_DEFAULT, PuriInfo::total_it, mat::MatrixBase< Treal, Tmatrix >::trace(), data_for_recexp::which_stop_crit, and PurificationGeneral< MatrixType >::X.
| void plot_results | ( | const Purification_sp2< MatrixType > & | Puri | ) |
References PurificationGeneral< MatrixType >::gen_matlab_file_eigs(), PurificationGeneral< MatrixType >::gen_matlab_file_nnz(), PurificationGeneral< MatrixType >::gen_matlab_file_norm_diff(), PurificationGeneral< MatrixType >::gen_matlab_file_threshold(), and PurificationGeneral< MatrixType >::gen_matlab_file_time().
| void prepare_data_for_recexp | ( | int | testnum, |
| data_for_recexp_t & | DATA ) |
References data_for_recexp::err_eig, data_for_recexp::err_sub, mat::euclNorm, mat::frobNorm, mat::mixedNorm, data_for_recexp::N, data_for_recexp::N_occ, data_for_recexp::normPuri, data_for_recexp::normPuriStopCrit, set_test_1_data(), set_test_2_data(), set_test_3_data(), set_test_4_data(), set_test_5_data(), set_test_6_data(), set_test_7_data(), set_test_8_data(), and data_for_recexp::which_stop_crit.
Referenced by main().
| void set_test_1_data | ( | data_for_recexp_t & | DATA | ) |
References data_for_recexp::compute_eigenvectors, data_for_recexp::err_eig, data_for_recexp::err_sub, mat::euclNorm, data_for_recexp::homo_in, data_for_recexp::homo_lumo_bounds_known, data_for_recexp::homo_out, data_for_recexp::lumo_in, data_for_recexp::lumo_out, MAX_DOUBLE, data_for_recexp::maxit, data_for_recexp::N, data_for_recexp::N_occ, data_for_recexp::normPuri, data_for_recexp::normPuriStopCrit, TOL_ERR_SUBS_DEFAULT, and data_for_recexp::which_stop_crit.
Referenced by prepare_data_for_recexp().
| void set_test_2_data | ( | data_for_recexp_t & | DATA | ) |
References data_for_recexp::compute_eigenvectors, data_for_recexp::err_eig, data_for_recexp::err_sub, mat::euclNorm, data_for_recexp::homo_in, data_for_recexp::homo_lumo_bounds_known, data_for_recexp::homo_out, data_for_recexp::lumo_in, data_for_recexp::lumo_out, MAX_DOUBLE, data_for_recexp::maxit, data_for_recexp::N, data_for_recexp::N_occ, data_for_recexp::normPuri, data_for_recexp::normPuriStopCrit, TOL_ERR_SUBS_DEFAULT, and data_for_recexp::which_stop_crit.
Referenced by prepare_data_for_recexp().
| void set_test_3_data | ( | data_for_recexp_t & | DATA | ) |
References data_for_recexp::compute_eigenvectors, data_for_recexp::err_eig, data_for_recexp::err_sub, mat::euclNorm, data_for_recexp::homo_in, data_for_recexp::homo_lumo_bounds_known, data_for_recexp::homo_out, data_for_recexp::lumo_in, data_for_recexp::lumo_out, MAX_DOUBLE, data_for_recexp::maxit, data_for_recexp::N, data_for_recexp::N_occ, data_for_recexp::normPuri, data_for_recexp::normPuriStopCrit, TOL_ERR_SUBS_DEFAULT, and data_for_recexp::which_stop_crit.
Referenced by prepare_data_for_recexp().
| void set_test_4_data | ( | data_for_recexp_t & | DATA | ) |
References data_for_recexp::compute_eigenvectors, data_for_recexp::err_eig, data_for_recexp::err_sub, mat::frobNorm, data_for_recexp::homo_in, data_for_recexp::homo_lumo_bounds_known, data_for_recexp::homo_out, data_for_recexp::lumo_in, data_for_recexp::lumo_out, MAX_DOUBLE, data_for_recexp::maxit, data_for_recexp::N, data_for_recexp::N_occ, data_for_recexp::normPuri, data_for_recexp::normPuriStopCrit, TOL_ERR_SUBS_DEFAULT, and data_for_recexp::which_stop_crit.
Referenced by prepare_data_for_recexp().
| void set_test_5_data | ( | data_for_recexp_t & | DATA | ) |
References data_for_recexp::compute_eigenvectors, data_for_recexp::err_eig, data_for_recexp::err_sub, mat::frobNorm, data_for_recexp::homo_in, data_for_recexp::homo_lumo_bounds_known, data_for_recexp::homo_out, data_for_recexp::lumo_in, data_for_recexp::lumo_out, MAX_DOUBLE, data_for_recexp::maxit, data_for_recexp::N, data_for_recexp::N_occ, data_for_recexp::normPuri, data_for_recexp::normPuriStopCrit, TOL_ERR_SUBS_DEFAULT, and data_for_recexp::which_stop_crit.
Referenced by prepare_data_for_recexp().
| void set_test_6_data | ( | data_for_recexp_t & | DATA | ) |
References data_for_recexp::compute_eigenvectors, data_for_recexp::err_eig, data_for_recexp::err_sub, data_for_recexp::homo_in, data_for_recexp::homo_lumo_bounds_known, data_for_recexp::homo_out, data_for_recexp::lumo_in, data_for_recexp::lumo_out, MAX_DOUBLE, data_for_recexp::maxit, mat::mixedNorm, data_for_recexp::N, data_for_recexp::N_occ, data_for_recexp::normPuri, data_for_recexp::normPuriStopCrit, TOL_ERR_SUBS_DEFAULT, and data_for_recexp::which_stop_crit.
Referenced by prepare_data_for_recexp().
| void set_test_7_data | ( | data_for_recexp_t & | DATA | ) |
References data_for_recexp::compute_eigenvectors, data_for_recexp::err_eig, data_for_recexp::err_sub, data_for_recexp::homo_in, data_for_recexp::homo_lumo_bounds_known, data_for_recexp::homo_out, data_for_recexp::lumo_in, data_for_recexp::lumo_out, MAX_DOUBLE, data_for_recexp::maxit, mat::mixedNorm, data_for_recexp::N, data_for_recexp::N_occ, data_for_recexp::normPuri, data_for_recexp::normPuriStopCrit, TOL_ERR_SUBS_DEFAULT, and data_for_recexp::which_stop_crit.
Referenced by prepare_data_for_recexp().
| void set_test_8_data | ( | data_for_recexp_t & | DATA | ) |
References data_for_recexp::compute_eigenvectors, data_for_recexp::err_eig, data_for_recexp::err_sub, data_for_recexp::homo_in, data_for_recexp::homo_lumo_bounds_known, data_for_recexp::homo_out, data_for_recexp::lumo_in, data_for_recexp::lumo_out, MAX_DOUBLE, data_for_recexp::maxit, mat::mixedNorm, data_for_recexp::N, data_for_recexp::N_occ, data_for_recexp::normPuri, data_for_recexp::normPuriStopCrit, TOL_ERR_SUBS_DEFAULT, and data_for_recexp::which_stop_crit.
Referenced by prepare_data_for_recexp().
| real TOL_ERR_SUBS_DEFAULT = SQRT_EPSILON_REAL |
| real TOL_TRACE_ERROR_DEFAULT = SQRT_EPSILON_REAL |