1212namespace ModuleESolver
1313{
1414
15- template <typename TK, typename TR>
16- ESolver_GetS<TK, TR>::ESolver_GetS()
15+ ESolver_GetS::ESolver_GetS ()
1716{
1817 this ->classname = " ESolver_GetS" ;
1918 this ->basisname = " LCAO" ;
2019}
2120
22- template <typename TK, typename TR>
23- ESolver_GetS<TK, TR>::~ESolver_GetS ()
21+ ESolver_GetS::~ESolver_GetS ()
2422{
2523}
2624
27- template <typename TK, typename TR>
28- void ESolver_GetS<TK, TR>::before_all_runners(UnitCell& ucell, const Input_para& inp)
25+ void ESolver_GetS::before_all_runners (UnitCell& ucell, const Input_para& inp)
2926{
3027 ModuleBase::TITLE (" ESolver_GetS" , " before_all_runners" );
3128 ModuleBase::timer::tick (" ESolver_GetS" , " before_all_runners" );
@@ -51,13 +48,13 @@ void ESolver_GetS<TK, TR>::before_all_runners(UnitCell& ucell, const Input_para&
5148 if (this ->pelec == nullptr )
5249 {
5350 // TK stands for double and complex<double>?
54- this ->pelec = new elecstate::ElecStateLCAO<TK >(&(this ->chr ), // use which parameter?
55- &(this ->kv ),
56- this ->kv .get_nks (),
57- &(this ->GG ), // mohan add 2024-04-01
58- &(this ->GK ), // mohan add 2024-04-01
59- this ->pw_rho ,
60- this ->pw_big );
51+ this ->pelec = new elecstate::ElecStateLCAO<std:: complex < double > >(&(this ->chr ), // use which parameter?
52+ &(this ->kv ),
53+ this ->kv .get_nks (),
54+ &(this ->GG ), // mohan add 2024-04-01
55+ &(this ->GK ), // mohan add 2024-04-01
56+ this ->pw_rho ,
57+ this ->pw_big );
6158 }
6259
6360 // 3) init LCAO basis
@@ -76,61 +73,13 @@ void ESolver_GetS<TK, TR>::before_all_runners(UnitCell& ucell, const Input_para&
7673 // 4) initialize the density matrix
7774 // DensityMatrix is allocated here, DMK is also initialized here
7875 // DMR is not initialized here, it will be constructed in each before_scf
79- dynamic_cast <elecstate::ElecStateLCAO<TK>*>(this ->pelec )->init_DM (&this ->kv , &(this ->pv ), inp.nspin );
76+ dynamic_cast <elecstate::ElecStateLCAO<std::complex <double >>*>(this ->pelec )
77+ ->init_DM (&this ->kv , &(this ->pv ), inp.nspin );
8078
8179 ModuleBase::timer::tick (" ESolver_GetS" , " before_all_runners" );
8280}
8381
84- template <>
85- void ESolver_GetS<double , double >::runner(UnitCell& ucell, const int istep)
86- {
87- ModuleBase::TITLE (" ESolver_GetS" , " runner" );
88- ModuleBase::WARNING_QUIT (" ESolver_GetS<double, double>::runner" , " not implemented" );
89- }
90-
91- template <>
92- void ESolver_GetS<std::complex <double >, std::complex <double >>::runner(UnitCell& ucell, const int istep)
93- {
94- ModuleBase::TITLE (" ESolver_GetS" , " runner" );
95- ModuleBase::timer::tick (" ESolver_GetS" , " runner" );
96-
97- // (1) Find adjacent atoms for each atom.
98- double search_radius = -1.0 ;
99- search_radius = atom_arrange::set_sr_NL (GlobalV::ofs_running,
100- PARAM.inp .out_level ,
101- orb_.get_rcutmax_Phi (),
102- ucell.infoNL .get_rcutmax_Beta (),
103- PARAM.globalv .gamma_only_local );
104-
105- atom_arrange::search (PARAM.inp .search_pbc ,
106- GlobalV::ofs_running,
107- GlobalC::GridD,
108- ucell,
109- search_radius,
110- PARAM.inp .test_atom_input );
111-
112- this ->RA .for_2d (this ->pv , PARAM.globalv .gamma_only_local , orb_.cutoffs ());
113-
114- if (this ->p_hamilt == nullptr )
115- {
116- this ->p_hamilt
117- = new hamilt::HamiltLCAO<std::complex <double >, std::complex <double >>(&this ->pv ,
118- this ->kv ,
119- *(two_center_bundle_.overlap_orb ),
120- orb_.cutoffs ());
121- dynamic_cast <hamilt::OperatorLCAO<std::complex <double >, std::complex <double >>*>(this ->p_hamilt ->ops )
122- ->contributeHR ();
123- }
124-
125- const std::string fn = PARAM.globalv .global_out_dir + " SR.csr" ;
126- std::cout << " The file is saved in " << fn << std::endl;
127- ModuleIO::output_SR (pv, GlobalC::GridD, this ->p_hamilt , fn);
128-
129- ModuleBase::timer::tick (" ESolver_GetS" , " runner" );
130- }
131-
132- template <>
133- void ESolver_GetS<std::complex <double >, double >::runner(UnitCell& ucell, const int istep)
82+ void ESolver_GetS::runner (UnitCell& ucell, const int istep)
13483{
13584 ModuleBase::TITLE (" ESolver_GetS" , " runner" );
13685 ModuleBase::timer::tick (" ESolver_GetS" , " runner" );
@@ -168,8 +117,4 @@ void ESolver_GetS<std::complex<double>, double>::runner(UnitCell& ucell, const i
168117 ModuleBase::timer::tick (" ESolver_GetS" , " runner" );
169118}
170119
171- template class ESolver_GetS <double , double >;
172- template class ESolver_GetS <std::complex <double >, double >;
173- template class ESolver_GetS <std::complex <double >, std::complex <double >>;
174-
175120} // namespace ModuleESolver
0 commit comments