BUG: Wrong First extrapolated value of the merit function (fixes #1948)

Merged Vaggelis Papoutsis requested to merge bug-1948-wrong-first-merit-function-value into master

Affected only the first optimisation cycle, if line search was enabled

If eta was not set explicitly, it was computed after evaluating the directional derivative of the merit function, which was computed wrongly, leading to an erroneous value of the extrapolated merit function value.

Merge request reports