jacobwilliams/finterp

`linear_interp_*` type allow `intent(in)` in `evaluate` method

epagone opened this issue · 1 comments

The evaluate method of a linear_interp_* object in a procedure, requires the latter to be intent(inout) while I would like to make sure that it is intent(in) to avoid accidental modification of the input arrays used for the interpolation. Furthermore, evaluate only returns a real variable, nothing user-facing is changed in the object.

No, it has to be inout because of the dintrv function, so it can keep track of the last element accessed. This makes it way more efficient that having to do the search every time from scratch.