Skip to content

Commit e862fd8

Browse files
author
Kai Luo
committed
Refactor RDMFT class: Remove unnecessary line and initialize E_RDMFT array with explicit values
1 parent 3ac2041 commit e862fd8

File tree

1 file changed

+3
-4
lines changed
  • source/source_lcao/module_rdmft

1 file changed

+3
-4
lines changed

source/source_lcao/module_rdmft/rdmft.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ namespace rdmft
4141
template <typename TK, typename TR>
4242
class RDMFT
4343
{
44-
4544
public:
4645
RDMFT();
4746
~RDMFT();
@@ -75,7 +74,7 @@ class RDMFT
7574
psi::Psi<TK> occNum_HamiltWfc;
7675

7776
//! E_RDMFT[4] stores ETV, Ehartree, Exc, Etotal
78-
mutable double E_RDMFT[4] = {0.0};
77+
mutable double E_RDMFT[4] = {0.0, 0.0, 0.0, 0.0};
7978
mutable double Etotal = 0.0;
8079
// std::vector<double> E_RDMFT(4);
8180

@@ -184,8 +183,8 @@ class RDMFT
184183
bool exx_spacegroup_symmetry = false;
185184
#endif
186185

187-
mutable double etxc = 0.0;
188-
mutable double vtxc = 0.0;
186+
double etxc = 0.0;
187+
double vtxc = 0.0;
189188
bool only_exx_type = false;
190189
const int cal_E_type = 1; // cal_type = 2 just support XC-functional without exx
191190

0 commit comments

Comments
 (0)