ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
#include "source_hsolver/diago_david.h"
#include "source_hsolver/diago_iter_assist.h"
#include "source_pw/module_pwdft/hamilt_pw.h"
#include "diago_mock.h"
#include "source_psi/psi.h"
#include "gtest/gtest.h"
#include "source_base/inverse_matrix.h"
#include "source_base/module_external/lapack_connector.h"
#include "source_basis/module_pw/test/test_tool.h"
#include "mpi.h"
Classes | |
class | DiagoDavPrepare |
class | DiagoDavTest |
Macros | |
#define | CONVTHRESHOLD 1e-0 |
#define | DETAILINFO false |
Functions | |
void | lapackEigen (int &npw, std::vector< double > &hm, double *e, bool outtime=false) |
TEST_P (DiagoDavTest, RandomHamilt) | |
INSTANTIATE_TEST_SUITE_P (VerifyDiag, DiagoDavTest, ::testing::Values(DiagoDavPrepare(10, 100, 0, 4, 1e-5, 500), DiagoDavPrepare(20, 500, 7, 4, 1e-5, 500))) | |
TEST (DiagoDavRealSystemTest, dataH) | |
int | main (int argc, char **argv) |
#define CONVTHRESHOLD 1e-0 |
#define DETAILINFO false |
INSTANTIATE_TEST_SUITE_P | ( | VerifyDiag | , |
DiagoDavTest | , | ||
::testing::Values(DiagoDavPrepare(10, 100, 0, 4, 1e-5, 500), DiagoDavPrepare(20, 500, 7, 4, 1e-5, 500)) | |||
) |
void lapackEigen | ( | int & | npw, |
std::vector< double > & | hm, | ||
double * | e, | ||
bool | outtime = false |
||
) |
Class Diago_David is used to solve the eigenvalues This unittest test the function Diago_David::diag() for FPTYPE=double and Device=cpu with different examples.
the hamilt matrix (npw=100,500,1000) produced by random with sparsity of 50%
The test is passed when the eignvalues are closed to these calculated by LAPACK.
int main | ( | int | argc, |
char ** | argv | ||
) |
TEST | ( | DiagoDavRealSystemTest | , |
dataH | |||
) |
TEST_P | ( | DiagoDavTest | , |
RandomHamilt | |||
) |