Line data Source code
1 0 : // Distributed under the MIT License. 2 : // See LICENSE.txt for details. 3 : 4 : #pragma once 5 : 6 : #include <complex> 7 : 8 : /// \cond 9 : class ComplexDataVector; 10 : class DataVector; 11 : class StepperErrorTolerances; 12 : /// \endcond 13 : 14 : /*! 15 : * \ingroup TimeGroup 16 : * \brief Calculate the pointwise worst error. 17 : * 18 : * \details For a `double`, or `std::complex<double>`, calculates 19 : * 20 : * \f{equation} 21 : * \frac{e}{a + r \max(|v|, |v + e|)} 22 : * \f} 23 : * 24 : * where $v$ is \p values, $e$ is \p errors, and $a$ and $r$ are the 25 : * tolerances from \p tolerances. For vector types, calculates the 26 : * largest error over all the points. 27 : */ 28 : /// @{ 29 1 : double largest_stepper_error(double values, double errors, 30 : const StepperErrorTolerances& tolerances); 31 1 : double largest_stepper_error(const std::complex<double>& values, 32 : const std::complex<double>& errors, 33 : const StepperErrorTolerances& tolerances); 34 1 : double largest_stepper_error(const DataVector& values, const DataVector& errors, 35 : const StepperErrorTolerances& tolerances); 36 1 : double largest_stepper_error(const ComplexDataVector& values, 37 : const ComplexDataVector& errors, 38 : const StepperErrorTolerances& tolerances); 39 : /// @}