11#include " esolver_ks.h"
22
33#include < ctime>
4+ #include < iostream>
45#ifdef __MPI
56#include < mpi.h>
67#else
910#include " module_base/timer.h"
1011#include " module_cell/cal_atoms_info.h"
1112#include " module_io/json_output/init_info.h"
13+ #include " module_io/json_output/output_info.h"
1214#include " module_io/output_log.h"
1315#include " module_io/print_info.h"
1416#include " module_io/write_istate_info.h"
1517#include " module_parameter/parameter.h"
16-
17- #include < iostream>
1818// --------------Temporary----------------
1919#include " module_base/global_variable.h"
2020#include " module_hamilt_lcao/module_dftu/dftu.h"
2424#include " module_base/parallel_common.h"
2525#include " module_cell/module_paw/paw_cell.h"
2626#endif
27- #include " module_io/json_output/output_info.h"
2827
2928namespace ModuleESolver
3029{
@@ -626,7 +625,7 @@ void ESolver_KS<T, Device>::runner(const int istep, UnitCell& ucell)
626625 {
627626 dkin = p_chgmix->get_dkin (pelec->charge , PARAM.inp .nelec );
628627 }
629- this ->print_iter ( iter, drho, dkin, duration, diag_ethr);
628+ this ->pelec -> print_etot ( this -> conv_esolver , iter, drho, dkin, duration, PARAM. inp . printe , diag_ethr);
630629
631630 // 12) Json, need to be moved to somewhere else
632631#ifdef __RAPIDJSON
@@ -653,23 +652,12 @@ void ESolver_KS<T, Device>::runner(const int istep, UnitCell& ucell)
653652 }
654653 } // end scf iterations
655654 std::cout << " >> Leave SCF iteration.\n * * * * * *" << std::endl;
656- #ifdef __RAPIDJSON
657- // 14) add Json of efermi energy converge
658- Json::add_output_efermi_converge (this ->pelec ->eferm .ef * ModuleBase::Ry_to_eV, this ->conv_esolver );
659- #endif // __RAPIDJSON
660655
661656 // 15) after scf
662657 ModuleBase::timer::tick (this ->classname , " after_scf" );
663658 this ->after_scf (istep);
664659 ModuleBase::timer::tick (this ->classname , " after_scf" );
665660
666- // 16) Json again
667- #ifdef __RAPIDJSON
668- // add nkstot,nkstot_ibz to output json
669- int Jnkstot = this ->pelec ->klist ->get_nkstot ();
670- Json::add_nkstot (Jnkstot);
671- #endif // __RAPIDJSON
672-
673661 ModuleBase::timer::tick (this ->classname , " runner" );
674662 return ;
675663};
@@ -701,40 +689,13 @@ void ESolver_KS<T, Device>::after_scf(const int istep)
701689 {
702690 this ->pelec ->print_eigenvalue (GlobalV::ofs_running);
703691 }
704- }
705-
706- // ------------------------------------------------------------------------------
707- // ! the 8th function of ESolver_KS: print_iter
708- // ! mohan add 2024-05-12
709- // ------------------------------------------------------------------------------
710- template <typename T, typename Device>
711- void ESolver_KS<T, Device>::print_iter(const int iter,
712- const double drho,
713- const double dkin,
714- const double duration,
715- const double ethr)
716- {
717- this ->pelec ->print_etot (this ->conv_esolver , iter, drho, dkin, duration, PARAM.inp .printe , ethr);
718- }
719-
720- // ------------------------------------------------------------------------------
721- // ! the 10th function of ESolver_KS: getnieter
722- // ! mohan add 2024-05-12
723- // ------------------------------------------------------------------------------
724- template <typename T, typename Device>
725- int ESolver_KS<T, Device>::get_niter()
726- {
727- return this ->niter ;
728- }
729-
730- // ------------------------------------------------------------------------------
731- // ! the 11th function of ESolver_KS: get_maxniter
732- // ! tqzhao add 2024-05-15
733- // ------------------------------------------------------------------------------
734- template <typename T, typename Device>
735- int ESolver_KS<T, Device>::get_maxniter()
736- {
737- return this ->maxniter ;
692+ // #ifdef __RAPIDJSON
693+ // // add Json of efermi energy converge
694+ // Json::add_output_efermi_converge(this->pelec->eferm.ef * ModuleBase::Ry_to_eV, this->conv_esolver);
695+ // // add nkstot,nkstot_ibz to output json
696+ // int Jnkstot = this->pelec->klist->get_nkstot();
697+ // Json::add_nkstot(Jnkstot);
698+ // #endif //__RAPIDJSON
738699}
739700
740701// ------------------------------------------------------------------------------
0 commit comments