@@ -18,22 +18,17 @@ namespace RI
1818
1919template <typename TA, typename Tcell, std::size_t Ndim, typename Tdata>
2020void Exx<TA,Tcell,Ndim,Tdata>::set_parallel(
21- const MPI_Comm &mpi_comm_in ,
22- const std::map<TA,Tatom_pos> &atoms_pos_in ,
23- const std::array<Tatom_pos,Ndim> &latvec_in ,
24- const std::array<Tcell,Ndim> &period_in )
21+ const MPI_Comm &mpi_comm ,
22+ const std::map<TA,Tatom_pos> &atoms_pos ,
23+ const std::array<Tatom_pos,Ndim> &latvec ,
24+ const std::array<Tcell,Ndim> &period )
2525{
26- this ->mpi_comm = mpi_comm_in;
27- this ->atoms_pos = atoms_pos_in;
28- this ->latvec = latvec_in;
29- this ->period = period_in;
30-
3126 this ->lri .set_parallel (
32- this -> mpi_comm , this -> atoms_pos , this -> latvec , this -> period ,
27+ mpi_comm, atoms_pos, latvec, period,
3328 {Label::ab_ab::a0b0_a1b1, Label::ab_ab::a0b0_a1b2, Label::ab_ab::a0b0_a2b1, Label::ab_ab::a0b0_a2b2});
3429 this ->flag_finish .stru = true ;
3530 // if()
36- this ->post_2D .set_parallel (this -> mpi_comm , this -> atoms_pos , this -> period );
31+ this ->post_2D .set_parallel (mpi_comm, atoms_pos, period);
3732}
3833
3934template <typename TA, typename Tcell, std::size_t Ndim, typename Tdata>
@@ -43,7 +38,7 @@ void Exx<TA,Tcell,Ndim,Tdata>::set_symmetry(
4338{
4439 if (flag_symmetry)
4540 this ->lri .filter_atom = std::make_shared<Filter_Atom_Symmetry<TA,TC,Tdata>>(
46- this ->period , irreducible_sector);
41+ this ->lri . period , irreducible_sector);
4742 else
4843 this ->lri .filter_atom = std::make_shared<Filter_Atom<TA,TAC>>();
4944}
@@ -271,12 +266,21 @@ void Exx<TA,Tcell,Ndim,Tdata>::cal_Hs(
271266
272267 if (!this ->flag_finish .Ds_delta )
273268 this ->Hs .clear ();
274- this ->lri .cal_loop3 (
275- {Label::ab_ab::a0b0_a1b1,
276- Label::ab_ab::a0b0_a1b2,
277- Label::ab_ab::a0b0_a2b1,
278- Label::ab_ab::a0b0_a2b2},
279- this ->Hs );
269+ if (this ->method == " loop3" )
270+ this ->lri .cal_loop3 (
271+ { Label::ab_ab::a0b0_a1b1,
272+ Label::ab_ab::a0b0_a1b2,
273+ Label::ab_ab::a0b0_a2b1,
274+ Label::ab_ab::a0b0_a2b2 },
275+ this ->Hs );
276+ else if (this ->method == " cvc" )
277+ {
278+ if (this ->cvc_ .empty ())
279+ this ->cvc_ = this ->lri .cal_cvc ();
280+ this ->Hs = this ->lri .constract_cvc_ds (this ->cvc_ );
281+ }
282+ else
283+ assert (false && " Unknown method in Exx::cal_Hs" );
280284
281285 // if()
282286 this ->energy = this ->post_2D .cal_energy (
0 commit comments