Closed SouthEndMusic closed 1 week ago
I smelled something fishy when I found out that on this branch the AGV model takes 3-4x longer than on main. No tests are failing, and noting remarkable shows up in the profile. So I investigated a bit, and I found that the profile for certain basins behaves weird in the old code:
I haven't figured out what triggers this yet, but apparently it doesn't happen in our test models, at least not where tests depend on it. I'm pretty sure the new code (in SmoothInterpolation
) is more correct and robust because it is tested more elaborately.
Fixes https://github.com/Deltares/Ribasim/issues/1482 Fixes https://github.com/Deltares/Ribasim/issues/566
SmoothedLinearInterpolation
which is aLinearInterpolation
. The only new interpolation type used in the simulation isLinearInterpolationIntInv
, which is a much more concise implementation of what was inget_area_and_level
SmoothedLinearInterpolation
is that we can get rid of quite some utility code, also partly because of making more use of derivatives and integrals viaDataInterpolations.jl