Skip to content

Commit 5619891

Browse files
committed
Change beforeiter/afteriter to beforescf/afterscf
1 parent e794931 commit 5619891

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

source/module_esolver/esolver_ks.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void ESolver_KS:: Run(int istep, UnitCell_pseudo& cell)
4242
ModuleBase::timer:: tick(this->classname,"Run");
4343

4444
this->printhead(); //print the headline on the screen.
45-
this->beforeiter(); //Something else to do before the iter loop
45+
this->beforescf(); //Something else to do before the iter loop
4646

4747
bool firstscf = true;
4848
bool conv_elec = false;
@@ -96,7 +96,7 @@ void ESolver_KS:: Run(int istep, UnitCell_pseudo& cell)
9696
break;
9797
}
9898
}
99-
afteriter(conv_elec);
99+
afterscf(conv_elec);
100100

101101
ModuleBase::timer:: tick(this->classname,"Run");
102102
return;

source/module_esolver/esolver_ks.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ class ESolver_KS: public ESolver_FP
2828
virtual int getniter() override;
2929

3030
protected:
31-
// Something to do before iter loop
32-
virtual void beforeiter(){};
31+
// Something to do before SCF iterations.
32+
virtual void beforescf(){};
3333
// Something to do before hamilt2density function in each iter loop.
3434
virtual void eachiterinit(int iter){};
3535
// Something to do after hamilt2density function in each iter loop.
3636
virtual void eachiterfinish(int iter, bool conv){};
37-
// Something to do after the iter loop when scf is converged or comes to the max iter step.
38-
virtual void afteriter(bool){};
37+
// Something to do after SCF iterations when SCF is converged or comes to the max iter step.
38+
virtual void afterscf(bool conv){};
3939
// <Temporary> It should be replaced by a function in Hamilt Class
4040
virtual void updatepot(bool conv){};
4141

source/module_esolver/esolver_ks_pw.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ void ESolver_KS_PW::Init(Input &inp, UnitCell_pseudo &ucell)
180180

181181
}
182182

183-
void ESolver_KS_PW:: beforeiter()
183+
void ESolver_KS_PW:: beforescf()
184184
{
185185
//calculate ewald energy
186186
H_Ewald_pw::compute_ewald(GlobalC::ucell, GlobalC::pw);
@@ -352,7 +352,7 @@ void ESolver_KS_PW:: eachiterfinish(int iter, bool conv_elec)
352352
}
353353

354354

355-
void ESolver_KS_PW::afteriter(bool conv_elec)
355+
void ESolver_KS_PW::afterscf(bool conv_elec)
356356
{
357357
#ifdef __LCAO
358358
if(GlobalC::chi0_hilbert.epsilon) // pengfei 2016-11-23

source/module_esolver/esolver_ks_pw.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ class ESolver_KS_PW: public ESolver_KS
2020
void cal_Stress(ModuleBase::matrix &stress) override;
2121

2222
protected:
23-
virtual void beforeiter() override;
23+
virtual void beforescf() override;
2424
virtual void eachiterinit(int iter) override;
2525
virtual void hamilt2density(int istep, int iter, double ethr) override;
2626
virtual void updatepot(bool conv) override;
2727
virtual void eachiterfinish(int iter, bool conv) override;
28-
virtual void afteriter(bool) override;
28+
virtual void afterscf(bool) override;
2929

3030
// <Temporary> Get wavefunctions and eigen energies.
3131
// It should be replaced by diag class in HSolver module in the future

0 commit comments

Comments
 (0)