Skip to content

Conversation

@martinjrobins
Copy link
Contributor

Description

Fixes #5007

Type of change

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

Important checks:

Please confirm the following before marking the PR as ready for review:

  • No style issues: nox -s pre-commit
  • All tests pass: nox -s tests
  • The documentation builds: nox -s doctests
  • Code is commented for hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@martinjrobins martinjrobins requested a review from a team as a code owner May 9, 2025 11:34
@codecov
Copy link

codecov bot commented May 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.57%. Comparing base (a7497a6) to head (c50916a).
⚠️ Report is 127 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #5008   +/-   ##
========================================
  Coverage    98.57%   98.57%           
========================================
  Files          304      304           
  Lines        23656    23661    +5     
========================================
+ Hits         23320    23325    +5     
  Misses         336      336           

☔ 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.

@martinjrobins martinjrobins requested a review from BradyPlanden May 9, 2025 12:50
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.

Thanks Martin! Looks good, just some minor things. For consistency, can you add the name argument/property to the other processed variable classes?

Question (non-blocking):

  • If hermite interpolation is available, can we treat dvar_dy_eval, dy_dp, and dvar_dp_eval as distinct process variables, hermite interpolate them onto self.time_integral.discrete_times, and then compute the discrete sum?

@martinjrobins
Copy link
Contributor Author

  • If hermite interpolation is available, can we treat dvar_dy_eval, dy_dp, and dvar_dp_eval as distinct process variables, hermite interpolate them onto self.time_integral.discrete_times, and then compute the discrete sum?

Yea, that would be nicer, we'd need their time derivatives though I think? I think these can be extracted during integration using IDAGetSensDky, we'd have to do that and return them as part of the solution.

@BradyPlanden BradyPlanden self-requested a review May 15, 2025 16:23
Copy link
Member

@BradyPlanden BradyPlanden left a comment

Choose a reason for hiding this comment

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

LGTM @martinjrobins - thanks!

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.

Thanks!

@martinjrobins martinjrobins merged commit c1131a3 into develop May 16, 2025
26 checks passed
@martinjrobins martinjrobins deleted the i5007-dts-sens branch May 16, 2025 23:55
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]: pybamm.DiscreteTimeSum sensitivities not being summed over time

4 participants