Skip to content

Commit aa4ceb1

Browse files
[pre-commit.ci lite] apply automatic fixes
1 parent eee8b75 commit aa4ceb1

File tree

1 file changed

+16
-8
lines changed
  • source/module_hamilt_lcao/module_tddft

1 file changed

+16
-8
lines changed

source/module_hamilt_lcao/module_tddft/upsi.cpp

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,12 @@ void upsi(const Parallel_Orbitals* pv,
4949
double aa, bb;
5050
aa = psi_k[i * pv->ncol + j].real();
5151
bb = psi_k[i * pv->ncol + j].imag();
52-
if (std::abs(aa) < 1e-8)
52+
if (std::abs(aa) < 1e-8) {
5353
aa = 0.0;
54-
if (std::abs(bb) < 1e-8)
54+
}
55+
if (std::abs(bb) < 1e-8) {
5556
bb = 0.0;
57+
}
5658
GlobalV::ofs_running << aa << "+" << bb << "i ";
5759
}
5860
GlobalV::ofs_running << std::endl;
@@ -66,10 +68,12 @@ void upsi(const Parallel_Orbitals* pv,
6668
double aa, bb;
6769
aa = psi_k_laststep[i * pv->ncol + j].real();
6870
bb = psi_k_laststep[i * pv->ncol + j].imag();
69-
if (std::abs(aa) < 1e-8)
71+
if (std::abs(aa) < 1e-8) {
7072
aa = 0.0;
71-
if (std::abs(bb) < 1e-8)
73+
}
74+
if (std::abs(bb) < 1e-8) {
7275
bb = 0.0;
76+
}
7377
GlobalV::ofs_running << aa << "+" << bb << "i ";
7478
}
7579
GlobalV::ofs_running << std::endl;
@@ -118,10 +122,12 @@ void upsi_tensor(const Parallel_Orbitals* pv,
118122
double aa, bb;
119123
aa = psi_k.data<std::complex<double>>()[i * pv->ncol + j].real();
120124
bb = psi_k.data<std::complex<double>>()[i * pv->ncol + j].imag();
121-
if (std::abs(aa) < 1e-8)
125+
if (std::abs(aa) < 1e-8) {
122126
aa = 0.0;
123-
if (std::abs(bb) < 1e-8)
127+
}
128+
if (std::abs(bb) < 1e-8) {
124129
bb = 0.0;
130+
}
125131
GlobalV::ofs_running << aa << "+" << bb << "i ";
126132
}
127133
GlobalV::ofs_running << std::endl;
@@ -135,10 +141,12 @@ void upsi_tensor(const Parallel_Orbitals* pv,
135141
double aa, bb;
136142
aa = psi_k_laststep.data<std::complex<double>>()[i * pv->ncol + j].real();
137143
bb = psi_k_laststep.data<std::complex<double>>()[i * pv->ncol + j].imag();
138-
if (std::abs(aa) < 1e-8)
144+
if (std::abs(aa) < 1e-8) {
139145
aa = 0.0;
140-
if (std::abs(bb) < 1e-8)
146+
}
147+
if (std::abs(bb) < 1e-8) {
141148
bb = 0.0;
149+
}
142150
GlobalV::ofs_running << aa << "+" << bb << "i ";
143151
}
144152
GlobalV::ofs_running << std::endl;

0 commit comments

Comments
 (0)