@@ -38,6 +38,8 @@ void ESolver_KS_LCAO<TK, TR>::others(BaseCell& basecell, const int istep)
3838 ModuleBase::timer::start (" ESolver_KS_LCAO" , " others" );
3939
4040 const std::string cal_type = this ->inp_ ->calculation ;
41+ const std::string global_out_dir = PARAM .globalv .global_out_dir ;
42+ const bool gamma_only_local = PARAM .globalv .gamma_only_local ;
4143
4244 if (cal_type == " test_memory" )
4345 {
@@ -78,7 +80,7 @@ void ESolver_KS_LCAO<TK, TR>::others(BaseCell& basecell, const int istep)
7880 this ->inp_ ->out_level ,
7981 orb_.get_rcutmax_Phi (),
8082 ucell.infoNL ->get_rcutmax_Beta (),
81- PARAM . globalv . gamma_only_local );
83+ gamma_only_local);
8284
8385 atom_arrange::search (PARAM .globalv .search_pbc ,
8486 GlobalV::ofs_running,
@@ -108,7 +110,7 @@ void ESolver_KS_LCAO<TK, TR>::others(BaseCell& basecell, const int istep)
108110 // (2)For each atom, calculate the adjacent atoms in different cells
109111 // and allocate the space for H(R) and S(R).
110112 // If k point is used here, allocate HlocR after atom_arrange.
111- this ->RA .for_2d (ucell, this ->gd , this ->pv , PARAM . globalv . gamma_only_local , orb_.cutoffs ());
113+ this ->RA .for_2d (ucell, this ->gd , this ->pv , gamma_only_local, orb_.cutoffs ());
112114
113115 // 2. density matrix extrapolation
114116
@@ -175,14 +177,14 @@ void ESolver_KS_LCAO<TK, TR>::others(BaseCell& basecell, const int istep)
175177
176178 // pelec should be initialized before these calculations
177179 elecstate::init_scf (ucell, this ->Pgrid , this ->sf .strucFac , this ->locpp .numeric ,
178- istep, PARAM . globalv . global_out_dir , *this ->inp_ , this ->pelec );
180+ istep, global_out_dir, *this ->inp_ , this ->pelec );
179181
180182 // self consistent calculations for electronic ground state
181183 if (cal_type == " get_pchg" )
182184 {
183185 std::cout << FmtCore::format (" \n * * * * * *\n << Start %s.\n " , " getting partial charge" );
184186 Get_pchg_lcao get_pchg (this ->psi , &(this ->pv ));
185- if (PARAM . globalv . gamma_only_local )
187+ if (gamma_only_local)
186188 {
187189 get_pchg.begin (this ->chr .rho ,
188190 this ->pelec ->wg ,
@@ -196,7 +198,7 @@ void ESolver_KS_LCAO<TK, TR>::others(BaseCell& basecell, const int istep)
196198 this ->Pgrid ,
197199 &this ->gd ,
198200 this ->kv ,
199- PARAM . globalv . global_out_dir ,
201+ global_out_dir,
200202 GlobalV::ofs_running);
201203 }
202204 else
@@ -215,7 +217,7 @@ void ESolver_KS_LCAO<TK, TR>::others(BaseCell& basecell, const int istep)
215217 this ->Pgrid ,
216218 &this ->gd ,
217219 this ->kv ,
218- PARAM . globalv . global_out_dir ,
220+ global_out_dir,
219221 GlobalV::ofs_running,
220222 this ->inp_ ->if_separate_k ,
221223 this ->chr .ngmc );
@@ -226,7 +228,7 @@ void ESolver_KS_LCAO<TK, TR>::others(BaseCell& basecell, const int istep)
226228 {
227229 std::cout << FmtCore::format (" \n * * * * * *\n << Start %s.\n " , " getting wave function" );
228230 Get_wf_lcao get_wf (this ->pelec );
229- if (PARAM . globalv . gamma_only_local )
231+ if (gamma_only_local)
230232 {
231233 get_wf.begin (ucell,
232234 this ->psi ,
@@ -241,7 +243,7 @@ void ESolver_KS_LCAO<TK, TR>::others(BaseCell& basecell, const int istep)
241243 this ->inp_ ->nbands ,
242244 this ->inp_ ->nspin ,
243245 PARAM .globalv .nlocal ,
244- PARAM . globalv . global_out_dir ,
246+ global_out_dir,
245247 GlobalV::ofs_running);
246248 }
247249 else
@@ -259,7 +261,7 @@ void ESolver_KS_LCAO<TK, TR>::others(BaseCell& basecell, const int istep)
259261 this ->inp_ ->nbands ,
260262 this ->inp_ ->nspin ,
261263 PARAM .globalv .nlocal ,
262- PARAM . globalv . global_out_dir ,
264+ global_out_dir,
263265 GlobalV::ofs_running);
264266 }
265267 std::cout << FmtCore::format (" >> Finish %s.\n * * * * * *\n " , " getting wave function" );
0 commit comments