Skip to content

Commit cd4cd18

Browse files
authored
Refactor: remove redundant Local_Orbital_Charge in class Veff and DeepKS (#4572)
1 parent 4f4a050 commit cd4cd18

File tree

5 files changed

+5
-14
lines changed

5 files changed

+5
-14
lines changed

source/module_esolver/esolver_ks_lcao_elec.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ void ESolver_KS_LCAO<TK, TR>::beforesolver(const int istep) {
170170
GlobalV::GAMMA_ONLY_LOCAL ? &(this->GG) : nullptr,
171171
GlobalV::GAMMA_ONLY_LOCAL ? nullptr : &(this->GK),
172172
&(this->LM),
173-
&(this->LOC),
174173
this->pelec->pot,
175174
this->kv,
176175
two_center_bundle_,

source/module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ template <typename TK, typename TR>
6262
HamiltLCAO<TK, TR>::HamiltLCAO(Gint_Gamma* GG_in,
6363
Gint_k* GK_in,
6464
LCAO_Matrix* LM_in,
65-
Local_Orbital_Charge* loc_in,
6665
elecstate::Potential* pot_in,
6766
const K_Vectors& kv_in,
6867
const TwoCenterBundle& two_center_bundle,
@@ -191,8 +190,7 @@ HamiltLCAO<TK, TR>::HamiltLCAO(Gint_Gamma* GG_in,
191190
#ifdef __DEEPKS
192191
if (GlobalV::deepks_scf)
193192
{
194-
Operator<TK>* deepks = new DeePKS<OperatorLCAO<TK, TR>>(loc_in,
195-
LM_in,
193+
Operator<TK>* deepks = new DeePKS<OperatorLCAO<TK, TR>>(LM_in,
196194
this->kv->kvec_d,
197195
this->hR, // no explicit call yet
198196
&(this->getHk(LM_in)),
@@ -326,8 +324,7 @@ HamiltLCAO<TK, TR>::HamiltLCAO(Gint_Gamma* GG_in,
326324
#ifdef __DEEPKS
327325
if (GlobalV::deepks_scf)
328326
{
329-
Operator<TK>* deepks = new DeePKS<OperatorLCAO<TK, TR>>(loc_in,
330-
LM_in,
327+
Operator<TK>* deepks = new DeePKS<OperatorLCAO<TK, TR>>(LM_in,
331328
this->kv->kvec_d,
332329
hR,
333330
&(this->getHk(LM_in)),

source/module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ class HamiltLCAO : public Hamilt<TK>
2727
HamiltLCAO(Gint_Gamma* GG_in,
2828
Gint_k* GK_in,
2929
LCAO_Matrix* LM_in,
30-
Local_Orbital_Charge* loc_in,
3130
elecstate::Potential* pot_in,
3231
const K_Vectors& kv_in,
3332
const TwoCenterBundle& two_center_bundle,

source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/deepks_lcao.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ namespace hamilt
1515
{
1616

1717
template <typename TK, typename TR>
18-
DeePKS<OperatorLCAO<TK, TR>>::DeePKS(Local_Orbital_Charge* loc_in,
19-
LCAO_Matrix* LM_in,
18+
DeePKS<OperatorLCAO<TK, TR>>::DeePKS(LCAO_Matrix* LM_in,
2019
const std::vector<ModuleBase::Vector3<double>>& kvec_d_in,
2120
HContainer<TR>* hR_in,
2221
std::vector<TK>* hK_in,
@@ -25,7 +24,7 @@ DeePKS<OperatorLCAO<TK, TR>>::DeePKS(Local_Orbital_Charge* loc_in,
2524
const TwoCenterIntegrator* intor_orb_alpha,
2625
const int& nks_in,
2726
elecstate::DensityMatrix<TK, double>* DM_in)
28-
: loc(loc_in), nks(nks_in), ucell(ucell_in), OperatorLCAO<TK, TR>(LM_in, kvec_d_in, hR_in, hK_in), DM(DM_in),
27+
: nks(nks_in), ucell(ucell_in), OperatorLCAO<TK, TR>(LM_in, kvec_d_in, hR_in, hK_in), DM(DM_in),
2928
intor_orb_alpha_(intor_orb_alpha)
3029
{
3130
this->cal_type = calculation_type::lcao_deepks;

source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/deepks_lcao.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ template <typename TK, typename TR>
3030
class DeePKS<OperatorLCAO<TK, TR>> : public OperatorLCAO<TK, TR>
3131
{
3232
public:
33-
DeePKS<OperatorLCAO<TK, TR>>(Local_Orbital_Charge* loc_in,
34-
LCAO_Matrix* LM_in,
33+
DeePKS<OperatorLCAO<TK, TR>>(LCAO_Matrix* LM_in,
3534
const std::vector<ModuleBase::Vector3<double>>& kvec_d_in,
3635
HContainer<TR>* hR_in,
3736
std::vector<TK>* hK_in,
@@ -57,8 +56,6 @@ class DeePKS<OperatorLCAO<TK, TR>> : public OperatorLCAO<TK, TR>
5756
#endif
5857

5958
private:
60-
Local_Orbital_Charge* loc;
61-
6259
elecstate::DensityMatrix<TK, double>* DM;
6360

6461
const UnitCell* ucell = nullptr;

0 commit comments

Comments
 (0)