Skip to content

Commit 2eab680

Browse files
committed
fix compile bug
1 parent 89d8344 commit 2eab680

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

source/source_estate/module_charge/charge_mixing_residual.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ double Charge_Mixing::inner_product_recip_rho(std::complex<double>* rho1, std::c
213213
sum += (conj(rhog1[0][ig]) * rhog2[0][ig]).real() / this->rhopw->gg[ig];
214214
}
215215
sum *= fac;
216-
const int ig0 = this->rhopw->ig_gge0;
217216
if (ig0 > 0)
218217
{
219218
sum += fac2
@@ -421,7 +420,6 @@ double Charge_Mixing::inner_product_recip_hartree(std::complex<double>* rhog1, s
421420
sum += (conj(rhog1[ig]) * rhog2[ig]).real() / this->rhopw->gg[ig];
422421
}
423422
sum *= fac;
424-
const int ig0 = this->rhopw->ig_gge0;
425423
if (ig0 > 0)
426424
{
427425
sum += fac2

source/source_pw/module_pwdft/stress_func_cc.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ void Stress_Func<FPTYPE, Device>::stress_cc(ModuleBase::matrix& sigma,
167167
{
168168
for (int m = 0;m< 3;m++)
169169
{
170+
const FPTYPE norm_g = sqrt(rho_basis->gg[ig]);
170171
const std::complex<FPTYPE> t
171172
= conj(psic[ig]) * p_sf->strucFac(nt, ig) * rhocg[rho_basis->ig2igg[ig]]
172173
* ucell.tpiba * rho_basis->gcar[ig][l] * rho_basis->gcar[ig][m] / norm_g * fact;

source/source_pw/module_pwdft/stress_func_har.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void Stress_Func<FPTYPE, Device>::stress_har(const UnitCell& ucell,
7272
{
7373
continue;
7474
}
75-
75+
const FPTYPE g2 = rho_basis->gg[ig];
7676
FPTYPE shart= ( conj( aux[ig] ) * aux[ig] ).real()/(ucell.tpiba2 * g2);
7777
for(int l=0;l<3;l++)
7878
{

0 commit comments

Comments
 (0)