Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1399 fix polynomial and average bugs #1411

Merged
merged 2 commits into from
Mar 3, 2021
Merged

#1399 fix polynomial and average bugs #1411

merged 2 commits into from
Mar 3, 2021

Conversation

rtimms
Copy link
Contributor

@rtimms rtimms commented Mar 2, 2021

Description

Fixes two (unrelated) bugs where:

  1. volume averaging with 0D spatial method gave the incorrect result
  2. polynomial particle concentration models with "dimensionality" equal to 2 you gave incorrect behaviour

Fixes #1396 and #1399

Type of change

Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist:

  • No style issues: $ flake8
  • All tests pass: $ python run-tests.py --unit
  • The documentation builds: $ cd docs and then $ make clean; make html

You can run all three 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

Copy link
Member

@valentinsulzer valentinsulzer left a comment

Choose a reason for hiding this comment

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

Thanks @rtimms , looks good to me!

@codecov
Copy link

codecov bot commented Mar 2, 2021

Codecov Report

Merging #1411 (e16928a) into develop (44398b9) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1411      +/-   ##
===========================================
+ Coverage    98.22%   98.27%   +0.04%     
===========================================
  Files          278      278              
  Lines        15804    16110     +306     
===========================================
+ Hits         15524    15832     +308     
+ Misses         280      278       -2     
Impacted Files Coverage Δ
...m/models/full_battery_models/base_battery_model.py 99.68% <ø> (+<0.01%) ⬆️
pybamm/models/standard_variables.py 100.00% <ø> (ø)
...dels/submodels/interface/kinetics/base_kinetics.py 100.00% <ø> (ø)
pybamm/experiments/experiment.py 98.34% <100.00%> (+0.01%) ⬆️
pybamm/expression_tree/unary_operators.py 100.00% <100.00%> (ø)
pybamm/models/base_model.py 99.20% <100.00%> (+0.09%) ⬆️
...s/submodels/particle/polynomial_single_particle.py 100.00% <100.00%> (ø)
pybamm/plotting/quick_plot.py 100.00% <100.00%> (ø)
pybamm/simulation.py 97.94% <100.00%> (+0.74%) ⬆️
pybamm/solvers/base_solver.py 99.15% <100.00%> (+0.03%) ⬆️
... and 35 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 44398b9...43e4789. Read the comment docs.

@rtimms rtimms merged commit 8fd7c13 into develop Mar 3, 2021
@rtimms rtimms deleted the issue-1399-poly-bug branch March 3, 2021 14:33
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.

Volume-averaging in 0D spatial dimension
2 participants