@@ -30,6 +30,7 @@ toWannier90_LCAO_IN_PW::~toWannier90_LCAO_IN_PW()
3030}
3131
3232void toWannier90_LCAO_IN_PW::calculate (
33+ UnitCell& ucell,
3334 const ModuleBase::matrix& ekb,
3435 const ModulePW::PW_Basis_K* wfcpw,
3536 const ModulePW::PW_Basis_Big* bigpw,
@@ -45,9 +46,9 @@ void toWannier90_LCAO_IN_PW::calculate(
4546 ModulePW::PW_Basis_K* wfcpw_ptr = const_cast <ModulePW::PW_Basis_K*>(wfcpw);
4647 this ->psi_init_ = new psi_initializer_nao<std::complex <double >, base_device::DEVICE_CPU>();
4748#ifdef __MPI
48- this ->psi_init_ ->initialize (sf_ptr, wfcpw_ptr, &(GlobalC:: ucell) , &(GlobalC::Pkpoints), 1 , nullptr , GlobalV::MY_RANK);
49+ this ->psi_init_ ->initialize (sf_ptr, wfcpw_ptr, &ucell, &(GlobalC::Pkpoints), 1 , nullptr , GlobalV::MY_RANK);
4950 #else
50- this ->psi_init_ ->initialize (sf_ptr, wfcpw_ptr, &(GlobalC:: ucell), 1 , nullptr );
51+ this ->psi_init_ ->initialize (sf_ptr, wfcpw_ptr, &(ucell), 1 , nullptr );
5152 #endif
5253 this ->psi_init_ ->tabulate ();
5354 this ->psi_init_ ->allocate (true );
@@ -69,7 +70,7 @@ void toWannier90_LCAO_IN_PW::calculate(
6970 }
7071 }
7172
72- psi::Psi<std::complex <double >> *unk_inLcao = get_unk_from_lcao (*psi, wfcpw, sf, kv);
73+ psi::Psi<std::complex <double >> *unk_inLcao = get_unk_from_lcao (ucell, *psi, wfcpw, sf, kv);
7374
7475 if (out_wannier_eig)
7576 {
@@ -106,6 +107,7 @@ void toWannier90_LCAO_IN_PW::calculate(
106107}
107108
108109psi::Psi<std::complex <double >>* toWannier90_LCAO_IN_PW::get_unk_from_lcao (
110+ const UnitCell& ucell,
109111 const psi::Psi<std::complex <double >>& psi_in,
110112 const ModulePW::PW_Basis_K* wfcpw,
111113 const Structure_Factor& sf,
@@ -118,7 +120,7 @@ psi::Psi<std::complex<double>>* toWannier90_LCAO_IN_PW::get_unk_from_lcao(
118120 unk_inLcao->zero_out ();
119121
120122 // Orbital projection to plane wave
121- ModuleBase::realArray table_local (GlobalC:: ucell.ntype , GlobalC:: ucell.nmax_total , PARAM.globalv .nqx );
123+ ModuleBase::realArray table_local (ucell.ntype , ucell.nmax_total , PARAM.globalv .nqx );
122124
123125 for (int ik = 0 ; ik < num_kpts; ik++)
124126 {
0 commit comments