ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
test_diago_david_float.cpp File Reference
Include dependency graph for test_diago_david_float.cpp:

Classes

class  DiagoDavPrepare
class  DiagoDavTest

Macros

#define CONVTHRESHOLD   1e-0
#define DETAILINFO   false

Functions

void lapackEigen (int &npw, std::vector< std::complex< float > > &hm, float *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)

Macro Definition Documentation

◆ CONVTHRESHOLD

#define CONVTHRESHOLD   1e-0

◆ DETAILINFO

#define DETAILINFO   false

Function Documentation

◆ INSTANTIATE_TEST_SUITE_P()

INSTANTIATE_TEST_SUITE_P ( VerifyDiag ,
DiagoDavTest ,
::testing::Values(DiagoDavPrepare(10, 100, 0, 4, 1e-5, 500), DiagoDavPrepare(20, 500, 7, 4, 1e-5, 500))  )

◆ lapackEigen()

void lapackEigen ( int & npw,
std::vector< std::complex< float > > & hm,
float * e,
bool outtime = false )

Class Diago_David is used to solve the eigenvalues This unittest test the function Diago_David::diag() for FPTYPE=float and Device=cpu with different examples.

  • the hamilt matrix (npw=100,500,1000) produced by random with sparsity of 90%

the hamilt matrix (npw=100,500,1000) produced by random with sparsity of 50%

  • the hamilt matrix (npw=100,500,1000) produced by random with sparsity of 0%
  • the hamilt matrix read from "data-H"

The test is passed when the eignvalues are closed to these calculated by LAPACK.

◆ main()

int main ( int argc,
char ** argv )
Here is the call graph for this function:

◆ TEST()

TEST ( DiagoDavRealSystemTest ,
dataH  )
Here is the call graph for this function:

◆ TEST_P()

TEST_P ( DiagoDavTest ,
RandomHamilt  )
Here is the call graph for this function: