-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
There seems to be a copy-paste error in the setupInterpolator() function of the BicubicInterpolator class.
The code snippet computing the finite difference approximations of
jm = std::max(j, 0);
jp = std::min(j + 2, jN - 1);
dy = ((*Y)(jp) - (*Y)(jm)) / yL;
fp = (*Z)(i, jp);
fm = (*Z)(i, jm);
fy01 = (fp - fm) / dx; // <<<<<< This is wrong
fp = (*Z)(i + 1, jp);
fm = (*Z)(i + 1, jm);
fy11 = (fp - fm) / dx; // <<<<<< This is wrongThe two expressions assigning the final values, fy01 = (fp - fm) / dx and fy11 = (fp - fm) / dx, are using the wrong denominator dx. Since they are expressions for the derivative in y direction, the correct denominator should be dy (as correctly used in the computation of
Metadata
Metadata
Assignees
Labels
No labels