|
4 | 4 |
|
5 | 5 | #include "Exx_LRI_interface.h" |
6 | 6 | #include "source_lcao/module_ri/exx_abfs-jle.h" |
7 | | -#include "source_lcao/hamilt_lcao.h" |
8 | 7 | #include "source_lcao/module_operator_lcao/op_exx_lcao.h" |
9 | 8 | #include "source_base/parallel_common.h" |
10 | 9 | #include "source_base/formatter.h" |
|
17 | 16 | #include <stdexcept> |
18 | 17 | #include <string> |
19 | 18 |
|
20 | | -/* |
21 | | -template<typename T, typename Tdata> |
22 | | -void Exx_LRI_Interface<T, Tdata>::write_Hexxs_cereal(const std::string& file_name) const |
23 | | -{ |
24 | | - ModuleBase::TITLE("Exx_LRI_Interface", "write_Hexxs_cereal"); |
25 | | - ModuleBase::timer::tick("Exx_LRI_Interface", "write_Hexxs_cereal"); |
26 | | - std::ofstream ofs(file_name + "_" + std::to_string(GlobalV::MY_RANK), std::ofstream::binary); |
27 | | - cereal::BinaryOutputArchive oar(ofs); |
28 | | - oar(this->exx_ptr->Hexxs); |
29 | | - ModuleBase::timer::tick("Exx_LRI_Interface", "write_Hexxs_cereal"); |
30 | | -} |
31 | | -
|
32 | | -template<typename T, typename Tdata> |
33 | | -void Exx_LRI_Interface<T, Tdata>::read_Hexxs_cereal(const std::string& file_name) |
34 | | -{ |
35 | | - ModuleBase::TITLE("Exx_LRI_Interface", "read_Hexxs_cereal"); |
36 | | - ModuleBase::timer::tick("Exx_LRI_Interface", "read_Hexxs_cereal"); |
37 | | - const std::string file_name_rank = file_name + "_" + std::to_string(GlobalV::MY_RANK); |
38 | | - std::ifstream ifs(file_name_rank, std::ofstream::binary); |
39 | | - if(!ifs.is_open()) |
40 | | - { ModuleBase::WARNING_QUIT("Exx_LRI_Interface", file_name_rank+" not found."); } |
41 | | - cereal::BinaryInputArchive iar(ifs); |
42 | | - iar(this->exx_ptr->Hexxs); |
43 | | - ModuleBase::timer::tick("Exx_LRI_Interface", "read_Hexxs_cereal"); |
44 | | -} |
45 | | -*/ |
46 | | - |
47 | 19 | template<typename T, typename Tdata> |
48 | 20 | void Exx_LRI_Interface<T, Tdata>::init(const MPI_Comm &mpi_comm, |
49 | 21 | const UnitCell &ucell, |
|
0 commit comments