Skip to content

I2858-init-cond-sundials - #2920

Merged
valentinsulzer merged 6 commits into
developfrom
i2858-init-cond-sundials
May 19, 2023
Merged

valentinsulzer merged 6 commits into
developfrom
i2858-init-cond-sundials

Conversation

@martinjrobins

Copy link
Copy Markdown
Contributor

Description

  1. feed initial conditions for the sensitivity vectors to the idaklu solver (before was just initialised to 0)
  2. call idagetsens after idacalcic to get the corrected initial conditions for sensitivity vectors
  3. make the FD h a bit smaller to reduce numerical errors in sensitivity validation for models

Fixes #2858

Type of change

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

Key checklist:

  • No style issues: $ pre-commit run (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)
  • All tests pass: $ python run-tests.py --all
  • The documentation builds: $ python run-tests.py --doctest

You can run unit and doctests together 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

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

Comment thread CHANGELOG.md
@codecov

codecov Bot commented May 17, 2023 •

Copy link
Copy Markdown

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.02 🎉

Comparison is base (aa4561f) 99.69% compared to head (ef1b8df) 99.71%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2920      +/-   ##
===========================================
+ Coverage    99.69%   99.71%   +0.02%     
===========================================
  Files          273      273              
  Lines        19085    19032      -53     
===========================================
- Hits         19026    18977      -49     
+ Misses          59       55       -4     
Impacted Files Coverage Δ
pybamm/solvers/base_solver.py 100.00% <100.00%> (ø)
pybamm/solvers/idaklu_solver.py 99.09% <100.00%> (+0.10%) ⬆️

... and 5 files with indirect coverage changes

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

@valentinsulzer valentinsulzer 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.

Looks good, thanks!

@martinjrobins

Copy link
Copy Markdown
Contributor Author

I'm thinking I can ignore the benchmark failures for now (#2954). What do you think @tinosulzer?

@valentinsulzer

Copy link
Copy Markdown
Member

Yeah, I've been ignoring these

@valentinsulzer
valentinsulzer merged commit 9d60f05 into develop May 19, 2023
@valentinsulzer
valentinsulzer deleted the i2858-init-cond-sundials branch May 19, 2023 20:00
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.

Updates for casadi 3.6

2 participants