Skip to content

Default solver from Casadi to IDAKLU#546

Merged
BradyPlanden merged 6 commits into
developfrom
change-default-solver-to-idaklu
Apr 24, 2025
Merged

Default solver from Casadi to IDAKLU#546
BradyPlanden merged 6 commits into
developfrom
change-default-solver-to-idaklu

Conversation

@BradyPlanden

@BradyPlanden BradyPlanden commented Oct 31, 2024

Copy link
Copy Markdown
Member

Description

This PR adds the required changes for PyBaMM's switch to the IDAKLU solver as default.

This relates to PyBAMM's #4545, where the CasadiSolver's explicit sensitivity functional is planned to be depreciated.

Issue reference

Fixes # (issue-number)

Review

Before you mark your PR as ready for review, please ensure that you've considered the following:

  • Updated the CHANGELOG.md in reverse chronological order (newest at the top) with a concise description of the changes, including the PR number.
  • Noted any breaking changes, including details on how it might impact existing functionality.

Type of change

  • New Feature: A non-breaking change that adds new functionality.
  • Optimization: A code change that improves performance.
  • Examples: A change to existing or additional examples.
  • Bug Fix: A non-breaking change that addresses an issue.
  • Documentation: Updates to documentation or new documentation for new features.
  • Refactoring: Non-functional changes that improve the codebase.
  • Style: Non-functional changes related to code style (formatting, naming, etc).
  • Testing: Additional tests to improve coverage or confirm functionality.
  • Other: (Insert description of change)

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 unit tests pass: $ nox -s tests
  • The documentation builds: $ nox -s doctest

You can run integration tests, unit tests, and doctests together at once, using $ nox -s quick.

Further checks:

  • Code is well-commented, especially in complex or unclear areas.
  • Added tests that prove my fix is effective or that my feature works.
  • Checked that coverage remains or improves, and added tests if necessary to maintain or increase coverage.

Thank you for contributing to our project! Your efforts help us to deliver great software.

@BradyPlanden BradyPlanden force-pushed the change-default-solver-to-idaklu branch from 90efafb to 2d4dcb1 Compare April 23, 2025 09:49
@codecov

codecov Bot commented Apr 23, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.22%. Comparing base (0a55c30) to head (3bc298d).
Report is 27 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #546   +/-   ##
========================================
  Coverage    99.22%   99.22%           
========================================
  Files           68       68           
  Lines         4922     4926    +4     
========================================
+ Hits          4884     4888    +4     
  Misses          38       38           

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

@BradyPlanden BradyPlanden marked this pull request as ready for review April 23, 2025 12:02

@agriyakhetarpal agriyakhetarpal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, @BradyPlanden! I think we should also bump

"pybamm[jax]>=24.9",
to be >=25.4.1, as pybamm-team/PyBaMM#4915 first made it to that release.

Comment thread noxfile.py
@BradyPlanden BradyPlanden merged commit 1be15e8 into develop Apr 24, 2025
@BradyPlanden BradyPlanden deleted the change-default-solver-to-idaklu branch April 24, 2025 12:54
BradyPlanden added a commit that referenced this pull request Apr 25, 2025
* fix: removes default solver Casadi args, adds catch for EIS and applies Casadi solver.

* examples: removes IDAKLU explicit definition, adds Casadi for unscented_kalman_filter.py

* tests: removes general explicit IDAKLU definition, adds increased tolerances where required, removes redundant non-convergence test

* coverage: adds explicit solver arg for ExponentialDecay

* increment pybamm version, add changlog entry

* infra: update nox sessions to upgrade dependencies by default
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.

2 participants