@@ -37,7 +37,7 @@ class Forces
3737 void cal_force (UnitCell& ucell,
3838 ModuleBase::matrix& force,
3939 const elecstate::ElecState& elec,
40- ModulePW::PW_Basis* rho_basis,
40+ const ModulePW::PW_Basis* const rho_basis,
4141 ModuleSymmetry::Symmetry* p_symm,
4242 Structure_Factor* p_sf,
4343 surchem& solvent,
@@ -53,15 +53,15 @@ class Forces
5353
5454 void cal_force_loc (const UnitCell& ucell,
5555 ModuleBase::matrix& forcelc,
56- ModulePW::PW_Basis* rho_basis,
56+ const ModulePW::PW_Basis* const rho_basis,
5757 const ModuleBase::matrix& vloc,
5858 const Charge* const chr);
5959 void cal_force_ew (const UnitCell& ucell,
6060 ModuleBase::matrix& forceion,
61- ModulePW::PW_Basis* rho_basis,
61+ const ModulePW::PW_Basis* const rho_basis,
6262 const Structure_Factor* p_sf);
6363 void cal_force_cc (ModuleBase::matrix& forcecc,
64- ModulePW::PW_Basis* rho_basis,
64+ const ModulePW::PW_Basis* const rho_basis,
6565 const Charge* const chr,
6666 const bool * numeric,
6767 UnitCell& ucell_in);
@@ -96,13 +96,13 @@ class Forces
9696 const UnitCell& ucell_in,
9797 const psi::Psi<complex <FPTYPE>, Device>* psi_in = nullptr );
9898 void cal_force_scc (ModuleBase::matrix& forcescc,
99- ModulePW::PW_Basis* rho_basis,
99+ const ModulePW::PW_Basis* const rho_basis,
100100 const ModuleBase::matrix& v_current,
101101 const bool vnew_exist,
102102 const bool * numeric,
103103 const UnitCell& ucell_in);
104104 void cal_force_us (ModuleBase::matrix& forcenl,
105- ModulePW::PW_Basis* rho_basis,
105+ const ModulePW::PW_Basis* const rho_basis,
106106 const pseudopot_cell_vnl& ppcell_in,
107107 const elecstate::ElecState& elec,
108108 const UnitCell& ucell);
@@ -113,7 +113,7 @@ class Forces
113113 const FPTYPE* rab,
114114 const FPTYPE* rhoc,
115115 FPTYPE* drhocg,
116- ModulePW::PW_Basis* rho_basis,
116+ const ModulePW::PW_Basis* const rho_basis,
117117 int type,
118118 const UnitCell& ucell_in); // used in nonlinear core correction stress
119119 void deriv_drhoc_scc (const bool & numeric,
@@ -122,7 +122,7 @@ class Forces
122122 const FPTYPE* rab,
123123 const FPTYPE* rhoc,
124124 FPTYPE* drhocg,
125- ModulePW::PW_Basis* rho_basis,
125+ const ModulePW::PW_Basis* const rho_basis,
126126 const UnitCell& ucell_in); // used in nonlinear core correction stress
127127 protected:
128128 Device* ctx = {};
0 commit comments