@@ -19,7 +19,8 @@ IState_Envelope::~IState_Envelope()
1919}
2020
2121// For gamma_only
22- void IState_Envelope::begin (const psi::Psi<double >* psid,
22+ void IState_Envelope::begin (const UnitCell& ucell,
23+ const psi::Psi<double >* psid,
2324 const ModulePW::PW_Basis* pw_rhod,
2425 const ModulePW::PW_Basis_K* pw_wfc,
2526 const ModulePW::PW_Basis_Big* pw_big,
@@ -113,7 +114,7 @@ void IState_Envelope::begin(const psi::Psi<double>* psid,
113114 }
114115#endif
115116
116- gg.cal_env (wfc_gamma_grid[is][ib], pes_->charge ->rho [is], GlobalC:: ucell);
117+ gg.cal_env (wfc_gamma_grid[is][ib], pes_->charge ->rho [is], ucell);
117118
118119 pes_->charge ->save_rho_before_sum_band ();
119120
@@ -128,7 +129,7 @@ void IState_Envelope::begin(const psi::Psi<double>* psid,
128129 0 ,
129130 ss.str (),
130131 ef_tmp,
131- &(GlobalC:: ucell));
132+ &(ucell));
132133 }
133134 }
134135 }
@@ -176,7 +177,7 @@ void IState_Envelope::begin(const psi::Psi<double>* psid,
176177 }
177178#endif
178179
179- gg.cal_env (wfc_gamma_grid[is][ib], pes_->charge ->rho [is], GlobalC:: ucell);
180+ gg.cal_env (wfc_gamma_grid[is][ib], pes_->charge ->rho [is], ucell);
180181
181182 pes_->charge ->save_rho_before_sum_band ();
182183
@@ -210,7 +211,7 @@ void IState_Envelope::begin(const psi::Psi<double>* psid,
210211 0 ,
211212 ss_real.str (),
212213 ef_tmp,
213- &(GlobalC:: ucell));
214+ &(ucell));
214215
215216 // Output imaginary part
216217 std::stringstream ss_imag;
@@ -222,7 +223,7 @@ void IState_Envelope::begin(const psi::Psi<double>* psid,
222223 0 ,
223224 ss_imag.str (),
224225 ef_tmp,
225- &(GlobalC:: ucell));
226+ &(ucell));
226227 }
227228 }
228229 }
@@ -253,7 +254,8 @@ void IState_Envelope::begin(const psi::Psi<double>* psid,
253254}
254255
255256// For multi-k
256- void IState_Envelope::begin (const psi::Psi<std::complex <double >>* psi,
257+ void IState_Envelope::begin (const UnitCell& ucell,
258+ const psi::Psi<std::complex <double >>* psi,
257259 const ModulePW::PW_Basis* pw_rhod,
258260 const ModulePW::PW_Basis_K* pw_wfc,
259261 const ModulePW::PW_Basis_Big* pw_big,
@@ -348,7 +350,7 @@ void IState_Envelope::begin(const psi::Psi<std::complex<double>>* psi,
348350 }
349351#endif
350352 // deal with NSPIN=4
351- gk.cal_env_k (ik, wfc_k_grid[ik][ib], pes_->charge ->rho [ispin], kv.kvec_c , kv.kvec_d , GlobalC:: ucell);
353+ gk.cal_env_k (ik, wfc_k_grid[ik][ib], pes_->charge ->rho [ispin], kv.kvec_c , kv.kvec_d , ucell);
352354
353355 std::stringstream ss;
354356 ss << global_out_dir << " BAND" << ib + 1 << " _k_" << ik + 1 << " _s_" << ispin + 1 << " _ENV.cube" ;
@@ -361,7 +363,7 @@ void IState_Envelope::begin(const psi::Psi<std::complex<double>>* psi,
361363 0 ,
362364 ss.str (),
363365 ef_tmp,
364- &(GlobalC:: ucell),
366+ &(ucell),
365367 3 ,
366368 1 );
367369
@@ -429,7 +431,7 @@ void IState_Envelope::begin(const psi::Psi<std::complex<double>>* psi,
429431 0 ,
430432 ss_real.str (),
431433 ef_tmp,
432- &(GlobalC:: ucell));
434+ &(ucell));
433435
434436 // Output imaginary part
435437 std::stringstream ss_imag;
@@ -442,7 +444,7 @@ void IState_Envelope::begin(const psi::Psi<std::complex<double>>* psi,
442444 0 ,
443445 ss_imag.str (),
444446 ef_tmp,
445- &(GlobalC:: ucell));
447+ &(ucell));
446448 }
447449 }
448450 }
0 commit comments