Skip to content

Add RKF78 adaptive integrator#339

Merged
duncaneddy merged 9 commits into
duncaneddy:mainfrom
Mtrya:feat/rkf78-integrator
May 22, 2026
Merged

Add RKF78 adaptive integrator#339
duncaneddy merged 9 commits into
duncaneddy:mainfrom
Mtrya:feat/rkf78-integrator

Conversation

@Mtrya
Copy link
Copy Markdown
Contributor

@Mtrya Mtrya commented May 21, 2026

Pull Request

Description

Adds a Runge-Kutta-Fehlberg 7(8) adaptive integrator and exposes it through the Rust integrator factory, numerical propagation configuration, Python bindings, Python facade, tests, examples, and documentation.

Changelog

Added

  • Add RKF78 / RKF78Integrator support for high-order adaptive integration in Rust and Python.
  • Add RKF78 tests, examples, and API/reference documentation.

Changed

  • Extend numerical propagation integrator selection and comparison examples to include RKF78.

Note to Reviewers

Validation run locally:

  • cargo test
  • uv pip install -e . && .venv/bin/python -m pytest tests/ -v
  • cargo clippy --all-targets --all-features -- -D warnings
  • ruff check
  • ./scripts/generate_stubs.sh

@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

❌ Patch coverage is 96.36570% with 64 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.46%. Comparing base (3037edf) to head (04ebd68).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
src/integrators/rkf78.rs 95.79% 64 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #339      +/-   ##
==========================================
- Coverage   94.88%   94.46%   -0.42%     
==========================================
  Files         186      187       +1     
  Lines       86070    87825    +1755     
==========================================
+ Hits        81666    82964    +1298     
- Misses       4404     4861     +457     
Flag Coverage Δ
python 94.70% <ø> (ø)
python-rust 65.76% <68.57%> (-1.55%) ⬇️
rust-unit 93.83% <96.36%> (-0.42%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
brahe/integrators.py 100.00% <ø> (ø)
brahe/propagators.py 100.00% <ø> (ø)
src/integrators/butcher_tableau.rs 93.78% <100.00%> (+2.83%) ⬆️
src/integrators/traits.rs 97.41% <100.00%> (+0.06%) ⬆️
src/propagators/dnumerical_orbit_propagator.rs 95.17% <100.00%> (-1.21%) ⬇️
src/propagators/dnumerical_propagator.rs 91.43% <ø> (ø)
src/propagators/numerical_propagation_config.rs 100.00% <100.00%> (ø)
src/time/epoch.rs 98.51% <100.00%> (-0.64%) ⬇️
src/integrators/rkf78.rs 95.79% <95.79%> (ø)

... and 13 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Mtrya Mtrya marked this pull request as ready for review May 21, 2026 13:21
@duncaneddy
Copy link
Copy Markdown
Owner

This is awesome! It's a bit of a larger PR, so will take me a little bit to go through it all, but given your past work and all checks pass I have high confidence there won't be much if anything at all. I hope to get to it by end of week.

Thank you yet again for a great contribution to improving the package!

Copy link
Copy Markdown
Owner

@duncaneddy duncaneddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks great. I pushed two small changes fixing adding the library API reference into the navbar (annoying little chore that I haven't figured out how to auto-generate while still allowing for overrides), and adding a link to the coefficient source.

Just one comment on the DynamicsEvaluationContext I'd like to have a quick discussion about or remove.

Comment thread docs/library_api/integrators/rkf78.md
Comment thread src/integrators/butcher_tableau.rs
Comment thread src/propagators/dnumerical_orbit_propagator.rs Outdated
Comment thread src/integrators/butcher_tableau.rs
@duncaneddy duncaneddy merged commit 706925c into duncaneddy:main May 22, 2026
31 checks passed
@Mtrya Mtrya deleted the feat/rkf78-integrator branch May 22, 2026 06:22
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