Skip to content

#1110 fix bug#1111

Merged
valentinsulzer merged 2 commits intodevelopfrom
issue-1110-function-input
Jul 24, 2020
Merged

#1110 fix bug#1111
valentinsulzer merged 2 commits intodevelopfrom
issue-1110-function-input

Conversation

@valentinsulzer
Copy link
Copy Markdown
Member

Description

Fix setting a FunctionParameter with an InputParameter

Fixes #1110

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

@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 23, 2020

Codecov Report

Merging #1111 into develop will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1111      +/-   ##
===========================================
- Coverage    97.82%   97.82%   -0.01%     
===========================================
  Files          245      245              
  Lines        13273    13271       -2     
===========================================
- Hits         12984    12982       -2     
  Misses         289      289              
Impacted Files Coverage Δ
pybamm/parameters/parameter_values.py 99.29% <ø> (-0.01%) ⬇️

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 e2e837b...d7165f4. Read the comment docs.

Copy link
Copy Markdown
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, just a minor comment on the DFN script

Comment thread examples/scripts/DFN.py Outdated
t_eval = np.linspace(0, 3600, 100)
solver = pybamm.CasadiSolver(atol=1e-6, rtol=1e-3)
solution = solver.solve(model, t_eval)
solution = solver.solve(model, t_eval, inputs={"eps_n": 0.3})
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.

I think it would be better to keep the DFN example without inputs, we can have a separate example for this.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yes, forgot to remove this

@valentinsulzer valentinsulzer merged commit 7e4c9bb into develop Jul 24, 2020
@valentinsulzer valentinsulzer deleted the issue-1110-function-input branch August 10, 2020 11:39
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.

Error when setting a function with an input parameter

2 participants