Skip to content

Improve tests for ODE integrators and fix typos in tableaus

Vicentini Filippo requested to merge tevo-tests into master

Created by: femtobit

Prompted by #1056 (closed), this PR

  1. fixes the typo in the RK4 tableau reported in the issue linked above. The typo was on the diagonal of the a matrix of the RK tableau. a is supposed to be a strictly lower triangular matrix and only those parts affect the result of tableau.step, so the typo did not cause any error in the actual results computed by the solver.
  2. improves the tests for fixed-step ODE solvers to be more sensitive to errors in the tableaus. In particular, the previous tests are insensitive to errors in tableau.a, even those in the lower triangle which would affect results if present.
  3. adds a test case test_tableau which does some sanity checks on the tableaus themselves (such as asserting a is strictly lower triangular).
  4. Fixes a typo in bt_feuler, which is fixed-step but did have a 2-dimensional b. This also should not have affected results, but is conceptually incorrect.

Merge request reports