PyBaMM icon indicating copy to clipboard operation
PyBaMM copied to clipboard

Make time-based heaviside and modulo inputs explicit `t_eval` points with `IDAKLUSolver`

Open MarcBerliner opened this issue 8 months ago • 1 comments

Description

Fixed a bug where including inputs that had a heaviside or modulo as an explicit function of time would fail for the IDAKLUSolver. Now, these are added as explicit t_eval points to stop the solver during integration.

Requires https://github.com/pybamm-team/pybammsolvers/pull/35

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

MarcBerliner avatar Apr 24 '25 20:04 MarcBerliner

Codecov Report

:x: Patch coverage is 98.14815% with 1 line in your changes missing coverage. Please review. :white_check_mark: Project coverage is 98.80%. Comparing base (847723e) to head (a8b98bf). :warning: Report is 3 commits behind head on develop.

Files with missing lines Patch % Lines
src/pybamm/simulation.py 75.00% 1 Missing :warning:
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4994      +/-   ##
===========================================
- Coverage    98.80%   98.80%   -0.01%     
===========================================
  Files          320      320              
  Lines        27034    27074      +40     
===========================================
+ Hits         26711    26750      +39     
- Misses         323      324       +1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov[bot] avatar Apr 24 '25 20:04 codecov[bot]