11#pragma once
2- #include " source_lcao/module_ri/abfs-vector3_order.h"
32#include " source_cell/unitcell.h"
3+ #include " source_lcao/module_ri/RI_Util.h"
4+ #include " source_lcao/module_ri/abfs-vector3_order.h"
5+
46#include < RI/global/Tensor.h>
57#include < map>
68
79namespace ModuleIO
810{
9- using TC = std::array<int , 3 >;
10- using TAC = std::pair<int , TC >;
11+ using TC = std::array<int , 3 >;
12+ using TAC = std::pair<int , TC >;
1113
12- // / read Hexxs in CSR format
13- template <typename Tdata>
14- void read_Hexxs_csr (const std::string& file_name, const UnitCell& ucell,
15- const int nspin, const int nbasis,
16- std::vector<std::map<int , std::map<TAC , RI ::Tensor<Tdata>>>>& Hexxs);
14+ // / read Hexxs in CSR format
15+ template <typename Tdata>
16+ void read_Hexxs_csr (const std::string& file_name,
17+ const UnitCell& ucell,
18+ const int nspin,
19+ const int nbasis,
20+ std::vector<std::map<int , std::map<TAC , RI ::Tensor<Tdata>>>>& Hexxs);
1721
18- // / read Hexxs in cereal format
19- template <typename Tdata>
20- void read_Hexxs_cereal (const std::string& file_name,
21- std::vector<std::map<int , std::map<TAC , RI ::Tensor<Tdata>>>>& Hexxs);
22+ // / read Hexxs in cereal format
23+ template <typename Tdata>
24+ void read_Hexxs_cereal (const std::string& file_name,
25+ std::vector<std::map<int , std::map<TAC , RI ::Tensor<Tdata>>>>& Hexxs);
2226
23- // / write Hexxs in CSR format
24- template <typename Tdata>
25- void write_Hexxs_csr (const std::string& file_name, const UnitCell& ucell,
26- const std::map<int , std::map<TAC , RI ::Tensor<Tdata>>>& Hexxs);
27+ // / write Hexxs in CSR format
28+ template <typename Tdata>
29+ void write_Hexxs_csr (const std::string& file_name,
30+ const UnitCell& ucell,
31+ const std::map<int , std::map<TAC , RI ::Tensor<Tdata>>>& Hexxs);
2732
28- // / calculate CSR sparse matrix from the global matrix stored with RI::Tensor
29- // / the return type is same as SR_sparse, HR_sparse, etc.
30- template <typename Tdata>
31- std::map<Abfs::Vector3_Order<int >, std::map<size_t , std::map<size_t , Tdata>>>
32- calculate_RI_Tensor_sparse ( const double & sparse_threshold,
33- const std::vector<std::map<int , std::map<TAC , RI ::Tensor<Tdata>>>>& Hexxs,
34- const UnitCell& ucell);
35- }
33+ // / calculate CSR sparse matrix from the global matrix stored with RI::Tensor
34+ // / the return type is same as SR_sparse, HR_sparse, etc.
35+ template <typename Tdata>
36+ std::map<Abfs::Vector3_Order<int >, std::map<size_t , std::map<size_t , Tdata>>> calculate_RI_Tensor_sparse (
37+ const double & sparse_threshold,
38+ const std::vector<std::map<int , std::map<TAC , RI ::Tensor<Tdata>>>>& Hexxs,
39+ const UnitCell& ucell);
40+ } // namespace ModuleIO
3641
3742#include " restart_exx_csr.hpp"
0 commit comments