6#include <RI/global/Tensor.h>
7#include <RI/ri/Cell_Nearest.h>
14#ifndef __OPEXXTEMPLATE
15#define __OPEXXTEMPLATE
18class OperatorEXX :
public T
23enum Add_Hexx_Type { R, k };
24template <
typename TK,
typename TR>
25class OperatorEXX<OperatorLCAO<TK, TR>> :
public OperatorLCAO<TK, TR>
27 using TAC = std::pair<int, std::array<int, 3>>;
29 OperatorEXX<OperatorLCAO<TK, TR>>(HS_Matrix_K<TK>* hsk_in,
33 std::vector<std::map<int, std::map<TAC, RI::Tensor<double>>>>* Hexxd_in =
nullptr,
34 std::vector<std::map<int, std::map<TAC, RI::Tensor<std::complex<double>>>>>* Hexxc_in =
nullptr,
35 Add_Hexx_Type add_hexx_type_in = Add_Hexx_Type::R,
36 const int istep_in = 0,
37 int* two_level_step_in =
nullptr,
38 const bool restart_in =
false);
40 virtual void contributeHk(
int ik)
override;
41 virtual void contributeHR()
override;
44 Add_Hexx_Type add_hexx_type = Add_Hexx_Type::R;
46 bool HR_fixed_done =
false;
48 std::vector<std::map<int, std::map<TAC, RI::Tensor<double>>>>* Hexxd =
nullptr;
49 std::vector<std::map<int, std::map<TAC, RI::Tensor<std::complex<double>>>>>* Hexxc =
nullptr;
55 int* two_level_step =
nullptr;
61 void add_loaded_Hexx(
const int ik);
68 RI::Cell_Nearest<int, int, 3, double, 3> cell_nearest;
69 bool use_cell_nearest =
true;
72 std::vector<std::vector<double>> Hexxd_k_load;
73 std::vector<std::vector<std::complex<double>>> Hexxc_k_load;
76using TAC = std::pair<int, std::array<int, 3>>;
78RI::Cell_Nearest<int, int, 3, double, 3> init_cell_nearest(
const UnitCell& ucell,
const std::array<int, 3>& Rs_period);
81template <
typename Tdata,
typename TR>
82void reallocate_hcontainer(
const std::vector<std::map<
int, std::map<
TAC, RI::Tensor<Tdata>>>>& Hexxs,
84 const RI::Cell_Nearest<int, int, 3, double, 3>*
const cell_nearest =
nullptr);
88void reallocate_hcontainer(
const int nat, HContainer<TR>* hR,
89 const std::array<int, 3>& Rs_period,
90 const RI::Cell_Nearest<int, int, 3, double, 3>*
const cell_nearest =
nullptr);
Definition hcontainer.h:144
#define T
Definition exp.cpp:237
Restart restart
Definition for_testing_input_conv.h:255
int istep
Definition ions_move_basic.cpp:12
std::pair< int, TC > TAC
Definition ri_cv_io_test.cpp:10