ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Classes | Macros | Functions
diago_david_real_test.cpp File Reference
#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"
Include dependency graph for diago_david_real_test.cpp:

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)
 

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< 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 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.

Here is the call graph for this function:

◆ 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: