Skip to content

Commit 16d8b9f

Browse files
committed
Fix off-by-one error in radial interpolation boundary check
1 parent 3e1fe15 commit 16d8b9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/source_lcao/module_rt/snap_psibeta_half_tddft.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ inline double interpolate_radial(
5353
int iq = static_cast<int>(position);
5454

5555
// Boundary check safe-guard
56-
if (iq >= mesh - 4) return 0.0;
56+
if (iq > mesh - 4) return 0.0;
5757

5858
const double x0 = position - static_cast<double>(iq);
5959
const double x1 = 1.0 - x0;

0 commit comments

Comments
 (0)