Skip to content

Commit 32a204a

Browse files
committed
fix bug in BPCG
1 parent 7ddd28f commit 32a204a

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

source/module_hsolver/diago_bpcg.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ void DiagoBPCG<T, Device>::line_minimize(
9696
ct::Tensor& psi_out,
9797
ct::Tensor& hpsi_out)
9898
{
99-
line_minimize_with_block_op()(grad_in.data<T>(), hgrad_in.data<T>(), psi_out.data<T>(), hpsi_out.data<T>(), this->n_basis, this->n_basis, this->n_band_l);
99+
line_minimize_with_block_op()(grad_in.data<T>(), hgrad_in.data<T>(), psi_out.data<T>(), hpsi_out.data<T>(), this->n_dim, this->n_basis, this->n_band_l);
100100
}
101101

102102

@@ -142,7 +142,7 @@ void DiagoBPCG<T, Device>::calc_grad_with_block(
142142
hpsi_in.data<T>(),
143143
grad_out.data<T>(),
144144
grad_old_out.data<T>(),
145-
this->n_basis,
145+
this->n_dim,
146146
this->n_basis,
147147
this->n_band_l);
148148
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
etotref -4869.74705201
2-
etotperatomref -2434.87352600
3-
totalforceref 5.19522000
4-
totalstressref 37241.49490600
1+
etotref -4869.7470520063843651
2+
etotperatomref -2434.8735260032
3+
totalforceref 5.194830
4+
totalstressref 37241.448435
55
pointgroupref C_1
66
spacegroupref C_1
77
nksibzref 8
8-
totaltimeref 10.37
8+
totaltimeref 5.42

0 commit comments

Comments
 (0)