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

Issue 1194 initial conditions #1278

Merged
merged 14 commits into from
Dec 9, 2020
Merged

Conversation

valentinsulzer
Copy link
Member

Description

Add a function to initialize a model with a different model, fixes #1194
Reformat model.new_copy so that any changes to the model are kept, fixes #1205

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 Dec 7, 2020

Codecov Report

Merging #1278 (2012162) into develop (9d42dfe) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##           develop    #1278    +/-   ##
=========================================
  Coverage    98.07%   98.08%            
=========================================
  Files          270      270            
  Lines        15030    15152   +122     
=========================================
+ Hits         14741    14862   +121     
- Misses         289      290     +1     
Impacted Files Coverage Δ
pybamm/expression_tree/operations/simplify.py 93.35% <ø> (ø)
...ybamm/expression_tree/operations/unpack_symbols.py 100.00% <ø> (ø)
pybamm/meshes/meshes.py 97.75% <ø> (ø)
...bamm/models/submodels/external_circuit/__init__.py 100.00% <ø> (ø)
pybamm/discretisations/discretisation.py 99.78% <100.00%> (+<0.01%) ⬆️
...bamm/expression_tree/operations/replace_symbols.py 100.00% <100.00%> (ø)
pybamm/models/base_model.py 99.08% <100.00%> (+0.07%) ⬆️
...m/models/full_battery_models/base_battery_model.py 99.67% <100.00%> (-0.02%) ⬇️
...models/full_battery_models/lead_acid/basic_full.py 100.00% <100.00%> (ø)
...odels/full_battery_models/lithium_ion/basic_dfn.py 100.00% <100.00%> (ø)
... and 7 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 9d42dfe...0ade46e. Read the comment docs.

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 great Tino, thanks!

@valentinsulzer valentinsulzer merged commit 0e6c78c into develop Dec 9, 2020
@valentinsulzer valentinsulzer deleted the issue-1194-initial-conditions branch December 9, 2020 14:41
tlestang added a commit that referenced this pull request Dec 11, 2020
Add "initial_conditions" kwarg to BaseSolve.solve following #1278
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.

Rethink model.new_copy again Initializing a model
2 participants