Skip to content

Commit d4f7320

Browse files
minyezPeizeLin
authored andcommitted
remove redundant member variables
1 parent 824108c commit d4f7320

File tree

5 files changed

+14
-33
lines changed

5 files changed

+14
-33
lines changed

include/RI/physics/Exx.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,6 @@ class Exx
122122
};
123123
Flag_Save_Result flag_save_result;
124124

125-
MPI_Comm mpi_comm;
126-
std::map<TA,Tatom_pos> atoms_pos;
127-
std::array<Tatom_pos,Ndim> latvec;
128-
std::array<Tcell,Ndim> period;
129125
};
130126

131127
}

include/RI/physics/Exx.hpp

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,17 @@ namespace RI
1818

1919
template<typename TA, typename Tcell, std::size_t Ndim, typename Tdata>
2020
void 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

3934
template<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
}

include/RI/physics/GW.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,6 @@ class GW
7676
bool Gs=false;
7777
};
7878
Flag_Finish flag_finish;
79-
80-
MPI_Comm mpi_comm;
81-
std::map<TA,Tatom_pos> atoms_pos;
82-
std::array<Tatom_pos,Ndim> latvec;
83-
std::array<Tcell,Ndim> period;
8479
};
8580

8681
}

include/RI/physics/GW.hpp

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,13 @@ namespace RI
1313

1414
template<typename TA, typename Tcell, std::size_t Ndim, typename Tdata>
1515
void GW<TA,Tcell,Ndim,Tdata>::set_parallel(
16-
const MPI_Comm &mpi_comm_in,
17-
const std::map<TA,Tatom_pos> &atoms_pos_in,
18-
const std::array<Tatom_pos,Ndim> &latvec_in,
19-
const std::array<Tcell,Ndim> &period_in)
16+
const MPI_Comm &mpi_comm,
17+
const std::map<TA,Tatom_pos> &atoms_pos,
18+
const std::array<Tatom_pos,Ndim> &latvec,
19+
const std::array<Tcell,Ndim> &period)
2020
{
21-
this->mpi_comm = mpi_comm_in;
22-
this->atoms_pos = atoms_pos_in;
23-
this->latvec = latvec_in;
24-
this->period = period_in;
25-
2621
this->lri.set_parallel(
27-
this->mpi_comm, this->atoms_pos, this->latvec, this->period,
22+
mpi_comm, atoms_pos, latvec, period,
2823
{Label::ab_ab::a0b0_a1b1, Label::ab_ab::a0b0_a1b2, Label::ab_ab::a0b0_a2b1, Label::ab_ab::a0b0_a2b2});
2924
this->flag_finish.stru = true;
3025
//if()
@@ -38,7 +33,7 @@ void GW<TA,Tcell,Ndim,Tdata>::set_symmetry(
3833
{
3934
if(flag_symmetry)
4035
this->lri.filter_atom = std::make_shared<Filter_Atom_Symmetry<TA,TC,Tdata>>(
41-
this->period, irreducible_sector);
36+
this->lri.period, irreducible_sector);
4237
else
4338
this->lri.filter_atom = std::make_shared<Filter_Atom<TA,TAC>>();
4439
}

include/RI/physics/RPA.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ void RPA<TA,Tcell,Ndim,Tdata>::set_symmetry(
3434
{
3535
if(flag_symmetry)
3636
this->lri.filter_atom = std::make_shared<Filter_Atom_Symmetry<TA,TC,Tdata>>(
37-
this->period, irreducible_sector);
37+
this->lri.period, irreducible_sector);
3838
else
3939
this->lri.filter_atom = std::make_shared<Filter_Atom<TA,TAC>>();
4040
}

0 commit comments

Comments
 (0)