@@ -60,9 +60,9 @@ double Charge_Mixing::get_drho(Charge* chr, const double nelec)
6060 Parallel_Reduce::reduce_pool (drho);
6161#endif
6262 assert (nelec != 0 );
63- assert (this ->omega > 0 );
63+ assert (* this ->omega > 0 );
6464 assert (this ->rhopw ->nxyz > 0 );
65- drho *= this ->omega / static_cast <double >(this ->rhopw ->nxyz );
65+ drho *= * this ->omega / static_cast <double >(this ->rhopw ->nxyz );
6666 drho /= nelec;
6767 }
6868
@@ -99,9 +99,9 @@ double Charge_Mixing::get_dkin(Charge* chr, const double nelec)
9999 Parallel_Reduce::reduce_pool (dkin);
100100#endif
101101 assert (nelec != 0 );
102- assert (this ->omega > 0 );
102+ assert (* this ->omega > 0 );
103103 assert (this ->rhopw ->nxyz > 0 );
104- dkin *= this ->omega / static_cast <double >(this ->rhopw ->nxyz );
104+ dkin *= * this ->omega / static_cast <double >(this ->rhopw ->nxyz );
105105 dkin /= nelec;
106106
107107 ModuleBase::timer::tick (" Charge_Mixing" , " get_dkin" );
@@ -121,7 +121,7 @@ double Charge_Mixing::inner_product_recip_rho(std::complex<double>* rho1, std::c
121121 rhog2[is] = rho2 + is * this ->rhopw ->npw ;
122122 }
123123
124- static const double fac = ModuleBase::e2 * ModuleBase::FOUR_PI / this ->tpiba2 ;
124+ static const double fac = ModuleBase::e2 * ModuleBase::FOUR_PI / ((* this ->tpiba ) * (* this -> tpiba )) ;
125125 static const double fac2 = ModuleBase::e2 * ModuleBase::FOUR_PI / (ModuleBase::TWO_PI * ModuleBase::TWO_PI);
126126
127127 double sum = 0.0 ;
@@ -245,7 +245,7 @@ double Charge_Mixing::inner_product_recip_rho(std::complex<double>* rho1, std::c
245245#endif
246246 ModuleBase::timer::tick (" Charge_Mixing" , " inner_product_recip_rho" );
247247
248- sum *= this ->omega * 0.5 ;
248+ sum *= * this ->omega * 0.5 ;
249249
250250 delete[] rhog1;
251251 delete[] rhog2;
@@ -285,7 +285,7 @@ double Charge_Mixing::inner_product_recip_hartree(std::complex<double>* rhog1, s
285285 ModuleBase::TITLE (" Charge_Mixing" , " inner_product_recip_hartree" );
286286 ModuleBase::timer::tick (" Charge_Mixing" , " inner_product_recip_hartree" );
287287
288- static const double fac = ModuleBase::e2 * ModuleBase::FOUR_PI / this ->tpiba2 ;
288+ static const double fac = ModuleBase::e2 * ModuleBase::FOUR_PI / ((* this ->tpiba ) * (* this -> tpiba )) ;
289289 static const double fac2 = ModuleBase::e2 * ModuleBase::FOUR_PI / (ModuleBase::TWO_PI * ModuleBase::TWO_PI);
290290
291291 double sum = 0.0 ;
@@ -446,7 +446,7 @@ double Charge_Mixing::inner_product_recip_hartree(std::complex<double>* rhog1, s
446446
447447 ModuleBase::timer::tick (" Charge_Mixing" , " inner_product_recip_hartree" );
448448
449- sum *= this ->omega * 0.5 ;
449+ sum *= * this ->omega * 0.5 ;
450450
451451 return sum;
452452}
0 commit comments