issp-center-dev / HPhi

Quantum Lattice Model Simulator Package
https://www.pasums.issp.u-tokyo.ac.jp/hphi/en/
GNU General Public License v3.0
91 stars 25 forks source link

possible bug in readdef.c #37

Closed tmisawa closed 6 years ago

tmisawa commented 6 years ago

In readef.c (940th line), LanczosTarget is checked by the following function:

ValidateValue(X->LanczosTarget, X->k_exct, X->Lanczos_max)

This means that LanczosTarget <= k_exc && LanczosTarget >= Lanczos_max. But, the second condition is wrong because LanczosTarget has no relation with Lanczos_max.

tmisawa commented 6 years ago

I fixed a bug. Please check it.

k-yoshimi commented 6 years ago

@tmisawa This modification seems to be wrong. When X->LanczosTarget > X->k_exct , HPhi is always terminated. Please fix it.

tmisawa commented 6 years ago

@k-yoshimi

When X->LanczosTarget > X->k_exct , HPhi is always terminated.

I think this is correct, because HPhi does not calculate the eigenvalues larger than X-> k_exct,

k-yoshimi commented 6 years ago

In ver.3.1.0, this bug is fixed.