Skip to content

fix: rk23 coefficient#17

Merged
aftix merged 4 commits intoaftix:masterfrom
bluthej:fix/rk23-coefficient
Sep 16, 2025
Merged

fix: rk23 coefficient#17
aftix merged 4 commits intoaftix:masterfrom
bluthej:fix/rk23-coefficient

Conversation

@bluthej
Copy link
Copy Markdown
Contributor

@bluthej bluthej commented Sep 10, 2025

While looking at the code I noticed that the last error coefficient for the RK3(2) scheme was missing a minus sign.

This wasn't noticed because there was no unit test for this solver and because the doc tests do not actually run since the function that's supposed to execute code is called example instead of main. Without the minus sign, the RK5(4) tests fail for RK3(2). BTW, neither the RK5(4) example nor the RK3(2) example (even after fixing the sign) runs successfully (I'm not sure why, the tests in the test module do run successfully).

I took that opportunity to fix the doc comment for the RK3(2) scheme which had 5(4) in it.

Note that after a bit of tinkering I was able to leverage rstest to make the RK tests parametrized over the solver so as to avoid code duplication (finding the right type with the right generics wasn't easy...).

@aftix
Copy link
Copy Markdown
Owner

aftix commented Sep 16, 2025

CI error is due to the setup python action no longer supporting 3.7.

Merging, thanks. I'll push it to crates.io later.

@aftix aftix merged commit c47de77 into aftix:master Sep 16, 2025
14 of 15 checks passed
@aftix aftix mentioned this pull request Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants