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

#674 options notebook #677

Merged
merged 4 commits into from
Oct 25, 2019
Merged

#674 options notebook #677

merged 4 commits into from
Oct 25, 2019

Conversation

rtimms
Copy link
Contributor

@rtimms rtimms commented Oct 24, 2019

Description

Brief notebook showing how to pass options to a model (as an example, passes lumped thermal model to SPMe)

Fixes #674

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.

  • 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

codecov bot commented Oct 24, 2019

Codecov Report

Merging #677 into master will increase coverage by 0.12%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #677      +/-   ##
==========================================
+ Coverage   98.59%   98.71%   +0.12%     
==========================================
  Files         169      170       +1     
  Lines        8450     9591    +1141     
==========================================
+ Hits         8331     9468    +1137     
- Misses        119      123       +4
Impacted Files Coverage Δ
pybamm/solvers/dae_solver.py 98.84% <0%> (-0.37%) ⬇️
pybamm/discretisations/discretisation.py 99.8% <0%> (-0.2%) ⬇️
pybamm/processed_variable.py 97.02% <0%> (-0.18%) ⬇️
pybamm/expression_tree/vector.py 100% <0%> (ø) ⬆️
pybamm/expression_tree/independent_variable.py 100% <0%> (ø) ⬆️
pybamm/expression_tree/functions.py 100% <0%> (ø) ⬆️
pybamm/solvers/ode_solver.py 100% <0%> (ø) ⬆️
pybamm/expression_tree/matrix.py 100% <0%> (ø) ⬆️
pybamm/expression_tree/array.py 100% <0%> (ø) ⬆️
pybamm/solvers/algebraic_solver.py 100% <0%> (ø) ⬆️
... and 9 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 b21b738...d18d279. Read the comment docs.

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.

Looks great, very clear. I would also add a reference to the using-submodels notebook as another way of combining submodels more explicitly. Also make sure you add this to the example notebooks readme.

"\n",
"# discretise model\n",
"disc = pybamm.Discretisation(mesh, model.default_spatial_methods)\n",
"disc.process_model(model)"
Copy link
Member

Choose a reason for hiding this comment

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

end line with semicolon to suppress output

@rtimms rtimms merged commit fd9073d into master Oct 25, 2019
@valentinsulzer valentinsulzer deleted the issue-674-options-notebook branch October 25, 2019 17:24
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.

notebook on using model options
2 participants