Skip to content

Commit 5199f78

Browse files
rootroot
authored andcommitted
modify diago_cg_test.cpp
1 parent 15422e7 commit 5199f78

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

source/src_pw/test/diago_cg_test.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,9 @@ class DiagoCGPrepare
7575
{
7676
for (int j = 0; j < npw; j++)
7777
{
78-
// psiguess(i,j) = ev(j,i)*(1+u(p)/10.);
79-
psiguess(i, j) = ev(j, i) * u(p) / 10.;
78+
double rand = static_cast<double>(u(p))/10.;
79+
// psiguess(i,j) = ev(j,i)*(1+rand);
80+
psiguess(i, j) = ev(j, i) * rand;
8081
}
8182
}
8283
// run cg

0 commit comments

Comments
 (0)