11#include " elecstate_pw.h"
2- #include " module_parameter/parameter.h"
3- #include " elecstate_getters.h"
2+
43#include " module_base/constants.h"
54#include " module_base/libm/libm.h"
65#include " module_base/math_ylmreal.h"
6+ #include " module_base/module_device/device.h"
77#include " module_base/parallel_reduce.h"
88#include " module_base/timer.h"
9- #include " module_base/module_device/device.h"
9+ #include " module_hamilt_general/module_xc/xc_functional.h"
10+ #include " module_parameter/parameter.h"
1011
1112namespace elecstate {
1213
@@ -41,7 +42,7 @@ ElecStatePW<T, Device>::~ElecStatePW()
4142 delmem_complex_op ()(this ->rhog_data );
4243 delete[] this ->rhog ;
4344 }
44- if (get_xc_func_type () == 3 || PARAM.inp .out_elf [0 ] > 0 )
45+ if (XC_Functional::get_func_type () == 3 || PARAM.inp .out_elf [0 ] > 0 )
4546 {
4647 delmem_var_op ()(this ->kin_r_data );
4748 delete[] this ->kin_r ;
@@ -80,7 +81,7 @@ void ElecStatePW<T, Device>::init_rho_data()
8081 this ->rhog [ii] = this ->rhog_data + ii * this ->charge ->rhopw ->npw ;
8182 }
8283 }
83- if (get_xc_func_type () == 3 || PARAM.inp .out_elf [0 ] > 0 )
84+ if (XC_Functional::get_func_type () == 3 || PARAM.inp .out_elf [0 ] > 0 )
8485 {
8586 this ->kin_r = new Real*[this ->charge ->nspin ];
8687 resmem_var_op ()(this ->kin_r_data , this ->charge ->nspin * this ->charge ->nrxx );
@@ -96,7 +97,7 @@ void ElecStatePW<T, Device>::init_rho_data()
9697 {
9798 this ->rhog = reinterpret_cast <T**>(this ->charge ->rhog );
9899 }
99- if (get_xc_func_type () == 3 || PARAM.inp .out_elf [0 ] > 0 )
100+ if (XC_Functional::get_func_type () == 3 || PARAM.inp .out_elf [0 ] > 0 )
100101 {
101102 this ->kin_r = reinterpret_cast <Real **>(this ->charge ->kin_r );
102103 }
@@ -119,7 +120,7 @@ void ElecStatePW<T, Device>::psiToRho(const psi::Psi<T, Device>& psi)
119120 // denghui replaced at 20221110
120121 // ModuleBase::GlobalFunc::ZEROS(this->rho[is], this->charge->nrxx);
121122 setmem_var_op ()(this ->rho [is], 0 , this ->charge ->nrxx );
122- if (get_xc_func_type () == 3 )
123+ if (XC_Functional::get_func_type () == 3 )
123124 {
124125 // ModuleBase::GlobalFunc::ZEROS(this->charge->kin_r[is], this->charge->nrxx);
125126 setmem_var_op ()(this ->kin_r [is], 0 , this ->charge ->nrxx );
@@ -143,7 +144,7 @@ void ElecStatePW<T, Device>::psiToRho(const psi::Psi<T, Device>& psi)
143144 for (int ii = 0 ; ii < PARAM.inp .nspin ; ii++)
144145 {
145146 castmem_var_d2h_op ()(this ->charge ->rho [ii], this ->rho [ii], this ->charge ->nrxx );
146- if (get_xc_func_type () == 3 )
147+ if (XC_Functional::get_func_type () == 3 )
147148 {
148149 castmem_var_d2h_op ()(this ->charge ->kin_r [ii], this ->kin_r [ii], this ->charge ->nrxx );
149150 }
@@ -240,7 +241,7 @@ void ElecStatePW<T, Device>::rhoBandK(const psi::Psi<T, Device>& psi)
240241 }
241242
242243 // kinetic energy density
243- if (get_xc_func_type () == 3 )
244+ if (XC_Functional::get_func_type () == 3 )
244245 {
245246 for (int j = 0 ; j < 3 ; j++)
246247 {
0 commit comments