@@ -26,7 +26,7 @@ ModuleBase::matrix surchem::v_correction(const UnitCell &cell,
2626 complex <double > *Porter_g = new complex <double >[rho_basis->npw ];
2727 ModuleBase::GlobalFunc::ZEROS (Porter_g, rho_basis->npw );
2828
29- GlobalC::UFFT. ToReciSpace (Porter, Porter_g, rho_basis );
29+ rho_basis-> real2recip (Porter, Porter_g);
3030
3131 complex <double > *N = new complex <double >[rho_basis->npw ];
3232 complex <double > *TOTN = new complex <double >[rho_basis->npw ];
@@ -149,7 +149,7 @@ ModuleBase::matrix surchem::v_compensating(const UnitCell &cell, ModulePW::PW_Ba
149149 // std::cout << " ecomp=" << ecomp << std::endl;
150150 comp_chg_energy = ecomp;
151151
152- GlobalC::UFFT. ToRealSpace (phi_comp_G, phi_comp_R, rho_basis );
152+ rho_basis-> recip2real (phi_comp_G, phi_comp_R);
153153
154154 ModuleBase::matrix v_comp (GlobalV::NSPIN, rho_basis->nrxx );
155155 if (GlobalV::NSPIN == 4 )
@@ -205,7 +205,7 @@ void surchem::test_V_to_N(ModuleBase::matrix &v,
205205 phi_comp_R[ir] = v (0 , ir);
206206 }
207207
208- GlobalC::UFFT. ToReciSpace (phi_comp_R, phi_comp_G, rho_basis );
208+ rho_basis-> real2recip (phi_comp_R, phi_comp_G);
209209 for (int ig = 0 ; ig < rho_basis->npw ; ig++)
210210 {
211211 if (rho_basis->gg [ig] >= 1.0e-12 ) // LiuXh 20180410
@@ -214,7 +214,7 @@ void surchem::test_V_to_N(ModuleBase::matrix &v,
214214 comp_reci[ig] = phi_comp_G[ig] / fac;
215215 }
216216 }
217- GlobalC::UFFT. ToRealSpace (comp_reci, N_real, rho_basis );
217+ rho_basis-> recip2real (comp_reci, N_real);
218218
219219 complex <double > *vloc_g = new complex <double >[rho_basis->npw ];
220220 complex <double > *ng = new complex <double >[rho_basis->npw ];
@@ -225,8 +225,7 @@ void surchem::test_V_to_N(ModuleBase::matrix &v,
225225 for (int ir = 0 ; ir < rho_basis->nrxx ; ir++)
226226 Porter[ir] = rho[0 ][ir];
227227
228- GlobalC::UFFT.ToReciSpace (GlobalC::pot.vltot ,
229- vloc_g, rho_basis); // now n is vloc in Recispace
228+ rho_basis->real2recip (GlobalC::pot.vltot ,vloc_g);// now n is vloc in Recispace
230229 for (int ig = 0 ; ig < rho_basis->npw ; ig++) {
231230 if (rho_basis->gg [ig] >= 1.0e-12 ) // LiuXh 20180410
232231 {
@@ -237,7 +236,7 @@ void surchem::test_V_to_N(ModuleBase::matrix &v,
237236 }
238237 }
239238 double *nr = new double [rho_basis->nrxx ];
240- GlobalC::UFFT. ToRealSpace (ng, nr, rho_basis );
239+ rho_basis-> recip2real (ng, nr);
241240
242241 double *diff = new double [rho_basis->nrxx ];
243242 double *diff2 = new double [rho_basis->nrxx ];
0 commit comments