Skip to content

Commit b619ab7

Browse files
committed
Fix copy-paste mistake in CubicSplineInterpolator integration function
1 parent df47148 commit b619ab7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libInterpolate/Interpolators/_1D/CubicSplineInterpolator.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ Real CubicSplineInterpolator<Real>::integral(Real _a, Real _b) const {
228228
sum -= static_cast<Real>(
229229
(x_2 - x_1) *
230230
((t - 0.5 * t2) * y_1 + 0.5 * t2 * y_2 +
231-
a[bi - 1] * (0.5 * t2 - 2. * t3 / 3. + 0.25 * t4) +
232-
b[bi - 1] * (t3 / 3. - 0.25 * t4)));
231+
a[ai - 1] * (0.5 * t2 - 2. * t3 / 3. + 0.25 * t4) +
232+
b[ai - 1] * (t3 / 3. - 0.25 * t4)));
233233

234234
if (ai != bi) // _a and _b are not in the in the same element, need to add
235235
// area of element containing _a

0 commit comments

Comments
 (0)