Skip to content

Commit 028e91d

Browse files
authored
fix some warnings about esolver (deepmodeling#5807)
1 parent b5a5068 commit 028e91d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

source/module_esolver/esolver_gets.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ void ESolver_GetS::runner(UnitCell& ucell, const int istep)
147147
}
148148

149149
void ESolver_GetS::after_all_runners(UnitCell& ucell) {};
150-
double ESolver_GetS::cal_energy() {};
150+
double ESolver_GetS::cal_energy() { return 0.0; };
151151
void ESolver_GetS::cal_force(UnitCell& ucell, ModuleBase::matrix& force) {};
152152
void ESolver_GetS::cal_stress(UnitCell& ucell, ModuleBase::matrix& stress) {};
153153

source/module_esolver/esolver_ks.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class ESolver_KS : public ESolver_FP
4343
virtual void iter_init(UnitCell& ucell, const int istep, const int iter);
4444

4545
//! Something to do after hamilt2density function in each iter loop.
46-
virtual void iter_finish(UnitCell& ucell, const int istep, int& iter);
46+
virtual void iter_finish(UnitCell& ucell, const int istep, int& iter) override;
4747

4848
// calculate electron density from a specific Hamiltonian with ethr
4949
virtual void hamilt2density_single(UnitCell& ucell, const int istep, const int iter, const double ethr);

0 commit comments

Comments
 (0)