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

#2331 fix bug in size of yS numpy array when simulation stops early #2337

Merged
merged 6 commits into from
Oct 6, 2022

Conversation

martinjrobins
Copy link
Contributor

Description

fix bug in size of yS numpy array when simulation stops early

Fixes #2331

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Key checklist:

  • No style issues: $ flake8
  • All tests pass: $ python run-tests.py --unit
  • The documentation builds: $ cd docs and then $ make clean; make html

You can run all three at once, using $ python run-tests.py --quick.

Further checks:

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

@codecov
Copy link

codecov bot commented Oct 4, 2022

Codecov Report

Base: 99.64% // Head: 99.64% // No change to project coverage 👍

Coverage data is based on head (a6bb115) compared to base (cf03cf9).
Patch has no changes to coverable lines.

❗ Current head a6bb115 differs from pull request most recent head 25d1d0b. Consider uploading reports for the commit 25d1d0b to get more accurate results

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2337   +/-   ##
========================================
  Coverage    99.64%   99.64%           
========================================
  Files          361      361           
  Lines        19918    19918           
========================================
  Hits         19847    19847           
  Misses          71       71           
Impacted Files Coverage Δ
pybamm/solvers/idaklu_solver.py 98.98% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@valentinsulzer valentinsulzer left a comment

Choose a reason for hiding this comment

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

Can you add a test where an event is triggered?

pybamm/solvers/c_solvers/idaklu_casadi.cpp Outdated Show resolved Hide resolved
Copy link
Member

@valentinsulzer valentinsulzer left a comment

Choose a reason for hiding this comment

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

Thanks!

CHANGELOG.md Outdated
@@ -10,6 +10,7 @@

## Bug fixes

- For simulations with events that cause the simulation to stop early, the sensitivities could be evaluated incorrectly to zero ([#2331](https://github.com/pybamm-team/PyBaMM/pull/2337))
Copy link
Member

Choose a reason for hiding this comment

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

should be in "Unreleased" section

@valentinsulzer valentinsulzer merged commit 82a705c into develop Oct 6, 2022
@valentinsulzer valentinsulzer deleted the i2331 branch October 6, 2022 21: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.

[Bug]: IDAKLU solver sensitivity calculation
2 participants