Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Allow for Alternative and Custom ODE Solvers. #748

Merged
merged 3 commits into from
Dec 7, 2024

Conversation

phmbressan
Copy link
Collaborator

Pull request type

  • Code changes (bugfix, features)

Checklist

  • Tests for the changes have been added (if needed)
  • Docs have been reviewed and added / updated
  • Lint (black rocketpy/ tests/) has passed locally
  • All tests (pytest tests -m slow --runslow) have passed locally
  • CHANGELOG.md has been updated (if relevant)

Current behavior

Currently only LSODA is used to integrate the equations of motion of the Flight class, with no option for other solvers or custom code.

New behavior

This PR adds the possibility of using different solvers from scipy.integrate API.

Breaking change

  • Yes
  • No

Additional information

LSODA, of course, remains the default option and the strongly recommended one. Quick testing showed that other solvers might match LSODA speed, but require more tuning to avoid instabilities.

@phmbressan phmbressan added Enhancement New feature or request, including adjustments in current codes Flight Flight Class related features labels Dec 6, 2024
@phmbressan phmbressan added this to the Release v1.X.0 milestone Dec 6, 2024
@phmbressan phmbressan self-assigned this Dec 6, 2024
@phmbressan phmbressan requested a review from a team as a code owner December 6, 2024 21:51
Copy link

codecov bot commented Dec 6, 2024

Codecov Report

Attention: Patch coverage is 70.58824% with 5 lines in your changes missing coverage. Please review.

Project coverage is 76.42%. Comparing base (e3f1a15) to head (83aa20e).
Report is 11 commits behind head on develop.

Files with missing lines Patch % Lines
rocketpy/simulation/flight.py 70.58% 5 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #748   +/-   ##
========================================
  Coverage    76.41%   76.42%           
========================================
  Files           95       95           
  Lines        11088    11090    +2     
========================================
+ Hits          8473     8475    +2     
  Misses        2615     2615           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

rocketpy/simulation/flight.py Show resolved Hide resolved
rocketpy/simulation/flight.py Outdated Show resolved Hide resolved
rocketpy/simulation/flight.py Show resolved Hide resolved
@phmbressan phmbressan merged commit 1e06469 into develop Dec 7, 2024
7 checks passed
@phmbressan phmbressan deleted the enh/new-ode-solvers branch December 7, 2024 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request, including adjustments in current codes Flight Flight Class related features
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

2 participants