|
1 | 1 | #include "esolver_ks.h" |
2 | 2 |
|
3 | 3 | #include <ctime> |
| 4 | +#include <iostream> |
4 | 5 | #ifdef __MPI |
5 | 6 | #include <mpi.h> |
6 | 7 | #else |
|
9 | 10 | #include "module_base/timer.h" |
10 | 11 | #include "module_cell/cal_atoms_info.h" |
11 | 12 | #include "module_io/json_output/init_info.h" |
| 13 | +#include "module_io/json_output/output_info.h" |
12 | 14 | #include "module_io/output_log.h" |
13 | 15 | #include "module_io/print_info.h" |
14 | 16 | #include "module_io/write_istate_info.h" |
15 | 17 | #include "module_parameter/parameter.h" |
16 | | - |
17 | | -#include <iostream> |
18 | 18 | //--------------Temporary---------------- |
19 | 19 | #include "module_base/global_variable.h" |
20 | 20 | #include "module_hamilt_lcao/module_dftu/dftu.h" |
|
24 | 24 | #include "module_base/parallel_common.h" |
25 | 25 | #include "module_cell/module_paw/paw_cell.h" |
26 | 26 | #endif |
27 | | -#include "module_io/json_output/output_info.h" |
28 | 27 |
|
29 | 28 | namespace ModuleESolver |
30 | 29 | { |
@@ -631,7 +630,7 @@ void ESolver_KS<T, Device>::runner(const int istep, UnitCell& ucell) |
631 | 630 | { |
632 | 631 | dkin = p_chgmix->get_dkin(pelec->charge, PARAM.inp.nelec); |
633 | 632 | } |
634 | | - this->print_iter(iter, drho, dkin, duration, diag_ethr); |
| 633 | + this->pelec->print_etot(this->conv_esolver, iter, drho, dkin, duration, PARAM.inp.printe, diag_ethr); |
635 | 634 |
|
636 | 635 | // 12) Json, need to be moved to somewhere else |
637 | 636 | #ifdef __RAPIDJSON |
@@ -662,23 +661,12 @@ void ESolver_KS<T, Device>::runner(const int istep, UnitCell& ucell) |
662 | 661 | } |
663 | 662 | } // end scf iterations |
664 | 663 | std::cout << " >> Leave SCF iteration.\n * * * * * *" << std::endl; |
665 | | -#ifdef __RAPIDJSON |
666 | | - // 14) add Json of efermi energy converge |
667 | | - Json::add_output_efermi_converge(this->pelec->eferm.ef * ModuleBase::Ry_to_eV, this->conv_esolver); |
668 | | -#endif //__RAPIDJSON |
669 | 664 |
|
670 | 665 | // 15) after scf |
671 | 666 | ModuleBase::timer::tick(this->classname, "after_scf"); |
672 | 667 | this->after_scf(istep); |
673 | 668 | ModuleBase::timer::tick(this->classname, "after_scf"); |
674 | 669 |
|
675 | | - // 16) Json again |
676 | | -#ifdef __RAPIDJSON |
677 | | - // add nkstot,nkstot_ibz to output json |
678 | | - int Jnkstot = this->pelec->klist->get_nkstot(); |
679 | | - Json::add_nkstot(Jnkstot); |
680 | | -#endif //__RAPIDJSON |
681 | | - |
682 | 670 | ModuleBase::timer::tick(this->classname, "runner"); |
683 | 671 | return; |
684 | 672 | }; |
@@ -710,40 +698,13 @@ void ESolver_KS<T, Device>::after_scf(const int istep) |
710 | 698 | { |
711 | 699 | this->pelec->print_eigenvalue(GlobalV::ofs_running); |
712 | 700 | } |
713 | | -} |
714 | | - |
715 | | -//------------------------------------------------------------------------------ |
716 | | -//! the 8th function of ESolver_KS: print_iter |
717 | | -//! mohan add 2024-05-12 |
718 | | -//------------------------------------------------------------------------------ |
719 | | -template <typename T, typename Device> |
720 | | -void ESolver_KS<T, Device>::print_iter(const int iter, |
721 | | - const double drho, |
722 | | - const double dkin, |
723 | | - const double duration, |
724 | | - const double ethr) |
725 | | -{ |
726 | | - this->pelec->print_etot(this->conv_esolver, iter, drho, dkin, duration, PARAM.inp.printe, ethr); |
727 | | -} |
728 | | - |
729 | | -//------------------------------------------------------------------------------ |
730 | | -//! the 10th function of ESolver_KS: getnieter |
731 | | -//! mohan add 2024-05-12 |
732 | | -//------------------------------------------------------------------------------ |
733 | | -template <typename T, typename Device> |
734 | | -int ESolver_KS<T, Device>::get_niter() |
735 | | -{ |
736 | | - return this->niter; |
737 | | -} |
738 | | - |
739 | | -//------------------------------------------------------------------------------ |
740 | | -//! the 11th function of ESolver_KS: get_maxniter |
741 | | -//! tqzhao add 2024-05-15 |
742 | | -//------------------------------------------------------------------------------ |
743 | | -template <typename T, typename Device> |
744 | | -int ESolver_KS<T, Device>::get_maxniter() |
745 | | -{ |
746 | | - return this->maxniter; |
| 701 | + // #ifdef __RAPIDJSON |
| 702 | + // // add Json of efermi energy converge |
| 703 | + // Json::add_output_efermi_converge(this->pelec->eferm.ef * ModuleBase::Ry_to_eV, this->conv_esolver); |
| 704 | + // // add nkstot,nkstot_ibz to output json |
| 705 | + // int Jnkstot = this->pelec->klist->get_nkstot(); |
| 706 | + // Json::add_nkstot(Jnkstot); |
| 707 | + // #endif //__RAPIDJSON |
747 | 708 | } |
748 | 709 |
|
749 | 710 | //------------------------------------------------------------------------------ |
|
0 commit comments