Skip to content

Commit a6040ec

Browse files
committed
Initialize double aa, bb in bandenergy.cpp
1 parent e45398a commit a6040ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/module_hamilt_lcao/module_tddft/bandenergy.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ void compute_ekb(const Parallel_Orbitals* pv,
8383
{
8484
for (int j = 0; j < pv->ncol_bands; j++)
8585
{
86-
double aa, bb;
86+
double aa = 0.0, bb = 0.0;
8787
aa = Eij[i * pv->ncol + j].real();
8888
bb = Eij[i * pv->ncol + j].imag();
8989
if (std::abs(aa) < Evolve_elec::td_print_eij)
@@ -211,7 +211,7 @@ void compute_ekb_tensor(const Parallel_Orbitals* pv,
211211
{
212212
for (int j = 0; j < pv->ncol_bands; j++)
213213
{
214-
double aa, bb;
214+
double aa = 0.0, bb = 0.0;
215215
aa = Eij.data<std::complex<double>>()[i * pv->ncol + j].real();
216216
bb = Eij.data<std::complex<double>>()[i * pv->ncol + j].imag();
217217
if (std::abs(aa) < Evolve_elec::td_print_eij)

0 commit comments

Comments
 (0)