@@ -19,7 +19,7 @@ void ESolver_OF::init_elecstate(UnitCell& ucell)
1919{
2020 if (this ->pelec == nullptr )
2121 {
22- this ->pelec = new elecstate::ElecState ((Charge*)(&chr), this ->pw_rho , pw_big);
22+ this ->pelec = new elecstate::ElecState ((Charge< double > *)(&chr), this ->pw_rho , pw_big);
2323 }
2424
2525 delete this ->pelec ->pot ;
@@ -84,7 +84,7 @@ void ESolver_OF::allocate_array()
8484
8585 // initialize chemical potential, step length, ...
8686 delete this ->ptemp_rho_ ;
87- this ->ptemp_rho_ = new Charge ();
87+ this ->ptemp_rho_ = new Charge< double > ();
8888 this ->ptemp_rho_ ->set_rhopw (this ->pw_rho );
8989 const bool kin_den = this ->ptemp_rho_ ->kin_density (); // mohan add 20251202
9090 this ->ptemp_rho_ ->allocate (PARAM.inp .nspin , kin_den);
@@ -173,7 +173,7 @@ void ESolver_OF::cal_potential(double* ptemp_phi, double* rdLdphi, UnitCell& uce
173173 * @param [in] ptheta
174174 * @param [out] rdEdtheta dE/dTheta
175175 */
176- void ESolver_OF::cal_dEdtheta (double ** ptemp_phi, Charge* temp_rho, UnitCell& ucell, double * ptheta, double * rdEdtheta)
176+ void ESolver_OF::cal_dEdtheta (double ** ptemp_phi, Charge< double > * temp_rho, UnitCell& ucell, double * ptheta, double * rdEdtheta)
177177{
178178 double * dphi_dtheta = new double [this ->pw_rho ->nrxx ];
179179
0 commit comments