BUG: First extrapolated value of the merit function is computed wrongly
Summary
In an adjoint-based optimisation, if the step value (eta) is not set explicitly, it is computed after evaluating the directional derivative of the merit function, which, in turn, is computed wrongly, leading to an erroneous value of the extrapolated merit function value.
Affects only the first optimisation cycle, if line search is enabled, so the bug should appear rather rarely.