@@ -24,12 +24,13 @@ bool ModuleIO::read_wfc_nao(
2424 const std::string& global_readin_dir,
2525 const Parallel_Orbitals& ParaV,
2626 psi::Psi<T>& psid,
27- elecstate::ElecState* const pelec,
27+ ModuleBase::matrix& wg,
28+ ModuleBase::matrix& ekb,
2829 const int skip_band)
2930{
3031 ModuleBase::TITLE (" ModuleIO" , " read_wfc_nao" );
3132 ModuleBase::timer::tick (" ModuleIO" , " read_wfc_nao" );
32- int nk = pelec-> ekb .nr ;
33+ int nk = ekb.nr ;
3334 bool gamma_only = std::is_same<T, double >::value;
3435 int out_type = 1 ; // only support text file now
3536 bool read_success = true ;
@@ -101,8 +102,8 @@ bool ModuleIO::read_wfc_nao(
101102 const int ib_read = std::max (i - skip_band, 0 );
102103 int ib = 0 ;
103104 ModuleBase::GlobalFunc::READ_VALUE (ifs, ib);
104- ModuleBase::GlobalFunc::READ_VALUE (ifs, pelec-> ekb (ik, ib_read));
105- ModuleBase::GlobalFunc::READ_VALUE (ifs, pelec-> wg (ik, ib_read));
105+ ModuleBase::GlobalFunc::READ_VALUE (ifs, ekb (ik, ib_read));
106+ ModuleBase::GlobalFunc::READ_VALUE (ifs, wg (ik, ib_read));
106107 if (i+1 != ib)
107108 {
108109 error_message << " The band index read in from file do not match the global parameter band index!\n " ;
@@ -159,8 +160,8 @@ bool ModuleIO::read_wfc_nao(
159160 1 ,
160161 const_cast <int *>(ParaV.desc_wfc ),
161162 pv_glb.blacs_ctxt );
162- Parallel_Common::bcast_double (&(pelec-> ekb (ik, 0 )), nbands);
163- Parallel_Common::bcast_double (&(pelec-> wg (ik, 0 )), nbands);
163+ Parallel_Common::bcast_double (&(ekb (ik, 0 )), nbands);
164+ Parallel_Common::bcast_double (&(wg (ik, 0 )), nbands);
164165#else
165166 BlasConnector::copy (nbands*nlocal, ctot.data (), 1 , psid.get_pointer (), 1 );
166167#endif
@@ -172,10 +173,12 @@ bool ModuleIO::read_wfc_nao(
172173template bool ModuleIO::read_wfc_nao<double >(const std::string& global_readin_dir,
173174 const Parallel_Orbitals& ParaV,
174175 psi::Psi<double >& psid,
175- elecstate::ElecState* const pelec,
176+ ModuleBase::matrix& wg,
177+ ModuleBase::matrix& ekb,
176178 const int skip_band);
177179template bool ModuleIO::read_wfc_nao<std::complex <double >>(const std::string& global_readin_dir,
178180 const Parallel_Orbitals& ParaV,
179181 psi::Psi<std::complex <double >>& psid,
180- elecstate::ElecState* const pelec,
182+ ModuleBase::matrix& wg,
183+ ModuleBase::matrix& ekb,
181184 const int skip_band);
0 commit comments