Linear interpolator only works for minimal shapes and trivial extensions
Due to bad unit test design, a silly bug in the code of the linear interpolator went unnoticed. The interpolator yields wrong results whenever the extensions into one direction are not
1.0, and the shape is larger than
Index queries in the linear interpolator were done with the actual coordinates instead of the coordinates in "mesh dimensions".
Steps to reproduce
Using any dataset that does not have the minimal shape or that is interpolated onto a grid with non-trivial extensions leads to a wrong result. In this case, I used a very simple dataset as input, but the result was off (see below).
The issue is caused by calling
get_knot_indices() with the wrong argument
pos instead of
Relevant logs, screenshots, files...?
results in the initial condition:
Ideas how to fix this?
pos_unit and improve the unit test to capture the expected behavior better.