diff --git a/source/module_esolver/esolver_gets.cpp b/source/module_esolver/esolver_gets.cpp index cf51f6bbbe..842b0340e1 100644 --- a/source/module_esolver/esolver_gets.cpp +++ b/source/module_esolver/esolver_gets.cpp @@ -147,7 +147,7 @@ void ESolver_GetS::runner(UnitCell& ucell, const int istep) } void ESolver_GetS::after_all_runners(UnitCell& ucell) {}; -double ESolver_GetS::cal_energy() {}; +double ESolver_GetS::cal_energy() { return 0.0; }; void ESolver_GetS::cal_force(UnitCell& ucell, ModuleBase::matrix& force) {}; void ESolver_GetS::cal_stress(UnitCell& ucell, ModuleBase::matrix& stress) {}; diff --git a/source/module_esolver/esolver_ks.h b/source/module_esolver/esolver_ks.h index c20a53f555..16932bcc6a 100644 --- a/source/module_esolver/esolver_ks.h +++ b/source/module_esolver/esolver_ks.h @@ -43,7 +43,7 @@ class ESolver_KS : public ESolver_FP virtual void iter_init(UnitCell& ucell, const int istep, const int iter); //! Something to do after hamilt2density function in each iter loop. - virtual void iter_finish(UnitCell& ucell, const int istep, int& iter); + virtual void iter_finish(UnitCell& ucell, const int istep, int& iter) override; // calculate electron density from a specific Hamiltonian with ethr virtual void hamilt2density_single(UnitCell& ucell, const int istep, const int iter, const double ethr);