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

#1251 fix function parameter diff bug #1294

Merged
merged 15 commits into from
Feb 3, 2021

Conversation

valentinsulzer
Copy link
Member

Description

Fixes #1251

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

@valentinsulzer valentinsulzer marked this pull request as draft December 11, 2020 21:05
@codecov
Copy link

codecov bot commented Feb 2, 2021

Codecov Report

Merging #1294 (381351a) into develop (ee3d67c) will increase coverage by 0.00%.
The diff coverage is 97.72%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #1294   +/-   ##
========================================
  Coverage    98.15%   98.15%           
========================================
  Files          272      272           
  Lines        15600    15622   +22     
========================================
+ Hits         15312    15334   +22     
  Misses         288      288           
Impacted Files Coverage Δ
pybamm/expression_tree/variable.py 100.00% <ø> (ø)
pybamm/solvers/base_solver.py 99.13% <66.66%> (ø)
pybamm/discretisations/discretisation.py 99.78% <100.00%> (+<0.01%) ⬆️
pybamm/expression_tree/binary_operators.py 97.49% <100.00%> (+0.01%) ⬆️
pybamm/expression_tree/symbol.py 98.57% <100.00%> (ø)
pybamm/expression_tree/unary_operators.py 99.79% <100.00%> (+<0.01%) ⬆️
...dels/submodels/interface/kinetics/base_kinetics.py 100.00% <100.00%> (ø)
pybamm/parameters/parameter_values.py 99.38% <100.00%> (+<0.01%) ⬆️
pybamm/solvers/casadi_algebraic_solver.py 98.85% <100.00%> (+0.13%) ⬆️
pybamm/solvers/casadi_solver.py 99.52% <100.00%> (-0.02%) ⬇️

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 ee3d67c...6260aec. Read the comment docs.

@valentinsulzer valentinsulzer marked this pull request as ready for review February 2, 2021 20:32
@valentinsulzer
Copy link
Member Author

Coverage error is something that was already failing before ...

Copy link
Member

@brosaplanella brosaplanella left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks Tino!

# one to differentiate it from the electrolyte concentration inside the
# This is a bit of a hack, but we need to wrap electrolyte concentration with
# the NotConstant class
# to differentiate it from the electrolyte concentration inside the
# surface potential difference when taking j.diff(c_e) later on
# use explicit Multiplication instead of * to avoid simplification
Copy link
Member

Choose a reason for hiding this comment

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

Can this line be removed now?

@valentinsulzer valentinsulzer merged commit 8ed813e into develop Feb 3, 2021
@valentinsulzer valentinsulzer deleted the issue-1251-diff-function-parameter branch February 3, 2021 20: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.

Diff of a ParameterFunction doesn't work when evaluated at a constant
2 participants