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

change remove independent variables setting to False by default #4020

Merged
merged 7 commits into from
Apr 19, 2024

Conversation

valentinsulzer
Copy link
Member

@valentinsulzer valentinsulzer commented Apr 17, 2024

Description

Been meaning to do this for a while due to hard-to-fix bugs such as #2528 . #4019 was good motivation.

To set the setting to True (which can speed up the simulation, especially during the rest period), do

pybamm.Simulation(..., discretisation_kwargs={"remove_independent_variables_from_rhs": True)

Fixes #2528

Type of change

Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist:

  • No style issues: $ pre-commit run (or $ nox -s pre-commit) (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)
  • All tests pass: $ python run-tests.py --all (or $ nox -s tests)
  • The documentation builds: $ python run-tests.py --doctest (or $ nox -s doctests)

You can run integration tests, unit tests, and doctests together at once, using $ python run-tests.py --quick (or $ nox -s quick).

Further checks:

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

Copy link

codecov bot commented Apr 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.59%. Comparing base (61bc39b) to head (e07223d).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4020   +/-   ##
========================================
  Coverage    99.59%   99.59%           
========================================
  Files          258      258           
  Lines        21306    21310    +4     
========================================
+ Hits         21219    21223    +4     
  Misses          87       87           

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

Copy link
Sponsor Member

@brosaplanella brosaplanella left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@valentinsulzer valentinsulzer marked this pull request as draft April 18, 2024 00:55
@valentinsulzer
Copy link
Member Author

Converted to draft as I will work on fixing coverage

@valentinsulzer valentinsulzer marked this pull request as ready for review April 19, 2024 19:33
@valentinsulzer valentinsulzer merged commit 90c1c35 into develop Apr 19, 2024
38 of 40 checks passed
@valentinsulzer valentinsulzer deleted the change-remove-independent-vars-default branch April 19, 2024 19:33
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.

"Throughput capacity [A.h]" is different for sol.cycles[0] and sol.cycles[0].steps[0]
2 participants