Skip to content

Conversation

pipliggins
Copy link
Contributor

Description

When using output_variables, sensitivity calculations were incorrect for 1D+ variables, and all variables which followed them in the output_variables list. This is a bug in the C++ code stored in pybammsolvers so a seperate PR will be made there, this one just adds tests to pybamm that catch the bug and should pass once the solvers package is fixed and updated.

Fixes #5058

Type of change

Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #)

@pipliggins
Copy link
Contributor Author

pipliggins commented Jul 16, 2025

Requires: pybamm-team/pybammsolvers#52

@MarcBerliner
Copy link
Member

@pipliggins pybammsolvers was updated with your required PR. We plan to release pybamm soon, and it'd be good to include this PR. Is this ready for review?

Copy link

codecov bot commented Sep 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.80%. Comparing base (847723e) to head (cc1cc67).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #5118   +/-   ##
========================================
  Coverage    98.80%   98.80%           
========================================
  Files          320      320           
  Lines        27034    27034           
========================================
  Hits         26711    26711           
  Misses         323      323           

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

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

@pipliggins
Copy link
Contributor Author

@pipliggins pybammsolvers was updated with your required PR. We plan to release pybamm soon, and it'd be good to include this PR. Is this ready for review?

@MarcBerliner Yes! I'll mark it ready.

@pipliggins pipliggins marked this pull request as ready for review September 17, 2025 17:12
@pipliggins pipliggins requested a review from a team as a code owner September 17, 2025 17:12
Copy link
Member

@MarcBerliner MarcBerliner 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!

@MarcBerliner MarcBerliner enabled auto-merge (squash) September 17, 2025 17:20
@MarcBerliner MarcBerliner merged commit fcf3821 into pybamm-team:develop Sep 17, 2025
20 of 22 checks passed
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]: Different sensitivities when calculated with/without output variables
2 participants