2#ifndef ABACUS_SOURCE_LCAO_MODULE_LR_RI_BENCHMARK_RI_BENCHMARK_H
3#define ABACUS_SOURCE_LCAO_MODULE_LR_RI_BENCHMARK_RI_BENCHMARK_H
9#include <RI/global/Tensor.h>
13 using TC = std::array<int, 3>;
14 using TAC = std::pair<int, TC>;
17 using TLRI = std::map<int, std::map<TAC, RI::Tensor<T>>>;
19 using TLRIX = std::map<int, std::map<TAC, std::vector<T>>>;
21 template <
typename TK,
typename TR>
22 void benchmark_driver_A(std::string& file_Cs, std::string& file_Vs, std::string& file_kswfc,
const int nocc,
const int nvirt);
23 template <
typename TK,
typename TR>
24 void benchmark_driver_AX(std::string& file_Cs, std::string& file_Vs, std::string& file_kswfc,
const int nocc,
const int nvirt);
30 template <
typename TK,
typename TR>
33 const psi::Psi<TK>& wfc_ks,
36 const int& occ_first=
false);
39 template <
typename TK,
typename TR>
45 template <
typename TK>
48 template <
typename TK,
typename TR>
53 template <
typename TK,
typename TR>
55 const TLRIX<TK>& Cs_bX,
58 const double& scale = 2.0);
60 template <
typename TK>
62 const TLRIX<TK>& Cs_bX,
64 const double& scale = 2.0);
67 template<
typename FPTYPE>
68 std::vector<FPTYPE>
read_aims_ebands(
const std::string&
file,
const int nocc,
const int nvirt,
int& ncore);
70 template <
typename TK>
71 void read_aims_eigenvectors(psi::Psi<TK>& wfc_ks,
const std::string&
file,
const int ncore,
const int nbands,
const int nbasis);
73 template <
typename TR>
75 template <
typename TR>
76 std::vector<TLRI<TR>>
split_Ds(
const std::vector<std::vector<TR>>& Ds,
const std::vector<int>& aims_nbasis,
const UnitCell& ucell);
int TA
================ RI ==================
Definition bse_util.h:36
std::map< int, std::map< TAC, std::vector< T > > > TLRIX
Definition lr_util_print.h:196
Definition operator_ri_hartree.h:8
void cal_AX(const TLRI< TK > &Cs_a, const TLRIX< TK > &Cs_bX, const TLRI< TR > &Vs, TK *AX, const double &scale)
Definition ri_benchmark.hpp:220
TLRI< TK > cal_Cs_mo(const UnitCell &ucell, const TLRI< TR > &Cs_ao, const psi::Psi< TK > &wfc_ks, const int &nocc, const int &nvirt, const int &occ_first)
Definition ri_benchmark.hpp:55
TLRIX< TK > cal_CsX(const TLRI< TK > &Cs_mo, const TK *X)
Definition ri_benchmark.hpp:158
std::vector< TLRI< TR > > split_Ds(const std::vector< std::vector< TR > > &Ds, const std::vector< int > &aims_nbasis, const UnitCell &ucell)
Definition ri_benchmark.hpp:381
std::vector< TK > cal_Amat_full(const TLRI< TK > &Cs_a, const TLRI< TK > &Cs_b, const TLRI< TR > &Vs)
Definition ri_benchmark.hpp:114
TLRI< TK > cal_CV(const TLRI< TK > &Cs_a_mo, const TLRI< TR > &Vs)
Definition ri_benchmark.hpp:180
std::vector< FPTYPE > read_aims_ebands(const std::string &file, const int nocc, const int nvirt, int &ncore)
Definition ri_benchmark.hpp:282
bool compare_Vs(const TLRI< TR > &Vs1, const TLRI< TR > &Vs2, const double thr)
Definition ri_benchmark.hpp:356
void read_aims_eigenvectors(psi::Psi< TK > &wfc_ks, const std::string &file, const int ncore, const int nbands, const int nbasis)
read the eigenvectors from FHI-aims, only for gamma_only and spin degenerate
Definition ri_benchmark.hpp:312
file(GLOB ATen_CORE_SRCS "*.cpp") set(ATen_CPU_SRCS $
Definition CMakeLists.txt:1
std::array< int, 3 > TC
Definition test_write_ri_cv.cpp:9
std::pair< int, TC > TAC
Definition test_write_ri_cv.cpp:10
std::map< int, std::map< TAC, RI::Tensor< T > > > TLRI
Definition test_write_ri_cv.cpp:12