@@ -80,7 +80,7 @@ void Charge::destroy()
80
80
delete[] _space_rhog_save;
81
81
delete[] _space_kin_r;
82
82
delete[] _space_kin_r_save;
83
- if (elecstate::get_xc_func_type () == 3 || elecstate::get_xc_func_type () == 5 || PARAM.inp .out_elf )
83
+ if (elecstate::get_xc_func_type () == 3 || elecstate::get_xc_func_type () == 5 || PARAM.inp .out_elf [ 0 ] > 0 )
84
84
{
85
85
delete[] kin_r;
86
86
delete[] kin_r_save;
@@ -121,7 +121,7 @@ void Charge::allocate(const int& nspin_in)
121
121
_space_rho_save = new double [nspin * nrxx];
122
122
_space_rhog = new std::complex<double >[nspin * ngmc];
123
123
_space_rhog_save = new std::complex<double >[nspin * ngmc];
124
- if (elecstate::get_xc_func_type () == 3 || elecstate::get_xc_func_type () == 5 || PARAM.inp .out_elf )
124
+ if (elecstate::get_xc_func_type () == 3 || elecstate::get_xc_func_type () == 5 || PARAM.inp .out_elf [ 0 ] > 0 )
125
125
{
126
126
_space_kin_r = new double [nspin * nrxx];
127
127
_space_kin_r_save = new double [nspin * nrxx];
@@ -130,7 +130,7 @@ void Charge::allocate(const int& nspin_in)
130
130
rhog = new std::complex<double >*[nspin];
131
131
rho_save = new double *[nspin];
132
132
rhog_save = new std::complex<double >*[nspin];
133
- if (elecstate::get_xc_func_type () == 3 || elecstate::get_xc_func_type () == 5 || PARAM.inp .out_elf )
133
+ if (elecstate::get_xc_func_type () == 3 || elecstate::get_xc_func_type () == 5 || PARAM.inp .out_elf [ 0 ] > 0 )
134
134
{
135
135
kin_r = new double *[nspin];
136
136
kin_r_save = new double *[nspin];
@@ -151,7 +151,7 @@ void Charge::allocate(const int& nspin_in)
151
151
ModuleBase::GlobalFunc::ZEROS (rhog[is], ngmc);
152
152
ModuleBase::GlobalFunc::ZEROS (rho_save[is], nrxx);
153
153
ModuleBase::GlobalFunc::ZEROS (rhog_save[is], ngmc);
154
- if (elecstate::get_xc_func_type () == 3 || elecstate::get_xc_func_type () == 5 || PARAM.inp .out_elf )
154
+ if (elecstate::get_xc_func_type () == 3 || elecstate::get_xc_func_type () == 5 || PARAM.inp .out_elf [ 0 ] > 0 )
155
155
{
156
156
kin_r[is] = _space_kin_r + is * nrxx;
157
157
ModuleBase::GlobalFunc::ZEROS (kin_r[is], nrxx);
@@ -171,7 +171,7 @@ void Charge::allocate(const int& nspin_in)
171
171
ModuleBase::Memory::record (" Chg::rho_save" , sizeof (double ) * nspin * nrxx);
172
172
ModuleBase::Memory::record (" Chg::rhog" , sizeof (double ) * nspin * ngmc);
173
173
ModuleBase::Memory::record (" Chg::rhog_save" , sizeof (double ) * nspin * ngmc);
174
- if (elecstate::get_xc_func_type () == 3 || elecstate::get_xc_func_type () == 5 || PARAM.inp .out_elf )
174
+ if (elecstate::get_xc_func_type () == 3 || elecstate::get_xc_func_type () == 5 || PARAM.inp .out_elf [ 0 ] > 0 )
175
175
{
176
176
ModuleBase::Memory::record (" Chg::kin_r" , sizeof (double ) * nspin * ngmc);
177
177
ModuleBase::Memory::record (" Chg::kin_r_save" , sizeof (double ) * nspin * ngmc);
0 commit comments