From 028e91d6c2e2b765536ef8d974e764eb11a9b4aa Mon Sep 17 00:00:00 2001 From: LUNASEA <33978601+maki49@users.noreply.github.com> Date: Sat, 4 Jan 2025 12:52:20 +0800 Subject: [PATCH] fix some warnings about esolver (#5807) --- source/module_esolver/esolver_gets.cpp | 2 +- source/module_esolver/esolver_ks.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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);