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

make quickplot use scaling from solutions #1234

Merged
merged 4 commits into from
Nov 9, 2020

Conversation

TomTranter
Copy link
Contributor

@TomTranter TomTranter commented Nov 6, 2020

Description

Quickplot now uses timescale and lengthscale evals from the solution instead of evaluating them.

Fixes # 1233

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

codecov bot commented Nov 6, 2020

Codecov Report

Merging #1234 (1483504) into develop (d3b1cca) will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1234      +/-   ##
===========================================
- Coverage    97.95%   97.95%   -0.01%     
===========================================
  Files          250      250              
  Lines        14399    14397       -2     
===========================================
- Hits         14105    14103       -2     
  Misses         294      294              
Impacted Files Coverage Δ
pybamm/plotting/quick_plot.py 100.00% <ø> (ø)

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 d3b1cca...1483504. Read the comment docs.

Copy link
Sponsor 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 the minor point on the CHANGELOG. Thanks Tom!

CHANGELOG.md Outdated Show resolved Hide resolved
@TomTranter
Copy link
Contributor Author

@tinosulzer @rtimms some of the lines I changed don't actually seem to be used for anything. self.length_scales is defined but as far as I can tell never used anywhere. I commented them out and ran tests locally and they all passed. I also ran a 1+1 script and plotting the heat maps works ok without these lines. It does fail when the height is an input though. Not sure if worth fixing as I can't think of a scenario when you'd want to have height as input when doing 1+1. Similarly I guess 2+1 will not like when height and width are inputs. I could add some more informative error messages

@rtimms
Copy link
Contributor

rtimms commented Nov 9, 2020

yeah it looks like the length scale stuff gets handled in processed variable. and I agree it doesn't make sense for height to be an input in 1+1D as you're changing the geometry. maybe in battery_geometry we should raise an error if any of the parameters are inputs since you can't change the geometry on the fly

@TomTranter TomTranter merged commit 0785ec6 into develop Nov 9, 2020
@TomTranter TomTranter deleted the issue-1233-quickplot-inputs branch November 9, 2020 17:34
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.

3 participants