1.. _breaking_changes: 2 3Breaking changes 4================ 5 6.. _bchanges_0_16_0: 7 80.16.0 9------ 10 11- The ``pairwise_sum()`` function has been replaced 12 by a new function called ``sum()`` with similar semantics. 13 ``sum()`` should behave as a drop-in replacement 14 for ``pairwise_sum()``. 15- The tuple returned by the ``propagate_for/until()`` functions 16 in a scalar integrator has now 5 elements, rather than 4. 17 The new return value at index 4 is the :ref:`continuous output <tut_c_output>` 18 function object. This change can break code which assumes 19 that the tuple returned by the ``propagate_for/until()`` functions 20 has a size of 4, such as: 21 22 .. code-block:: c++ 23 24 auto [r0, r1, r2, r3] = ta.propagate_until(...); 25 26 The fix should be straightforward in most cases, e.g.: 27 28 .. code-block:: c++ 29 30 auto [r0, r1, r2, r3, r4] = ta.propagate_until(...); 31 32 Similarly, the ``propagate_for/until()`` functions in a batch integrator, 33 which previously returned nothing, now return the :ref:`continuous output <tut_c_output>` 34 function object. 35 36.. _bchanges_0_15_0: 37 380.15.0 39------ 40 41- The function class now uses reference 42 semantics. This means that copy operations on 43 non-trivial expressions now result in shallow copies, 44 not deep copies (as it was previously the case). 45 This change does not have repercussions on the 46 integrators' API, but user code manipulating expressions 47 may need to be adapted. 48 49.. _bchanges_0_10_0: 50 510.10.0 52------ 53 54- The callback that can (optionally) be passed to 55 the ``propagate_*()`` functions must now return 56 a ``bool`` indicating whether the integration should 57 continue or not. The callback used to return ``void``. 58 59.. _bchanges_0_8_0: 60 610.8.0 62----- 63 64- The direction of a non-terminal event is now specified 65 with the (optional) keyword argument ``direction`` for 66 the event's constructor (whereas before the direction 67 could be specified via an unnamed argument). 68- An ``int`` argument has been appended to the signature of 69 the events' callbacks. This new argument represents the sign 70 of the derivative of the event equation at the event trigger 71 time, and its value will be -1 for negative derivative, 72 1 for positive derivative and 0 for zero derivative. 73