diff --git a/.github/workflows/lychee_url_checker.yml b/.github/workflows/lychee_url_checker.yml
index e99ba9c290..d9ab150ded 100644
--- a/.github/workflows/lychee_url_checker.yml
+++ b/.github/workflows/lychee_url_checker.yml
@@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- # cache Lychee results to avoid hitting rate limits
+ # cache Lychee results to avoid hitting rate limits
- name: Restore lychee cache
uses: actions/cache@v3
with:
@@ -42,7 +42,7 @@ jobs:
--exclude https://twitter.com/pybamm_
--exclude "https://doi\.org|www.sciencedirect\.com/*"
--accept 200,429
- --exclude-path ./CHANGELOG.md
+ --exclude-path ./CHANGELOG.md
--exclude-path ./scripts/update_version.py
'./**/*.rst'
'./**/*.md'
diff --git a/.github/workflows/need_reply_remove.yml b/.github/workflows/need_reply_remove.yml
index 59f9a839ed..4ce8ae81f4 100644
--- a/.github/workflows/need_reply_remove.yml
+++ b/.github/workflows/need_reply_remove.yml
@@ -22,4 +22,4 @@ jobs:
issue: ${{ github.event.issue.number }}
label: needs-reply
env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
\ No newline at end of file
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/needs_reply.yml b/.github/workflows/needs_reply.yml
index 8e9269001b..7dde7bfef6 100644
--- a/.github/workflows/needs_reply.yml
+++ b/.github/workflows/needs_reply.yml
@@ -13,4 +13,4 @@ jobs:
uses: dwieeb/needs-reply@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- issue-label: needs-reply
\ No newline at end of file
+ issue-label: needs-reply
diff --git a/.github/workflows/run_periodic_tests.yml b/.github/workflows/run_periodic_tests.yml
index 41e4a9de8a..5027d877ac 100644
--- a/.github/workflows/run_periodic_tests.yml
+++ b/.github/workflows/run_periodic_tests.yml
@@ -1,11 +1,11 @@
-# Run all unit tests and integration tests for all Python versions
+# Run all unit tests and integration tests for all Python versions
# and platforms at 3am UTC every day and on PRs to the main branch
name: Scheduled
on:
workflow_dispatch:
pull_request:
- branches:
+ branches:
- main
# Run everyday at 3 am UTC
@@ -119,13 +119,13 @@ jobs:
build-apple-mseries:
needs: style
runs-on: [self-hosted, macOS, ARM64]
- env:
+ env:
GITHUB_PATH: ${PYENV_ROOT/bin:$PATH}
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
-
+
steps:
- uses: actions/checkout@v3
- name: Install python & create virtualenv
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 88e655c09a..964b9c30eb 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -40,4 +40,4 @@ repos:
- id: python-check-blanket-type-ignore
- id: rst-backticks
- id: rst-directive-colons
- - id: rst-inline-touching-normal
\ No newline at end of file
+ - id: rst-inline-touching-normal
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cc47ba99c0..c3c5141d4f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,7 +34,7 @@ if(NOT PYBIND11_DIR)
endif()
add_subdirectory(${PYBIND11_DIR})
-pybind11_add_module(idaklu
+pybind11_add_module(idaklu
pybamm/solvers/c_solvers/idaklu/casadi_functions.cpp
pybamm/solvers/c_solvers/idaklu/casadi_functions.hpp
pybamm/solvers/c_solvers/idaklu/casadi_solver.cpp
@@ -56,7 +56,7 @@ if (NOT DEFINED USE_PYTHON_CASADI)
endif()
execute_process(
- COMMAND "${PYTHON_EXECUTABLE}" -c
+ COMMAND "${PYTHON_EXECUTABLE}" -c
"import casadi as _; print(_.__path__[0])"
OUTPUT_VARIABLE CASADI_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -67,7 +67,7 @@ endif()
message("Found python casadi path: ${CASADI_DIR}")
if(${USE_PYTHON_CASADI})
- message("Trying to link against python casadi package")
+ message("Trying to link against python casadi package")
find_package(casadi CONFIG PATHS ${CASADI_DIR} REQUIRED)
else()
message("Trying to link against any casadi package apart from the python one")
@@ -78,7 +78,7 @@ endif()
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR})
# Sundials
find_package(SUNDIALS REQUIRED)
-message("sundials ${SUNDIALS_INCLUDE_DIR} ${SUNDIALS_LIBRARIES}")
+message("sundials ${SUNDIALS_INCLUDE_DIR} ${SUNDIALS_LIBRARIES}")
target_include_directories(idaklu PRIVATE ${SUNDIALS_INCLUDE_DIR})
target_link_libraries(idaklu PRIVATE ${SUNDIALS_LIBRARIES} casadi)
diff --git a/FindSuiteSparse.cmake b/FindSuiteSparse.cmake
index 532007e7ae..c5275c02c0 100644
--- a/FindSuiteSparse.cmake
+++ b/FindSuiteSparse.cmake
@@ -1,4 +1,4 @@
-# This CMakeFile is adapted from that in dune-common:
+# This CMakeFile is adapted from that in dune-common:
# .. cmake_module::
#
@@ -239,4 +239,3 @@ endif()
#set HAVE_SUITESPARSE for config.h
set(HAVE_SUITESPARSE ${SuiteSparse_FOUND})
set(HAVE_UMFPACK ${SuiteSparse_UMFPACK_FOUND})
-
diff --git a/README.md b/README.md
index 04070f0d4a..acc7157cb7 100644
--- a/README.md
+++ b/README.md
@@ -41,8 +41,8 @@ pay for developer time, professional services, travel, workshops, and a variety
diff --git a/benchmarks/__init__.py b/benchmarks/__init__.py
index 8b13789179..e69de29bb2 100644
--- a/benchmarks/__init__.py
+++ b/benchmarks/__init__.py
@@ -1 +0,0 @@
-
diff --git a/build_manylinux_wheels/Dockerfile b/build_manylinux_wheels/Dockerfile
index efaef13a1f..a6c2dcc41c 100644
--- a/build_manylinux_wheels/Dockerfile
+++ b/build_manylinux_wheels/Dockerfile
@@ -15,4 +15,4 @@ RUN chmod +x /entrypoint.sh
RUN ./install_sundials.sh
-ENTRYPOINT ["/entrypoint.sh"]
\ No newline at end of file
+ENTRYPOINT ["/entrypoint.sh"]
diff --git a/build_manylinux_wheels/install_sundials.sh b/build_manylinux_wheels/install_sundials.sh
index e97817a367..709d9c13c7 100644
--- a/build_manylinux_wheels/install_sundials.sh
+++ b/build_manylinux_wheels/install_sundials.sh
@@ -78,4 +78,3 @@ cmake -DENABLE_LAPACK=ON\
-DCMAKE_INSTALL_PREFIX=/usr\
../$SUNDIALS_DIR
make install
-
diff --git a/docs/Makefile b/docs/Makefile
index b454275837..46d9ea6f19 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -17,4 +17,3 @@ help:
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
-
diff --git a/docs/_static/index-images/api.svg b/docs/_static/index-images/api.svg
index e637525cc0..2cbc9a9403 100644
--- a/docs/_static/index-images/api.svg
+++ b/docs/_static/index-images/api.svg
@@ -5,27 +5,27 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/_static/index-images/contributor.svg b/docs/_static/index-images/contributor.svg
index 3a689e0e4c..b03a9a2b19 100644
--- a/docs/_static/index-images/contributor.svg
+++ b/docs/_static/index-images/contributor.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
diff --git a/docs/_static/index-images/examples.svg b/docs/_static/index-images/examples.svg
index d61b0937da..a8057b819b 100644
--- a/docs/_static/index-images/examples.svg
+++ b/docs/_static/index-images/examples.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
diff --git a/docs/_static/index-images/getting_started.svg b/docs/_static/index-images/getting_started.svg
index 04db7e6156..463ef73e34 100644
--- a/docs/_static/index-images/getting_started.svg
+++ b/docs/_static/index-images/getting_started.svg
@@ -5,27 +5,27 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/conf.py b/docs/conf.py
index 43f71f704e..336fa15743 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -314,7 +314,7 @@
An interactive online version of this notebook is available, which can be
accessed via
-
diff --git a/docs/index.rst b/docs/index.rst
index 21b224a331..3e5d54ecb5 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -28,7 +28,7 @@ PyBaMM documentation
PyBaMM (Python Battery Mathematical Modelling) is an open-source battery simulation package
written in Python. Our mission is to accelerate battery modelling research by
-providing open-source tools for multi-institutional, interdisciplinary collaboration.
+providing open-source tools for multi-institutional, interdisciplinary collaboration.
Broadly, PyBaMM consists of
#. a framework for writing and solving systems of differential equations,
@@ -57,7 +57,7 @@ explore the effect of different battery designs and modeling assumptions under a
:click-parent:
To the user guide
-
+
.. grid-item-card::
:img-top: _static/index-images/examples.svg
diff --git a/docs/source/api/batch_study.rst b/docs/source/api/batch_study.rst
index f00a2b1657..51e927d856 100644
--- a/docs/source/api/batch_study.rst
+++ b/docs/source/api/batch_study.rst
@@ -2,4 +2,4 @@ Batch Study
===========
.. autoclass:: pybamm.BatchStudy
- :members:
\ No newline at end of file
+ :members:
diff --git a/docs/source/api/experiment/experiment_steps.rst b/docs/source/api/experiment/experiment_steps.rst
index a4637a866b..55de9d17bf 100644
--- a/docs/source/api/experiment/experiment_steps.rst
+++ b/docs/source/api/experiment/experiment_steps.rst
@@ -17,4 +17,4 @@ These functions return the following step class, which is not intended to be use
directly:
.. autoclass:: pybamm.step._Step
- :members:
\ No newline at end of file
+ :members:
diff --git a/docs/source/api/expression_tree/array.rst b/docs/source/api/expression_tree/array.rst
index a84a856a19..7b398ea8e7 100644
--- a/docs/source/api/expression_tree/array.rst
+++ b/docs/source/api/expression_tree/array.rst
@@ -6,4 +6,4 @@ Array
.. autofunction:: pybamm.linspace
-.. autofunction:: pybamm.meshgrid
+.. autofunction:: pybamm.meshgrid
diff --git a/docs/source/api/expression_tree/matrix.rst b/docs/source/api/expression_tree/matrix.rst
index 71a281bd8a..c07c9c4462 100644
--- a/docs/source/api/expression_tree/matrix.rst
+++ b/docs/source/api/expression_tree/matrix.rst
@@ -3,4 +3,3 @@ Matrix
.. autoclass:: pybamm.Matrix
:members:
-
diff --git a/docs/source/api/expression_tree/operations/evaluate.rst b/docs/source/api/expression_tree/operations/evaluate.rst
index ab3e9e14f2..6429c1f370 100644
--- a/docs/source/api/expression_tree/operations/evaluate.rst
+++ b/docs/source/api/expression_tree/operations/evaluate.rst
@@ -1,6 +1,5 @@
-EvaluatorPython
+EvaluatorPython
===============
.. autoclass:: pybamm.EvaluatorPython
:members:
-
diff --git a/docs/source/api/expression_tree/scalar.rst b/docs/source/api/expression_tree/scalar.rst
index e02ee39bf8..ca5ea1aae3 100644
--- a/docs/source/api/expression_tree/scalar.rst
+++ b/docs/source/api/expression_tree/scalar.rst
@@ -3,4 +3,3 @@ Scalar
.. autoclass:: pybamm.Scalar
:members:
-
diff --git a/docs/source/api/expression_tree/symbol.rst b/docs/source/api/expression_tree/symbol.rst
index be252c9b06..41f390e1ac 100644
--- a/docs/source/api/expression_tree/symbol.rst
+++ b/docs/source/api/expression_tree/symbol.rst
@@ -5,4 +5,3 @@ Symbol
.. autoclass:: pybamm.Symbol
:special-members:
:members:
-
diff --git a/docs/source/api/expression_tree/variable.rst b/docs/source/api/expression_tree/variable.rst
index ab42f76bcf..8028ceaf56 100644
--- a/docs/source/api/expression_tree/variable.rst
+++ b/docs/source/api/expression_tree/variable.rst
@@ -6,4 +6,3 @@ Variable
.. autoclass:: pybamm.VariableDot
:members:
-
diff --git a/docs/source/api/geometry/index.rst b/docs/source/api/geometry/index.rst
index b63b5ce82c..0dd5fc294c 100644
--- a/docs/source/api/geometry/index.rst
+++ b/docs/source/api/geometry/index.rst
@@ -5,4 +5,3 @@ Geometry
geometry
battery_geometry
-
diff --git a/docs/source/api/index.rst b/docs/source/api/index.rst
index 34c888339d..432461a58e 100644
--- a/docs/source/api/index.rst
+++ b/docs/source/api/index.rst
@@ -29,4 +29,4 @@ For a high-level introduction to PyBaMM, see the :ref:`user guide `
util
callbacks
citations
- batch_study
\ No newline at end of file
+ batch_study
diff --git a/docs/source/api/meshes/meshes.rst b/docs/source/api/meshes/meshes.rst
index 671839c278..db96c58f00 100644
--- a/docs/source/api/meshes/meshes.rst
+++ b/docs/source/api/meshes/meshes.rst
@@ -6,6 +6,6 @@ Meshes
.. autoclass:: pybamm.SubMesh
:members:
-
+
.. autoclass:: pybamm.MeshGenerator
:members:
diff --git a/docs/source/api/models/base_models/base_battery_model.rst b/docs/source/api/models/base_models/base_battery_model.rst
index 64715ae5d4..1ce24ebdeb 100644
--- a/docs/source/api/models/base_models/base_battery_model.rst
+++ b/docs/source/api/models/base_models/base_battery_model.rst
@@ -7,4 +7,4 @@ Base Battery Model
:members:
.. autoclass:: pybamm.BatteryModelOptions
- :members:
\ No newline at end of file
+ :members:
diff --git a/docs/source/api/models/base_models/event.rst b/docs/source/api/models/base_models/event.rst
index 856fb2b68f..daf873f898 100644
--- a/docs/source/api/models/base_models/event.rst
+++ b/docs/source/api/models/base_models/event.rst
@@ -6,5 +6,3 @@ Event
.. autoclass:: pybamm.EventType
:members:
-
-
diff --git a/docs/source/api/models/index.rst b/docs/source/api/models/index.rst
index e62d4a2beb..a259e3cb7f 100644
--- a/docs/source/api/models/index.rst
+++ b/docs/source/api/models/index.rst
@@ -4,7 +4,7 @@ Models
Below is an overview of all the battery models included in PyBaMM.
Each of the pre-built models contains a reference to the paper in which it is derived.
-The models can be customised using the `options` dictionary defined in the :class:`pybamm.BaseBatteryModel` (which also provides information on which options and models are compatible)
+The models can be customised using the ``options`` dictionary defined in the :class:`pybamm.BaseBatteryModel` (which also provides information on which options and models are compatible)
Visit our `examples page `_
to see how these models can be solved, and compared, using PyBaMM.
diff --git a/docs/source/api/models/lead_acid/full.rst b/docs/source/api/models/lead_acid/full.rst
index a07a38949f..4cc6af7cc0 100644
--- a/docs/source/api/models/lead_acid/full.rst
+++ b/docs/source/api/models/lead_acid/full.rst
@@ -7,4 +7,4 @@ Full Model
.. autoclass:: pybamm.lead_acid.BasicFull
:members:
-.. footbibliography::
\ No newline at end of file
+.. footbibliography::
diff --git a/docs/source/api/models/lithium_ion/index.rst b/docs/source/api/models/lithium_ion/index.rst
index 8148824dd9..f925d2c3d4 100644
--- a/docs/source/api/models/lithium_ion/index.rst
+++ b/docs/source/api/models/lithium_ion/index.rst
@@ -10,4 +10,4 @@ Lithium-ion Models
dfn
newman_tobias
yang2017
- electrode_soh
\ No newline at end of file
+ electrode_soh
diff --git a/docs/source/api/models/lithium_ion/yang2017.rst b/docs/source/api/models/lithium_ion/yang2017.rst
index 06134be58d..1ee5bad80d 100644
--- a/docs/source/api/models/lithium_ion/yang2017.rst
+++ b/docs/source/api/models/lithium_ion/yang2017.rst
@@ -3,4 +3,3 @@ Yang et al 2017
.. autoclass:: pybamm.lithium_ion.Yang2017
:members:
-
diff --git a/docs/source/api/models/submodels/active_material/base_active_material.rst b/docs/source/api/models/submodels/active_material/base_active_material.rst
index 6eab5fe0a0..f94c816d51 100644
--- a/docs/source/api/models/submodels/active_material/base_active_material.rst
+++ b/docs/source/api/models/submodels/active_material/base_active_material.rst
@@ -3,4 +3,3 @@ Base Model
.. autoclass:: pybamm.active_material.BaseModel
:members:
-
diff --git a/docs/source/api/models/submodels/active_material/constant_active_material.rst b/docs/source/api/models/submodels/active_material/constant_active_material.rst
index 9102c533d2..2d022563cb 100644
--- a/docs/source/api/models/submodels/active_material/constant_active_material.rst
+++ b/docs/source/api/models/submodels/active_material/constant_active_material.rst
@@ -3,5 +3,3 @@ Constant Active Material
.. autoclass:: pybamm.active_material.Constant
:members:
-
-
diff --git a/docs/source/api/models/submodels/active_material/index.rst b/docs/source/api/models/submodels/active_material/index.rst
index 1022c9c6c0..ed075940c5 100644
--- a/docs/source/api/models/submodels/active_material/index.rst
+++ b/docs/source/api/models/submodels/active_material/index.rst
@@ -9,4 +9,3 @@ Submodels for (loss of) active material
base_active_material
constant_active_material
loss_active_material
-
diff --git a/docs/source/api/models/submodels/active_material/loss_active_material.rst b/docs/source/api/models/submodels/active_material/loss_active_material.rst
index 37072847a1..e600806a1c 100644
--- a/docs/source/api/models/submodels/active_material/loss_active_material.rst
+++ b/docs/source/api/models/submodels/active_material/loss_active_material.rst
@@ -1,4 +1,4 @@
-Loss of Active Material
+Loss of Active Material
=======================
.. autoclass:: pybamm.active_material.LossActiveMaterial
diff --git a/docs/source/api/models/submodels/base_submodel.rst b/docs/source/api/models/submodels/base_submodel.rst
index a407963142..41a2c178b0 100644
--- a/docs/source/api/models/submodels/base_submodel.rst
+++ b/docs/source/api/models/submodels/base_submodel.rst
@@ -3,4 +3,3 @@ Base Submodel
.. autoclass:: pybamm.BaseSubModel
:members:
-
diff --git a/docs/source/api/models/submodels/electrode/ohm/index.rst b/docs/source/api/models/submodels/electrode/ohm/index.rst
index 63b4727fe0..ad4a16ff2c 100644
--- a/docs/source/api/models/submodels/electrode/ohm/index.rst
+++ b/docs/source/api/models/submodels/electrode/ohm/index.rst
@@ -8,4 +8,4 @@ Ohmic
composite_ohm
full_ohm
surface_form_ohm
- li_metal_explicit
\ No newline at end of file
+ li_metal_explicit
diff --git a/docs/source/api/models/submodels/electrolyte_conductivity/base_electrolyte_conductivity.rst b/docs/source/api/models/submodels/electrolyte_conductivity/base_electrolyte_conductivity.rst
index 4a2fb4d0b1..ca6cc18095 100644
--- a/docs/source/api/models/submodels/electrolyte_conductivity/base_electrolyte_conductivity.rst
+++ b/docs/source/api/models/submodels/electrolyte_conductivity/base_electrolyte_conductivity.rst
@@ -3,4 +3,3 @@ Base Electrolyte Conductivity Submodel
.. autoclass:: pybamm.electrolyte_conductivity.BaseElectrolyteConductivity
:members:
-
diff --git a/docs/source/api/models/submodels/electrolyte_conductivity/full_conductivity.rst b/docs/source/api/models/submodels/electrolyte_conductivity/full_conductivity.rst
index 6882fbb8e2..017811f313 100644
--- a/docs/source/api/models/submodels/electrolyte_conductivity/full_conductivity.rst
+++ b/docs/source/api/models/submodels/electrolyte_conductivity/full_conductivity.rst
@@ -4,4 +4,3 @@ Full Model
.. autoclass:: pybamm.electrolyte_conductivity.Full
:members:
:inherited-members:
-
diff --git a/docs/source/api/models/submodels/electrolyte_conductivity/leading_order_conductivity.rst b/docs/source/api/models/submodels/electrolyte_conductivity/leading_order_conductivity.rst
index e5e6f0261c..31a91b8498 100644
--- a/docs/source/api/models/submodels/electrolyte_conductivity/leading_order_conductivity.rst
+++ b/docs/source/api/models/submodels/electrolyte_conductivity/leading_order_conductivity.rst
@@ -3,4 +3,3 @@ Leading Order Model
.. autoclass:: pybamm.electrolyte_conductivity.LeadingOrder
:members:
-
diff --git a/docs/source/api/models/submodels/electrolyte_conductivity/surface_form/index.rst b/docs/source/api/models/submodels/electrolyte_conductivity/surface_form/index.rst
index de0c5b1fd1..bb49e378e6 100644
--- a/docs/source/api/models/submodels/electrolyte_conductivity/surface_form/index.rst
+++ b/docs/source/api/models/submodels/electrolyte_conductivity/surface_form/index.rst
@@ -5,4 +5,4 @@ Surface Form
full_surface_form_conductivity
leading_surface_form_conductivity
- explicit_surface_form_conductivity
\ No newline at end of file
+ explicit_surface_form_conductivity
diff --git a/docs/source/api/models/submodels/electrolyte_conductivity/surface_form/leading_surface_form_conductivity.rst b/docs/source/api/models/submodels/electrolyte_conductivity/surface_form/leading_surface_form_conductivity.rst
index 07154f9aa6..0a5b7c2756 100644
--- a/docs/source/api/models/submodels/electrolyte_conductivity/surface_form/leading_surface_form_conductivity.rst
+++ b/docs/source/api/models/submodels/electrolyte_conductivity/surface_form/leading_surface_form_conductivity.rst
@@ -3,6 +3,6 @@ Leading Order Model
.. autoclass:: pybamm.electrolyte_conductivity.surface_potential_form.LeadingOrderDifferential
:members:
-
+
.. autoclass:: pybamm.electrolyte_conductivity.surface_potential_form.LeadingOrderAlgebraic
:members:
diff --git a/docs/source/api/models/submodels/electrolyte_diffusion/constant_concentration.rst b/docs/source/api/models/submodels/electrolyte_diffusion/constant_concentration.rst
index be326a8f6d..7d5109d974 100644
--- a/docs/source/api/models/submodels/electrolyte_diffusion/constant_concentration.rst
+++ b/docs/source/api/models/submodels/electrolyte_diffusion/constant_concentration.rst
@@ -3,4 +3,3 @@ Constant Concentration
.. autoclass:: pybamm.electrolyte_diffusion.ConstantConcentration
:members:
-
diff --git a/docs/source/api/models/submodels/electrolyte_diffusion/full_diffusion.rst b/docs/source/api/models/submodels/electrolyte_diffusion/full_diffusion.rst
index 99dd1fee93..cbf6da93d4 100644
--- a/docs/source/api/models/submodels/electrolyte_diffusion/full_diffusion.rst
+++ b/docs/source/api/models/submodels/electrolyte_diffusion/full_diffusion.rst
@@ -3,4 +3,3 @@ Full Model
.. autoclass:: pybamm.electrolyte_diffusion.Full
:members:
-
diff --git a/docs/source/api/models/submodels/electrolyte_diffusion/leading_order_diffusion.rst b/docs/source/api/models/submodels/electrolyte_diffusion/leading_order_diffusion.rst
index a4c817c60d..4005165095 100644
--- a/docs/source/api/models/submodels/electrolyte_diffusion/leading_order_diffusion.rst
+++ b/docs/source/api/models/submodels/electrolyte_diffusion/leading_order_diffusion.rst
@@ -3,5 +3,3 @@ Leading Order Model
.. autoclass:: pybamm.electrolyte_diffusion.LeadingOrder
:members:
-
-
diff --git a/docs/source/api/models/submodels/equivalent_circuit_elements/ocv_element.rst b/docs/source/api/models/submodels/equivalent_circuit_elements/ocv_element.rst
index f34a563edc..025e40eb92 100644
--- a/docs/source/api/models/submodels/equivalent_circuit_elements/ocv_element.rst
+++ b/docs/source/api/models/submodels/equivalent_circuit_elements/ocv_element.rst
@@ -3,4 +3,3 @@ OCV Element
.. autoclass:: pybamm.equivalent_circuit_elements.OCVElement
:members:
-
diff --git a/docs/source/api/models/submodels/equivalent_circuit_elements/rc_element.rst b/docs/source/api/models/submodels/equivalent_circuit_elements/rc_element.rst
index e783f4b291..bc938e4619 100644
--- a/docs/source/api/models/submodels/equivalent_circuit_elements/rc_element.rst
+++ b/docs/source/api/models/submodels/equivalent_circuit_elements/rc_element.rst
@@ -3,4 +3,3 @@ RC Element
.. autoclass:: pybamm.equivalent_circuit_elements.RCElement
:members:
-
diff --git a/docs/source/api/models/submodels/equivalent_circuit_elements/resistor_element.rst b/docs/source/api/models/submodels/equivalent_circuit_elements/resistor_element.rst
index 91d6e6d2c5..d519db70bf 100644
--- a/docs/source/api/models/submodels/equivalent_circuit_elements/resistor_element.rst
+++ b/docs/source/api/models/submodels/equivalent_circuit_elements/resistor_element.rst
@@ -3,4 +3,3 @@ Resistor Element
.. autoclass:: pybamm.equivalent_circuit_elements.ResistorElement
:members:
-
diff --git a/docs/source/api/models/submodels/equivalent_circuit_elements/thermal.rst b/docs/source/api/models/submodels/equivalent_circuit_elements/thermal.rst
index c95ead818f..a3c3ac62a7 100644
--- a/docs/source/api/models/submodels/equivalent_circuit_elements/thermal.rst
+++ b/docs/source/api/models/submodels/equivalent_circuit_elements/thermal.rst
@@ -3,4 +3,3 @@ Thermal SubModel
.. autoclass:: pybamm.equivalent_circuit_elements.ThermalSubModel
:members:
-
diff --git a/docs/source/api/models/submodels/equivalent_circuit_elements/voltage_model.rst b/docs/source/api/models/submodels/equivalent_circuit_elements/voltage_model.rst
index bda725dfcb..caa08f188f 100644
--- a/docs/source/api/models/submodels/equivalent_circuit_elements/voltage_model.rst
+++ b/docs/source/api/models/submodels/equivalent_circuit_elements/voltage_model.rst
@@ -3,4 +3,3 @@ Voltage Model
.. autoclass:: pybamm.equivalent_circuit_elements.VoltageModel
:members:
-
diff --git a/docs/source/api/models/submodels/external_circuit/function_control_external_circuit.rst b/docs/source/api/models/submodels/external_circuit/function_control_external_circuit.rst
index e977600663..baa9454076 100644
--- a/docs/source/api/models/submodels/external_circuit/function_control_external_circuit.rst
+++ b/docs/source/api/models/submodels/external_circuit/function_control_external_circuit.rst
@@ -14,4 +14,4 @@ Function control external circuit
:members:
.. autoclass:: pybamm.external_circuit.CCCVFunctionControl
- :members:
\ No newline at end of file
+ :members:
diff --git a/docs/source/api/models/submodels/interface/kinetics/base_kinetics.rst b/docs/source/api/models/submodels/interface/kinetics/base_kinetics.rst
index 67e4f15cf0..b17fb73a4d 100644
--- a/docs/source/api/models/submodels/interface/kinetics/base_kinetics.rst
+++ b/docs/source/api/models/submodels/interface/kinetics/base_kinetics.rst
@@ -2,4 +2,4 @@ Base Kinetics
=============
.. autoclass:: pybamm.kinetics.BaseKinetics
- :members:
\ No newline at end of file
+ :members:
diff --git a/docs/source/api/models/submodels/interface/kinetics/butler_volmer.rst b/docs/source/api/models/submodels/interface/kinetics/butler_volmer.rst
index 0c46b217c5..abf878e57b 100644
--- a/docs/source/api/models/submodels/interface/kinetics/butler_volmer.rst
+++ b/docs/source/api/models/submodels/interface/kinetics/butler_volmer.rst
@@ -5,4 +5,4 @@ Butler Volumer
:members:
.. autoclass:: pybamm.kinetics.AsymmetricButlerVolmer
- :members:
\ No newline at end of file
+ :members:
diff --git a/docs/source/api/models/submodels/interface/kinetics/inverse_kinetics/index.rst b/docs/source/api/models/submodels/interface/kinetics/inverse_kinetics/index.rst
index 260259ad3d..f6d3f495ff 100644
--- a/docs/source/api/models/submodels/interface/kinetics/inverse_kinetics/index.rst
+++ b/docs/source/api/models/submodels/interface/kinetics/inverse_kinetics/index.rst
@@ -3,4 +3,4 @@ Inverse Kinetics
.. toctree::
- inverse_butler_volmer
\ No newline at end of file
+ inverse_butler_volmer
diff --git a/docs/source/api/models/submodels/interface/kinetics/inverse_kinetics/inverse_butler_volmer.rst b/docs/source/api/models/submodels/interface/kinetics/inverse_kinetics/inverse_butler_volmer.rst
index 3a2f7e3e3b..60bd3c7c0d 100644
--- a/docs/source/api/models/submodels/interface/kinetics/inverse_kinetics/inverse_butler_volmer.rst
+++ b/docs/source/api/models/submodels/interface/kinetics/inverse_kinetics/inverse_butler_volmer.rst
@@ -2,4 +2,4 @@ Inverse Butler-Volmer
=====================
.. autoclass:: pybamm.kinetics.InverseButlerVolmer
- :members:
\ No newline at end of file
+ :members:
diff --git a/docs/source/api/models/submodels/interface/kinetics/linear.rst b/docs/source/api/models/submodels/interface/kinetics/linear.rst
index 57bc5b5437..22c02cbe21 100644
--- a/docs/source/api/models/submodels/interface/kinetics/linear.rst
+++ b/docs/source/api/models/submodels/interface/kinetics/linear.rst
@@ -2,4 +2,4 @@ Linear
======
.. autoclass:: pybamm.kinetics.Linear
- :members:
\ No newline at end of file
+ :members:
diff --git a/docs/source/api/models/submodels/interface/kinetics/marcus.rst b/docs/source/api/models/submodels/interface/kinetics/marcus.rst
index 2c72b71e5d..6252f22e8b 100644
--- a/docs/source/api/models/submodels/interface/kinetics/marcus.rst
+++ b/docs/source/api/models/submodels/interface/kinetics/marcus.rst
@@ -2,4 +2,4 @@ Marcus
======
.. autoclass:: pybamm.kinetics.Marcus
- :members:
\ No newline at end of file
+ :members:
diff --git a/docs/source/api/models/submodels/interface/kinetics/no_reaction.rst b/docs/source/api/models/submodels/interface/kinetics/no_reaction.rst
index 4da4e490a9..573b9a2117 100644
--- a/docs/source/api/models/submodels/interface/kinetics/no_reaction.rst
+++ b/docs/source/api/models/submodels/interface/kinetics/no_reaction.rst
@@ -2,4 +2,4 @@ NoReaction
==========
.. autoclass:: pybamm.kinetics.NoReaction
- :members:
\ No newline at end of file
+ :members:
diff --git a/docs/source/api/models/submodels/interface/kinetics/tafel.rst b/docs/source/api/models/submodels/interface/kinetics/tafel.rst
index 23280eea8a..1969ab5b53 100644
--- a/docs/source/api/models/submodels/interface/kinetics/tafel.rst
+++ b/docs/source/api/models/submodels/interface/kinetics/tafel.rst
@@ -2,4 +2,4 @@ Tafel
=====
.. autoclass:: pybamm.kinetics.ForwardTafel
- :members:
\ No newline at end of file
+ :members:
diff --git a/docs/source/api/models/submodels/interface/kinetics/total_main_kinetics.rst b/docs/source/api/models/submodels/interface/kinetics/total_main_kinetics.rst
index b8462437d2..36b17e2564 100644
--- a/docs/source/api/models/submodels/interface/kinetics/total_main_kinetics.rst
+++ b/docs/source/api/models/submodels/interface/kinetics/total_main_kinetics.rst
@@ -3,4 +3,4 @@ Total Main Kinetics
.. autoclass:: pybamm.kinetics.TotalMainKinetics
- :members:
\ No newline at end of file
+ :members:
diff --git a/docs/source/api/models/submodels/interface/lithium_plating/index.rst b/docs/source/api/models/submodels/interface/lithium_plating/index.rst
index 3edc2652d2..29bca51941 100644
--- a/docs/source/api/models/submodels/interface/lithium_plating/index.rst
+++ b/docs/source/api/models/submodels/interface/lithium_plating/index.rst
@@ -5,4 +5,4 @@ Lithium Plating
base_plating
no_plating
- plating
\ No newline at end of file
+ plating
diff --git a/docs/source/api/models/submodels/interface/open_circuit_potential/base_ocp.rst b/docs/source/api/models/submodels/interface/open_circuit_potential/base_ocp.rst
index e06196b6a8..41b0fdbb28 100644
--- a/docs/source/api/models/submodels/interface/open_circuit_potential/base_ocp.rst
+++ b/docs/source/api/models/submodels/interface/open_circuit_potential/base_ocp.rst
@@ -2,4 +2,4 @@ Base Open Circuit Potential
===========================
.. autoclass:: pybamm.open_circuit_potential.BaseOpenCircuitPotential
- :members:
\ No newline at end of file
+ :members:
diff --git a/docs/source/api/models/submodels/interface/open_circuit_potential/current_sigmoid_ocp.rst b/docs/source/api/models/submodels/interface/open_circuit_potential/current_sigmoid_ocp.rst
index f71e360495..832cc57603 100644
--- a/docs/source/api/models/submodels/interface/open_circuit_potential/current_sigmoid_ocp.rst
+++ b/docs/source/api/models/submodels/interface/open_circuit_potential/current_sigmoid_ocp.rst
@@ -3,4 +3,3 @@ Current Sigmoid Open Circuit Potential
.. autoclass:: pybamm.open_circuit_potential.CurrentSigmoidOpenCircuitPotential
:members:
-
diff --git a/docs/source/api/models/submodels/interface/sei/base_sei.rst b/docs/source/api/models/submodels/interface/sei/base_sei.rst
index bcfad871da..2e42e0eea9 100644
--- a/docs/source/api/models/submodels/interface/sei/base_sei.rst
+++ b/docs/source/api/models/submodels/interface/sei/base_sei.rst
@@ -2,4 +2,4 @@ SEI Base Model
==============
.. autoclass:: pybamm.sei.BaseModel
- :members:
\ No newline at end of file
+ :members:
diff --git a/docs/source/api/models/submodels/interface/sei/constant_sei.rst b/docs/source/api/models/submodels/interface/sei/constant_sei.rst
index e92180d1ca..a38652daa8 100644
--- a/docs/source/api/models/submodels/interface/sei/constant_sei.rst
+++ b/docs/source/api/models/submodels/interface/sei/constant_sei.rst
@@ -2,4 +2,4 @@ Constant SEI
============
.. autoclass:: pybamm.sei.ConstantSEI
- :members:
\ No newline at end of file
+ :members:
diff --git a/docs/source/api/models/submodels/interface/sei/index.rst b/docs/source/api/models/submodels/interface/sei/index.rst
index 07ecc475e3..3468f2d0ef 100644
--- a/docs/source/api/models/submodels/interface/sei/index.rst
+++ b/docs/source/api/models/submodels/interface/sei/index.rst
@@ -7,4 +7,4 @@ SEI models
constant_sei
no_sei
sei_growth
- total_sei
\ No newline at end of file
+ total_sei
diff --git a/docs/source/api/models/submodels/interface/sei/no_sei.rst b/docs/source/api/models/submodels/interface/sei/no_sei.rst
index dde5f645fe..69e93f5d2e 100644
--- a/docs/source/api/models/submodels/interface/sei/no_sei.rst
+++ b/docs/source/api/models/submodels/interface/sei/no_sei.rst
@@ -2,4 +2,4 @@ No SEI
======
.. autoclass:: pybamm.sei.NoSEI
- :members:
\ No newline at end of file
+ :members:
diff --git a/docs/source/api/models/submodels/interface/sei/total_sei.rst b/docs/source/api/models/submodels/interface/sei/total_sei.rst
index 7f65c9cae3..4210bcd47f 100644
--- a/docs/source/api/models/submodels/interface/sei/total_sei.rst
+++ b/docs/source/api/models/submodels/interface/sei/total_sei.rst
@@ -2,4 +2,4 @@ Total SEI
=========
.. autoclass:: pybamm.sei.TotalSEI
- :members:
\ No newline at end of file
+ :members:
diff --git a/docs/source/api/models/submodels/particle/index.rst b/docs/source/api/models/submodels/particle/index.rst
index a701eeec6e..ae020ac3fa 100644
--- a/docs/source/api/models/submodels/particle/index.rst
+++ b/docs/source/api/models/submodels/particle/index.rst
@@ -7,4 +7,4 @@ Particle
base_particle
fickian_diffusion
polynomial_profile
- x_averaged_polynomial_profile
\ No newline at end of file
+ x_averaged_polynomial_profile
diff --git a/docs/source/api/models/submodels/porosity/base_porosity.rst b/docs/source/api/models/submodels/porosity/base_porosity.rst
index 0886e2502c..a328047f4c 100644
--- a/docs/source/api/models/submodels/porosity/base_porosity.rst
+++ b/docs/source/api/models/submodels/porosity/base_porosity.rst
@@ -3,4 +3,3 @@ Base Model
.. autoclass:: pybamm.porosity.BaseModel
:members:
-
diff --git a/docs/source/api/models/submodels/porosity/constant_porosity.rst b/docs/source/api/models/submodels/porosity/constant_porosity.rst
index babb63bd36..7eff146917 100644
--- a/docs/source/api/models/submodels/porosity/constant_porosity.rst
+++ b/docs/source/api/models/submodels/porosity/constant_porosity.rst
@@ -1,7 +1,5 @@
-Constant Porosity
+Constant Porosity
=================
.. autoclass:: pybamm.porosity.Constant
:members:
-
-
diff --git a/docs/source/api/models/submodels/porosity/index.rst b/docs/source/api/models/submodels/porosity/index.rst
index deadc9e5c5..17d0f23fb8 100644
--- a/docs/source/api/models/submodels/porosity/index.rst
+++ b/docs/source/api/models/submodels/porosity/index.rst
@@ -8,4 +8,3 @@ Porosity
constant_porosity
reaction_driven_porosity
reaction_driven_porosity_ode
-
diff --git a/docs/source/api/models/submodels/porosity/reaction_driven_porosity.rst b/docs/source/api/models/submodels/porosity/reaction_driven_porosity.rst
index dc4dfc8d42..35d77d20d9 100644
--- a/docs/source/api/models/submodels/porosity/reaction_driven_porosity.rst
+++ b/docs/source/api/models/submodels/porosity/reaction_driven_porosity.rst
@@ -1,8 +1,5 @@
-Reaction-driven Model
+Reaction-driven Model
=====================
.. autoclass:: pybamm.porosity.ReactionDriven
:members:
-
-
-
diff --git a/docs/source/api/models/submodels/porosity/reaction_driven_porosity_ode.rst b/docs/source/api/models/submodels/porosity/reaction_driven_porosity_ode.rst
index f74f7d5c30..afa0e5f358 100644
--- a/docs/source/api/models/submodels/porosity/reaction_driven_porosity_ode.rst
+++ b/docs/source/api/models/submodels/porosity/reaction_driven_porosity_ode.rst
@@ -3,6 +3,3 @@ Reaction-driven Model as an ODE
.. autoclass:: pybamm.porosity.ReactionDrivenODE
:members:
-
-
-
diff --git a/docs/source/api/models/submodels/thermal/base_thermal.rst b/docs/source/api/models/submodels/thermal/base_thermal.rst
index fd3acc0edf..eb38b4934a 100644
--- a/docs/source/api/models/submodels/thermal/base_thermal.rst
+++ b/docs/source/api/models/submodels/thermal/base_thermal.rst
@@ -3,4 +3,3 @@ Base Thermal
.. autoclass:: pybamm.thermal.BaseThermal
:members:
-
diff --git a/docs/source/api/models/submodels/transport_efficiency/base_transport_efficiency.rst b/docs/source/api/models/submodels/transport_efficiency/base_transport_efficiency.rst
index e24f0cba15..fc581a666a 100644
--- a/docs/source/api/models/submodels/transport_efficiency/base_transport_efficiency.rst
+++ b/docs/source/api/models/submodels/transport_efficiency/base_transport_efficiency.rst
@@ -3,4 +3,3 @@ Base Model
.. autoclass:: pybamm.transport_efficiency.BaseModel
:members:
-
diff --git a/docs/source/api/models/submodels/transport_efficiency/bruggeman_transport_efficiency.rst b/docs/source/api/models/submodels/transport_efficiency/bruggeman_transport_efficiency.rst
index f50e825b09..f5e5f1c1bc 100644
--- a/docs/source/api/models/submodels/transport_efficiency/bruggeman_transport_efficiency.rst
+++ b/docs/source/api/models/submodels/transport_efficiency/bruggeman_transport_efficiency.rst
@@ -1,8 +1,5 @@
-Bruggeman Model
+Bruggeman Model
===============
.. autoclass:: pybamm.transport_efficiency.Bruggeman
:members:
-
-
-
diff --git a/docs/source/api/models/submodels/transport_efficiency/index.rst b/docs/source/api/models/submodels/transport_efficiency/index.rst
index fe7b640f68..fcdec7077f 100644
--- a/docs/source/api/models/submodels/transport_efficiency/index.rst
+++ b/docs/source/api/models/submodels/transport_efficiency/index.rst
@@ -6,4 +6,3 @@ transport_efficiency
base_transport_efficiency
bruggeman_transport_efficiency
-
diff --git a/docs/source/api/plotting/plot_summary_variables.rst b/docs/source/api/plotting/plot_summary_variables.rst
index 35baeda605..746c501c5c 100644
--- a/docs/source/api/plotting/plot_summary_variables.rst
+++ b/docs/source/api/plotting/plot_summary_variables.rst
@@ -1,4 +1,4 @@
Plot Summary Variables
======================
-.. autofunction:: pybamm.plot_summary_variables
\ No newline at end of file
+.. autofunction:: pybamm.plot_summary_variables
diff --git a/docs/source/api/plotting/plot_voltage_components.rst b/docs/source/api/plotting/plot_voltage_components.rst
index 04d95e62cc..6954374d0c 100644
--- a/docs/source/api/plotting/plot_voltage_components.rst
+++ b/docs/source/api/plotting/plot_voltage_components.rst
@@ -3,4 +3,4 @@
Plot Voltage Components
=======================
-.. autofunction:: pybamm.plot_voltage_components
\ No newline at end of file
+.. autofunction:: pybamm.plot_voltage_components
diff --git a/docs/source/api/plotting/quick_plot.rst b/docs/source/api/plotting/quick_plot.rst
index ef81719056..ff7576a00d 100644
--- a/docs/source/api/plotting/quick_plot.rst
+++ b/docs/source/api/plotting/quick_plot.rst
@@ -6,4 +6,4 @@ Quick Plot
.. autoclass:: pybamm.QuickPlot
:members:
-.. autofunction:: pybamm.dynamic_plot
\ No newline at end of file
+.. autofunction:: pybamm.dynamic_plot
diff --git a/docs/source/api/simulation.rst b/docs/source/api/simulation.rst
index a50a67eb21..203420ad73 100644
--- a/docs/source/api/simulation.rst
+++ b/docs/source/api/simulation.rst
@@ -2,4 +2,4 @@ Simulation
==========
.. autoclass:: pybamm.Simulation
- :members:
\ No newline at end of file
+ :members:
diff --git a/docs/source/api/solvers/index.rst b/docs/source/api/solvers/index.rst
index d87f003309..af2a8893dd 100644
--- a/docs/source/api/solvers/index.rst
+++ b/docs/source/api/solvers/index.rst
@@ -13,4 +13,3 @@ Solvers
algebraic_solvers
solution
processed_variable
-
diff --git a/docs/source/api/spatial_methods/finite_volume.rst b/docs/source/api/spatial_methods/finite_volume.rst
index f57c5e9e76..3b6122acc8 100644
--- a/docs/source/api/spatial_methods/finite_volume.rst
+++ b/docs/source/api/spatial_methods/finite_volume.rst
@@ -3,4 +3,3 @@ Finite Volume
.. autoclass:: pybamm.FiniteVolume
:members:
-
diff --git a/docs/source/user_guide/installation/GNU-linux.rst b/docs/source/user_guide/installation/GNU-linux.rst
index 8f1ee50dbc..3bdeda9ad9 100644
--- a/docs/source/user_guide/installation/GNU-linux.rst
+++ b/docs/source/user_guide/installation/GNU-linux.rst
@@ -185,7 +185,7 @@ Then, to install PyBaMM as a `developer `__ 2.9.0 plot For generating simulation GIFs.
`matplotlib `__ 2.0.0 plot To plot various battery models, and analyzing battery performance.
-=========================================================== ================== ================== ==================================================================
+=========================================================== ================== ================== ==================================================================
.. _install.pandas_dependencies:
@@ -127,7 +127,7 @@ Dependency
`sphinx-autobuild `__ \- docs For re-building docs once triggered.
================================================================================================= ================== ================== =======================================================================
-.. _install.examples_dependencies:
+.. _install.examples_dependencies:
Examples dependencies
^^^^^^^^^^^^^^^^^^^^^
@@ -238,7 +238,7 @@ Dependency
Before running ``pip install "pybamm[odes]"``, make sure to install ``scikits.odes`` build-time requirements as described `here `_ .
Full installation guide
------------------------
+-----------------------
Installing a specific version? Installing from source? Check the advanced installation pages below
@@ -248,4 +248,4 @@ Installing a specific version? Installing from source? Check the advanced instal
GNU-linux
windows
windows-wsl
- install-from-source
\ No newline at end of file
+ install-from-source
diff --git a/docs/source/user_guide/installation/install-from-source.rst b/docs/source/user_guide/installation/install-from-source.rst
index 82a7976852..0e3573cee2 100644
--- a/docs/source/user_guide/installation/install-from-source.rst
+++ b/docs/source/user_guide/installation/install-from-source.rst
@@ -90,7 +90,7 @@ If you'd rather do things yourself,
2. Compile and install SuiteSparse (PyBaMM only requires the ``KLU`` component).
3. Compile and install SUNDIALS.
4. Clone the pybind11 repository in the ``PyBaMM/`` directory (make sure the directory is named ``pybind11``).
-
+
PyBaMM ships with a Python script that automates points 2. and 3. You can run it with
@@ -193,7 +193,7 @@ Finally, to run the unit and the integration suites sequentially, use
nox -s tests
-Using the test runner
+Using the test runner
~~~~~~~~~~~~~~~~~~~~~~
You can run unit tests for PyBaMM using
diff --git a/pybamm/input/discharge_data/Enertech_cells/0.1C_discharge_displacement.txt b/pybamm/input/discharge_data/Enertech_cells/0.1C_discharge_displacement.txt
index 1abab6f79c..ec8998b3c4 100644
--- a/pybamm/input/discharge_data/Enertech_cells/0.1C_discharge_displacement.txt
+++ b/pybamm/input/discharge_data/Enertech_cells/0.1C_discharge_displacement.txt
@@ -3742,4 +3742,4 @@
36860 4.49083105587186E-7
36870 3.6003394272133456E-7
36880 2.7098410120201244E-7
-36881.8408095558 2.5459165129906363E-7
\ No newline at end of file
+36881.8408095558 2.5459165129906363E-7
diff --git a/pybamm/input/discharge_data/Enertech_cells/0.5C_discharge_displacement.txt b/pybamm/input/discharge_data/Enertech_cells/0.5C_discharge_displacement.txt
index 8ee457ce77..42103e4d32 100644
--- a/pybamm/input/discharge_data/Enertech_cells/0.5C_discharge_displacement.txt
+++ b/pybamm/input/discharge_data/Enertech_cells/0.5C_discharge_displacement.txt
@@ -785,4 +785,4 @@
7290 5.629040101801396E-6
7300 5.185645939982822E-6
7310 4.742039959903541E-6
-7311.673930367749 4.667763172375133E-6
\ No newline at end of file
+7311.673930367749 4.667763172375133E-6
diff --git a/pybamm/input/discharge_data/Enertech_cells/1C_discharge_displacement.txt b/pybamm/input/discharge_data/Enertech_cells/1C_discharge_displacement.txt
index 69f31d5e6c..c8881d82e0 100644
--- a/pybamm/input/discharge_data/Enertech_cells/1C_discharge_displacement.txt
+++ b/pybamm/input/discharge_data/Enertech_cells/1C_discharge_displacement.txt
@@ -414,4 +414,4 @@
3580 1.3950084177824084E-5
3590 1.3086398528538203E-5
3600 1.2219619567992016E-5
-3609.1611221134444 1.1422884433792557E-5
\ No newline at end of file
+3609.1611221134444 1.1422884433792557E-5
diff --git a/pybamm/input/discharge_data/Enertech_cells/stn_2C.txt b/pybamm/input/discharge_data/Enertech_cells/stn_2C.txt
index 2b924bdb92..1517501646 100755
--- a/pybamm/input/discharge_data/Enertech_cells/stn_2C.txt
+++ b/pybamm/input/discharge_data/Enertech_cells/stn_2C.txt
@@ -1,5 +1,5 @@
-# Negative particle surface tangetial stress close to the separator
-# for the Enertech cells Ai2020 JES
+# Negative particle surface tangetial stress close to the separator
+# for the Enertech cells Ai2020 JES
# time [s] and normalised stress sigma_t_surf_n/E_n
0,-1.0741e-17
2,0.00031276
diff --git a/pybamm/input/discharge_data/Enertech_cells/stp_2C.txt b/pybamm/input/discharge_data/Enertech_cells/stp_2C.txt
index 0cf5eb9b13..2190ad2fbf 100755
--- a/pybamm/input/discharge_data/Enertech_cells/stp_2C.txt
+++ b/pybamm/input/discharge_data/Enertech_cells/stp_2C.txt
@@ -1,4 +1,4 @@
-# Positive particle surface tangetial stress close to the separator
+# Positive particle surface tangetial stress close to the separator
# for the Enertech cells Ai2020 JES
# time [s] and normalised stress sigma_t_surf_p/E_p
0,2.207e-18
diff --git a/pybamm/input/parameters/lithium_ion/data/graphite_LGM50_ocp_Chen2020.csv b/pybamm/input/parameters/lithium_ion/data/graphite_LGM50_ocp_Chen2020.csv
index c43da295d5..15615f5bb2 100644
--- a/pybamm/input/parameters/lithium_ion/data/graphite_LGM50_ocp_Chen2020.csv
+++ b/pybamm/input/parameters/lithium_ion/data/graphite_LGM50_ocp_Chen2020.csv
@@ -250,4 +250,4 @@
0.9704444444444444,0.07871961454862104
0.9802222222222222,0.07782495680237907
0.99,0.07693029905613709
-1,0.0760153081792987
\ No newline at end of file
+1,0.0760153081792987
diff --git a/pybamm/input/parameters/lithium_ion/data/graphite_ocp_Enertech_Ai2020.csv b/pybamm/input/parameters/lithium_ion/data/graphite_ocp_Enertech_Ai2020.csv
index 8a5bce2874..abde62a61c 100644
--- a/pybamm/input/parameters/lithium_ion/data/graphite_ocp_Enertech_Ai2020.csv
+++ b/pybamm/input/parameters/lithium_ion/data/graphite_ocp_Enertech_Ai2020.csv
@@ -126,4 +126,4 @@
0.999241066,0.030242658
0.999746961,0.024850768
0.999936448,0.019251502
-1,0.004994678
\ No newline at end of file
+1,0.004994678
diff --git a/pybamm/input/parameters/lithium_ion/data/lico2_ocp_Ai2020.csv b/pybamm/input/parameters/lithium_ion/data/lico2_ocp_Ai2020.csv
index 2c81422639..b1053f1a39 100644
--- a/pybamm/input/parameters/lithium_ion/data/lico2_ocp_Ai2020.csv
+++ b/pybamm/input/parameters/lithium_ion/data/lico2_ocp_Ai2020.csv
@@ -1,4 +1,4 @@
-# OCP for lico2 from Rieger 2016
+# OCP for lico2 from Rieger 2016
# stoichiometry , OCP [V]
0.4,4.390781177520233
0.401,4.387755138269558
diff --git a/pybamm/input/parameters/lithium_ion/data/nca_ocp_Kim2011_data.csv b/pybamm/input/parameters/lithium_ion/data/nca_ocp_Kim2011_data.csv
index dd00060753..8057f34f56 100644
--- a/pybamm/input/parameters/lithium_ion/data/nca_ocp_Kim2011_data.csv
+++ b/pybamm/input/parameters/lithium_ion/data/nca_ocp_Kim2011_data.csv
@@ -72,4 +72,4 @@
0.9896421223593032, 3.204894695680104
0.9905703960976598, 3.1496257442302342
0.9915055751666949, 3.104277451188519
-0.9933828386354436, 3.023501523513243
\ No newline at end of file
+0.9933828386354436, 3.023501523513243
diff --git a/pybamm/input/parameters/lithium_ion/data/nmc_LGM50_ocp_Chen2020.csv b/pybamm/input/parameters/lithium_ion/data/nmc_LGM50_ocp_Chen2020.csv
index 7dc9adc71c..8a2edc1ab0 100644
--- a/pybamm/input/parameters/lithium_ion/data/nmc_LGM50_ocp_Chen2020.csv
+++ b/pybamm/input/parameters/lithium_ion/data/nmc_LGM50_ocp_Chen2020.csv
@@ -240,4 +240,4 @@
0.903203643476430,3.56849220000000
0.905926128940627,3.56721330000000
# extra points to avoid extrapolation
-1,3.52302166875714
\ No newline at end of file
+1,3.52302166875714
diff --git a/pybamm/models/full_battery_models/base_battery_model.py b/pybamm/models/full_battery_models/base_battery_model.py
index 7a39874108..db0e38710a 100644
--- a/pybamm/models/full_battery_models/base_battery_model.py
+++ b/pybamm/models/full_battery_models/base_battery_model.py
@@ -44,9 +44,9 @@ class BatteryModelOptions(pybamm.FuzzyDict):
Sets the current collector model to use. Can be "uniform" (default),
"potential pair" or "potential pair quite conductive".
* "diffusivity" : str
- Sets the model for the diffusivity. Can be "single"
- (default) or "current sigmoid". A 2-tuple can be provided for different
- behaviour in negative and positive electrodes.
+ Sets the model for the diffusivity. Can be "single"
+ (default) or "current sigmoid". A 2-tuple can be provided for different
+ behaviour in negative and positive electrodes.
* "dimensionality" : int
Sets the dimension of the current collector problem. Can be 0
(default), 1 or 2.
@@ -54,9 +54,9 @@ class BatteryModelOptions(pybamm.FuzzyDict):
Can be "default" (default), "full", "leading order", "composite" or
"integrated".
* "exchange-current density" : str
- Sets the model for the exchange-current density. Can be "single"
- (default) or "current sigmoid". A 2-tuple can be provided for different
- behaviour in negative and positive electrodes.
+ Sets the model for the exchange-current density. Can be "single"
+ (default) or "current sigmoid". A 2-tuple can be provided for different
+ behaviour in negative and positive electrodes.
* "hydrolysis" : str
Whether to include hydrolysis in the model. Only implemented for
lead-acid models. Can be "false" (default) or "true". If "true", then
@@ -81,9 +81,9 @@ class BatteryModelOptions(pybamm.FuzzyDict):
A 2-tuple can be provided for different behaviour in negative and
positive electrodes.
* "open-circuit potential" : str
- Sets the model for the open circuit potential. Can be "single"
- (default) or "current sigmoid". A 2-tuple can be provided for different
- behaviour in negative and positive electrodes.
+ Sets the model for the open circuit potential. Can be "single"
+ (default) or "current sigmoid". A 2-tuple can be provided for different
+ behaviour in negative and positive electrodes.
* "operating mode" : str
Sets the operating mode for the model. This determines how the current
is set. Can be:
@@ -103,7 +103,7 @@ class BatteryModelOptions(pybamm.FuzzyDict):
* "particle" : str
Sets the submodel to use to describe behaviour within the particle.
Can be "Fickian diffusion" (default), "uniform profile",
- "quadratic profile", or "quartic profile". A 2-tuple can be provided
+ "quadratic profile", or "quartic profile". A 2-tuple can be provided
for different behaviour in negative and positive electrodes.
* "particle mechanics" : str
Sets the model to account for mechanical effects such as particle
diff --git a/pybamm/models/submodels/interface/kinetics/inverse_kinetics/__init__.py b/pybamm/models/submodels/interface/kinetics/inverse_kinetics/__init__.py
index 8b13789179..e69de29bb2 100644
--- a/pybamm/models/submodels/interface/kinetics/inverse_kinetics/__init__.py
+++ b/pybamm/models/submodels/interface/kinetics/inverse_kinetics/__init__.py
@@ -1 +0,0 @@
-
diff --git a/pybamm/solvers/c_solvers/idaklu/casadi_functions.cpp b/pybamm/solvers/c_solvers/idaklu/casadi_functions.cpp
index e56b0902b2..310575742d 100644
--- a/pybamm/solvers/c_solvers/idaklu/casadi_functions.cpp
+++ b/pybamm/solvers/c_solvers/idaklu/casadi_functions.cpp
@@ -41,7 +41,7 @@ CasadiFunctions::CasadiFunctions(
const Function &mass_action, const Function &sens, const Function &events,
const int n_s, int n_e, const int n_p, const Options& options)
: number_of_states(n_s), number_of_events(n_e), number_of_parameters(n_p),
- number_of_nnz(jac_times_cjmass_nnz),
+ number_of_nnz(jac_times_cjmass_nnz),
jac_bandwidth_lower(jac_bandwidth_lower), jac_bandwidth_upper(jac_bandwidth_upper),
rhs_alg(rhs_alg),
jac_times_cjmass(jac_times_cjmass), jac_action(jac_action),
@@ -67,7 +67,7 @@ CasadiFunctions::CasadiFunctions(
}
inputs.resize(inputs_length);
-
+
}
realtype *CasadiFunctions::get_tmp_state_vector() { return tmp_state_vector.data(); }
diff --git a/pybamm/solvers/c_solvers/idaklu/casadi_solver.cpp b/pybamm/solvers/c_solvers/idaklu/casadi_solver.cpp
index 23a24d5372..67bb2793ae 100644
--- a/pybamm/solvers/c_solvers/idaklu/casadi_solver.cpp
+++ b/pybamm/solvers/c_solvers/idaklu/casadi_solver.cpp
@@ -10,8 +10,8 @@ create_casadi_solver(int number_of_states, int number_of_parameters,
const Function &rhs_alg, const Function &jac_times_cjmass,
const np_array_int &jac_times_cjmass_colptrs,
const np_array_int &jac_times_cjmass_rowvals,
- const int jac_times_cjmass_nnz,
- const int jac_bandwidth_lower, const int jac_bandwidth_upper,
+ const int jac_times_cjmass_nnz,
+ const int jac_bandwidth_lower, const int jac_bandwidth_upper,
const Function &jac_action,
const Function &mass_action, const Function &sens,
const Function &events, const int number_of_events,
@@ -26,7 +26,7 @@ create_casadi_solver(int number_of_states, int number_of_parameters,
options_cpp);
return new CasadiSolver(atol_np, rel_tol, rhs_alg_id, number_of_parameters,
- number_of_events, jac_times_cjmass_nnz,
+ number_of_events, jac_times_cjmass_nnz,
jac_bandwidth_lower, jac_bandwidth_upper,
std::move(functions), options_cpp);
}
@@ -169,7 +169,7 @@ CasadiSolver::CasadiSolver(np_array atol_np, double rel_tol,
}
else if (options.linear_solver == "SUNLinSol_Band")
{
- DEBUG("\tsetting SUNLinSol_Band linear solver");
+ DEBUG("\tsetting SUNLinSol_Band linear solver");
#if SUNDIALS_VERSION_MAJOR >= 6
LS = SUNLinSol_Band(yy, J, sunctx);
#else
@@ -302,15 +302,15 @@ Solution CasadiSolver::solve(np_array t_np, np_array y0_np, np_array yp0_np,
if (y0.size() != number_of_states + number_of_parameters * number_of_states) {
throw std::domain_error(
- "y0 has wrong size. Expected " +
- std::to_string(number_of_states + number_of_parameters * number_of_states) +
+ "y0 has wrong size. Expected " +
+ std::to_string(number_of_states + number_of_parameters * number_of_states) +
" but got " + std::to_string(y0.size()));
}
if (yp0.size() != number_of_states + number_of_parameters * number_of_states) {
throw std::domain_error(
- "yp0 has wrong size. Expected " +
- std::to_string(number_of_states + number_of_parameters * number_of_states) +
+ "yp0 has wrong size. Expected " +
+ std::to_string(number_of_states + number_of_parameters * number_of_states) +
" but got " + std::to_string(yp0.size()));
}
diff --git a/pybamm/solvers/c_solvers/idaklu/casadi_solver.hpp b/pybamm/solvers/c_solvers/idaklu/casadi_solver.hpp
index 09c4434d5b..75bc73e9d3 100644
--- a/pybamm/solvers/c_solvers/idaklu/casadi_solver.hpp
+++ b/pybamm/solvers/c_solvers/idaklu/casadi_solver.hpp
@@ -48,8 +48,8 @@ create_casadi_solver(int number_of_states, int number_of_parameters,
const Function &rhs_alg, const Function &jac_times_cjmass,
const np_array_int &jac_times_cjmass_colptrs,
const np_array_int &jac_times_cjmass_rowvals,
- const int jac_times_cjmass_nnz,
- const int jac_bandwidth_lower, const int jac_bandwidth_upper,
+ const int jac_times_cjmass_nnz,
+ const int jac_bandwidth_lower, const int jac_bandwidth_upper,
const Function &jac_action,
const Function &mass_action, const Function &sens,
const Function &event, const int number_of_events,
diff --git a/pybamm/solvers/c_solvers/idaklu/casadi_sundials_functions.cpp b/pybamm/solvers/c_solvers/idaklu/casadi_sundials_functions.cpp
index eaf383cda4..8a3d96966f 100644
--- a/pybamm/solvers/c_solvers/idaklu/casadi_sundials_functions.cpp
+++ b/pybamm/solvers/c_solvers/idaklu/casadi_sundials_functions.cpp
@@ -172,7 +172,7 @@ int jacobian_casadi(realtype tt, realtype cj, N_Vector yy, N_Vector yp,
p_python_functions->jac_times_cjmass();
- if (p_python_functions->options.using_banded_matrix)
+ if (p_python_functions->options.using_banded_matrix)
{
// copy data from temporary matrix to the banded matrix
auto jac_colptrs = p_python_functions->jac_times_cjmass_colptrs.data();
@@ -187,7 +187,7 @@ int jacobian_casadi(realtype tt, realtype cj, N_Vector yy, N_Vector yp,
SM_COLUMN_ELEMENT_B(banded_col, row_ij, col_ij) = value_ij;
}
}
- }
+ }
else if (p_python_functions->options.using_sparse_matrix)
{
@@ -279,7 +279,7 @@ int sensitivities_casadi(int Ns, realtype t, N_Vector yy, N_Vector yp,
}
// resvalsS now has (∂F/∂p i )
p_python_functions->sens();
-
+
for (int i = 0; i < np; i++)
{
// put (∂F/∂y)s i (t) in tmp
diff --git a/pybamm/solvers/c_solvers/idaklu/common.hpp b/pybamm/solvers/c_solvers/idaklu/common.hpp
index 1931f8cb61..d6ddb5c16b 100644
--- a/pybamm/solvers/c_solvers/idaklu/common.hpp
+++ b/pybamm/solvers/c_solvers/idaklu/common.hpp
@@ -12,7 +12,7 @@
#if SUNDIALS_VERSION_MAJOR >= 6
- #include
+ #include
#endif
#include /* access to KLU linear solver */
@@ -37,7 +37,7 @@ using np_array_dense = py::array_t;
#ifdef NDEBUG
-#define DEBUG(x)
+#define DEBUG(x)
#else
#define DEBUG(x) do { std::cerr << __FILE__ << ':' << __LINE__ << ' ' << x << std::endl; } while (0)
#endif
diff --git a/pybamm/solvers/c_solvers/idaklu/options.cpp b/pybamm/solvers/c_solvers/idaklu/options.cpp
index 2a5ed58d9c..33998470ed 100644
--- a/pybamm/solvers/c_solvers/idaklu/options.cpp
+++ b/pybamm/solvers/c_solvers/idaklu/options.cpp
@@ -2,7 +2,7 @@
#include
#include
-
+
using namespace std::string_literals;
Options::Options(py::dict options)
@@ -35,7 +35,7 @@ Options::Options(py::dict options)
else
{
throw std::domain_error(
- "Unknown jacobian type \""s + jacobian +
+ "Unknown jacobian type \""s + jacobian +
"\". Should be one of \"sparse\", \"banded\", \"dense\", \"matrix-free\" or \"none\"."s
);
}
@@ -97,7 +97,7 @@ Options::Options(py::dict options)
{
throw std::domain_error(
"Unknown linear solver or incompatible options. "
- "jacobian = \"" + jacobian + "\" linear solver = \"" + linear_solver + "\""
+ "jacobian = \"" + jacobian + "\" linear solver = \"" + linear_solver + "\""
);
}
@@ -106,7 +106,7 @@ Options::Options(py::dict options)
if (preconditioner != "none" && preconditioner != "BBDP")
{
throw std::domain_error(
- "Unknown preconditioner \""s + preconditioner +
+ "Unknown preconditioner \""s + preconditioner +
"\", use one of \"BBDP\" or \"none\""s
);
}
diff --git a/pybamm/solvers/c_solvers/idaklu/options.hpp b/pybamm/solvers/c_solvers/idaklu/options.hpp
index 30e6fc634d..db5f136a01 100644
--- a/pybamm/solvers/c_solvers/idaklu/options.hpp
+++ b/pybamm/solvers/c_solvers/idaklu/options.hpp
@@ -9,8 +9,8 @@ struct Options {
bool using_banded_matrix;
bool using_iterative_solver;
std::string jacobian;
- std::string linear_solver; // klu, lapack, spbcg
- std::string preconditioner; // spbcg
+ std::string linear_solver; // klu, lapack, spbcg
+ std::string preconditioner; // spbcg
int linsol_max_iterations;
int precon_half_bandwidth;
int precon_half_bandwidth_keep;
diff --git a/pybamm/solvers/c_solvers/idaklu/python.cpp b/pybamm/solvers/c_solvers/idaklu/python.cpp
index a1803988d4..9ec018109e 100644
--- a/pybamm/solvers/c_solvers/idaklu/python.cpp
+++ b/pybamm/solvers/c_solvers/idaklu/python.cpp
@@ -14,10 +14,10 @@ class PybammFunctions
const jac_get_type &get_jac_data_in,
const jac_get_type &get_jac_row_vals_in,
const jac_get_type &get_jac_col_ptrs_in,
- const event_type &event,
+ const event_type &event,
const int n_s, int n_e, const int n_p,
const np_array &inputs)
- : number_of_states(n_s), number_of_events(n_e),
+ : number_of_states(n_s), number_of_events(n_e),
number_of_parameters(n_p),
py_res(res), py_jac(jac),
py_sens(sens),
@@ -48,11 +48,11 @@ class PybammFunctions
void sensitivities(
std::vector& resvalS,
- const double t, const np_array& y, const np_array& yp,
- const std::vector& yS, const std::vector& ypS)
+ const double t, const np_array& y, const np_array& yp,
+ const std::vector& yS, const std::vector& ypS)
{
// this function evaluates the sensitivity equations required by IDAS,
- // returning them in resvalS, which is preallocated as a numpy array
+ // returning them in resvalS, which is preallocated as a numpy array
// of size (np, n), where n is the number of states and np is the number
// of parameters
//
@@ -199,11 +199,11 @@ int events(realtype t, N_Vector yy, N_Vector yp, realtype *events_ptr,
return (0);
}
-int sensitivities(int Ns, realtype t, N_Vector yy, N_Vector yp,
- N_Vector resval, N_Vector *yS, N_Vector *ypS, N_Vector *resvalS,
+int sensitivities(int Ns, realtype t, N_Vector yy, N_Vector yp,
+ N_Vector resval, N_Vector *yS, N_Vector *ypS, N_Vector *resvalS,
void *user_data, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3) {
-// This function computes the sensitivity residual for all sensitivity
-// equations. It must compute the vectors
+// This function computes the sensitivity residual for all sensitivity
+// equations. It must compute the vectors
// (∂F/∂y)s i (t)+(∂F/∂ ẏ) ṡ i (t)+(∂F/∂p i ) and store them in resvalS[i].
// Ns is the number of sensitivities.
// t is the current value of the independent variable.
@@ -212,15 +212,15 @@ int sensitivities(int Ns, realtype t, N_Vector yy, N_Vector yp,
// resval contains the current value F of the original DAE residual.
// yS contains the current values of the sensitivities s i .
// ypS contains the current values of the sensitivity derivatives ṡ i .
-// resvalS contains the output sensitivity residual vectors.
+// resvalS contains the output sensitivity residual vectors.
// Memory allocation for resvalS is handled within idas.
// user data is a pointer to user data.
-// tmp1, tmp2, tmp3 are N Vectors of length N which can be used as
+// tmp1, tmp2, tmp3 are N Vectors of length N which can be used as
// temporary storage.
//
-// Return value An IDASensResFn should return 0 if successful,
+// Return value An IDASensResFn should return 0 if successful,
// a positive value if a recoverable error
-// occurred (in which case idas will attempt to correct),
+// occurred (in which case idas will attempt to correct),
// or a negative value if it failed unrecoverably (in which case the integration is halted and IDA SRES FAIL is returned)
//
PybammFunctions *python_functions_ptr =
@@ -232,7 +232,7 @@ int sensitivities(int Ns, realtype t, N_Vector yy, N_Vector yp,
// memory managed by sundials, so pass a destructor that does nothing
auto state_vector_shape = std::vector{n, 1};
- np_array y_np = np_array(state_vector_shape, N_VGetArrayPointer(yy),
+ np_array y_np = np_array(state_vector_shape, N_VGetArrayPointer(yy),
py::capsule(&yy, [](void* p) {}));
np_array yp_np = np_array(state_vector_shape, N_VGetArrayPointer(yp),
py::capsule(&yp, [](void* p) {}));
@@ -252,7 +252,7 @@ int sensitivities(int Ns, realtype t, N_Vector yy, N_Vector yp,
std::vector resvalS_np(np);
for (int i = 0; i < np; i++) {
auto capsule = py::capsule(resvalS + i, [](void* p) {});
- resvalS_np[i] = np_array(state_vector_shape,
+ resvalS_np[i] = np_array(state_vector_shape,
N_VGetArrayPointer(resvalS[i]), capsule);
}
@@ -266,12 +266,12 @@ int sensitivities(int Ns, realtype t, N_Vector yy, N_Vector yp,
/* main program */
Solution solve_python(np_array t_np, np_array y0_np, np_array yp0_np,
- residual_type res, jacobian_type jac,
+ residual_type res, jacobian_type jac,
sensitivities_type sens,
- jac_get_type gjd, jac_get_type gjrv, jac_get_type gjcp,
+ jac_get_type gjd, jac_get_type gjrv, jac_get_type gjcp,
int nnz, event_type event,
int number_of_events, int use_jacobian, np_array rhs_alg_id,
- np_array atol_np, double rel_tol, np_array inputs,
+ np_array atol_np, double rel_tol, np_array inputs,
int number_of_parameters)
{
auto t = t_np.unchecked<1>();
@@ -374,7 +374,7 @@ Solution solve_python(np_array t_np, np_array y0_np, np_array yp0_np,
if (number_of_parameters > 0)
{
- IDASensInit(ida_mem, number_of_parameters,
+ IDASensInit(ida_mem, number_of_parameters,
IDA_SIMULTANEOUS, sensitivities, yyS, ypS);
IDASensEEtolerances(ida_mem);
}
@@ -433,7 +433,7 @@ Solution solve_python(np_array t_np, np_array y0_np, np_array yp0_np,
y_return[t_i * number_of_states + j] = yval[j];
}
for (int j = 0; j < number_of_parameters; j++) {
- const int base_index = j * number_of_timesteps * number_of_states
+ const int base_index = j * number_of_timesteps * number_of_states
+ t_i * number_of_states;
for (int k = 0; k < number_of_states; k++) {
yS_return[base_index + k] = ySval[j][k];
@@ -468,11 +468,10 @@ Solution solve_python(np_array t_np, np_array y0_np, np_array yp0_np,
np_array y_ret = np_array(t_i * number_of_states, &y_return[0]);
np_array yS_ret = np_array(
std::vector{number_of_parameters, number_of_timesteps, number_of_states},
- &yS_return[0]
+ &yS_return[0]
);
Solution sol(retval, t_ret, y_ret, yS_ret);
return sol;
}
-
diff --git a/pybamm/solvers/c_solvers/idaklu/python.hpp b/pybamm/solvers/c_solvers/idaklu/python.hpp
index 8c29bbc496..8ae73f2a90 100644
--- a/pybamm/solvers/c_solvers/idaklu/python.hpp
+++ b/pybamm/solvers/c_solvers/idaklu/python.hpp
@@ -9,9 +9,9 @@ using residual_type = std::function<
np_array(realtype, np_array, np_array, np_array)
>;
using sensitivities_type = std::function&, realtype, const np_array&,
+ std::vector&, realtype, const np_array&,
const np_array&,
- const np_array&, const std::vector&,
+ const np_array&, const std::vector&,
const std::vector&
)>;
using jacobian_type = std::function;
@@ -24,9 +24,9 @@ using jac_get_type = std::function;
Solution solve_python(np_array t_np, np_array y0_np, np_array yp0_np,
- residual_type res, jacobian_type jac,
+ residual_type res, jacobian_type jac,
sensitivities_type sens,
- jac_get_type gjd, jac_get_type gjrv, jac_get_type gjcp,
+ jac_get_type gjd, jac_get_type gjrv, jac_get_type gjcp,
int nnz, event_type event,
int number_of_events, int use_jacobian, np_array rhs_alg_id,
np_array atol_np, double rel_tol, np_array inputs,
diff --git a/run-tests.py b/run-tests.py
index 4705fd37a5..5d4bb65b65 100755
--- a/run-tests.py
+++ b/run-tests.py
@@ -187,7 +187,7 @@ def test_notebook(path, executable="python"):
print("Test " + path + " ... ", end="")
sys.stdout.flush()
- # Make sure the notebook has a
+ # Make sure the notebook has a
# "%pip install pybamm[plot,cite] -q" command, for using Google Colab
with open(path, "r") as f:
if "%pip install pybamm[plot,cite] -q" not in f.read():
diff --git a/scripts/replace-cmake/sundials-3.1.1/CMakeLists.txt b/scripts/replace-cmake/sundials-3.1.1/CMakeLists.txt
index 342ddf4f9b..81f4267c22 100644
--- a/scripts/replace-cmake/sundials-3.1.1/CMakeLists.txt
+++ b/scripts/replace-cmake/sundials-3.1.1/CMakeLists.txt
@@ -36,7 +36,7 @@ SET(PACKAGE_NAME "SUNDIALS")
SET(PACKAGE_STRING "SUNDIALS 3.1.1")
SET(PACKAGE_TARNAME "sundials")
-# set SUNDIALS version numbers
+# set SUNDIALS version numbers
# (use "" for the version label if none is needed)
SET(PACKAGE_VERSION_MAJOR "3")
SET(PACKAGE_VERSION_MINOR "1")
@@ -387,7 +387,7 @@ OPTION(HYPRE_ENABLE "Enable hypre support" OFF)
# Using hypre requres building with MPI enabled
IF(HYPRE_ENABLE AND NOT MPI_ENABLE)
- PRINT_WARNING("MPI not enabled - Disabling hypre"
+ PRINT_WARNING("MPI not enabled - Disabling hypre"
"Set MPI_ENABLE to ON to use parhyp")
FORCE_VARIABLE(HYPRE_ENABLE BOOL "Enable hypre support" OFF)
ENDIF()
@@ -399,7 +399,7 @@ OPTION(PETSC_ENABLE "Enable PETSc support" OFF)
# Using PETSc requires building with MPI enabled
IF(PETSC_ENABLE AND NOT MPI_ENABLE)
- PRINT_WARNING("MPI not enabled - Disabling PETSc"
+ PRINT_WARNING("MPI not enabled - Disabling PETSc"
"Set MPI_ENABLE to ON to use PETSc")
FORCE_VARIABLE(PETSC_ENABLE BOOL "Enable PETSc support" OFF)
ENDIF()
@@ -456,7 +456,7 @@ ENDIF()
SET(DOCSTR "Build ARKode F90 examples")
IF(FCMIX_ENABLE AND BUILD_ARKODE)
SHOW_VARIABLE(EXAMPLES_ENABLE_F90 BOOL "${DOCSTR}" OFF)
- # Fortran90 examples do not support single or extended precision
+ # Fortran90 examples do not support single or extended precision
# NOTE: This check can be removed after Fortran configure file is integrated into examples
IF(SUNDIALS_PRECISION MATCHES "EXTENDED" OR SUNDIALS_PRECISION MATCHES "SINGLE")
PRINT_WARNING("F90 examples are not compatible with ${SUNDIALS_PRECISION} precision"
@@ -540,7 +540,7 @@ IF(EXAMPLES_ENABLED)
SET(EXAMPLES_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/examples" CACHE STRING
"Output directory for installing example files" FORCE)
ENDIF(NOT EXAMPLES_INSTALL_PATH)
-
+
# create test_install target and directory for running smoke tests after
# installation
ADD_CUSTOM_TARGET(test_install)
@@ -565,7 +565,7 @@ ELSE(EXAMPLES_ENABLED)
HIDE_VARIABLE(EXAMPLES_INSTALL)
HIDE_VARIABLE(EXAMPLES_INSTALL_PATH)
-
+
ENDIF(EXAMPLES_ENABLED)
# ---------------------------------------------------------------
@@ -796,7 +796,7 @@ IF(PTHREAD_ENABLE)
IF(CMAKE_USE_PTHREADS_INIT)
message(STATUS "Using Pthreads")
SET(PTHREADS_FOUND TRUE)
- # SGS
+ # SGS
ELSE()
message(STATUS "Disabling Pthreads support, could not determine compiler flags")
endif()
@@ -814,7 +814,7 @@ ENDIF()
if(CUDA_ENABLE)
find_package(CUDA)
-
+
if (CUDA_FOUND)
#message("CUDA found!")
set(CUDA_NVCC_FLAGS "-lineinfo")
@@ -1026,7 +1026,7 @@ IF(HYPRE_ENABLE)
PRINT_WARNING("HYPRE not functional - support will not be provided"
"Found hypre library, test code does not work")
ENDIF(HYPRE_LIBRARIES AND NOT HYPRE_FOUND)
-
+
ELSE()
HIDE_VARIABLE(HYPRE_INCLUDE_DIR)
@@ -1070,7 +1070,7 @@ ENDIF()
# ===============================================================
-# Add source and configuration files
+# Add source and configuration files
# ===============================================================
# ---------------------------------------------------------------
@@ -1141,11 +1141,11 @@ IF(PETSC_FOUND)
ENDIF(PETSC_FOUND)
IF(CUDA_FOUND)
- ADD_SUBDIRECTORY(src/nvec_cuda)
+ ADD_SUBDIRECTORY(src/nvec_cuda)
ENDIF(CUDA_FOUND)
IF(RAJA_FOUND)
- ADD_SUBDIRECTORY(src/nvec_raja)
+ ADD_SUBDIRECTORY(src/nvec_raja)
ENDIF(RAJA_FOUND)
# ARKODE library
@@ -1241,7 +1241,7 @@ IF(EXAMPLES_ENABLED)
SET(CFLAGS "${CMAKE_C_FLAGS_RELEASE}")
SET(LDFLAGS "${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
LIST2STRING(EXTRA_LINK_LIBS LIBS)
-
+
IF(CXX_FOUND)
SET(CXX "${CMAKE_CXX_COMPILER}")
SET(CXX_LNKR "${CMAKE_CXX_COMPILER}")
@@ -1378,7 +1378,7 @@ IF(EXAMPLES_ENABLED)
IF(MPIF90_FOUND)
ADD_SUBDIRECTORY(examples/arkode/F90_parallel)
ENDIF()
- ENDIF()
+ ENDIF()
ENDIF(BUILD_ARKODE)
# add CVODE examples
@@ -1411,7 +1411,7 @@ IF(EXAMPLES_ENABLED)
ADD_SUBDIRECTORY(examples/cvode/cuda)
ENDIF()
ENDIF(EXAMPLES_ENABLE_CUDA)
- # raja examples
+ # raja examples
IF(EXAMPLES_ENABLE_RAJA)
IF(RAJA_ENABLE AND RAJA_FOUND)
ADD_SUBDIRECTORY(examples/cvode/raja)
@@ -1568,11 +1568,11 @@ IF(EXAMPLES_ENABLED)
IF(CUDA_FOUND)
ADD_SUBDIRECTORY(examples/nvector/cuda)
ENDIF(CUDA_FOUND)
-
+
IF(RAJA_FOUND)
ADD_SUBDIRECTORY(examples/nvector/raja)
ENDIF(RAJA_FOUND)
-
+
ENDIF(EXAMPLES_ENABLED)
# ---------------------------------------------------------------
diff --git a/scripts/replace-cmake/sundials-4.1.0/CMakeLists.txt b/scripts/replace-cmake/sundials-4.1.0/CMakeLists.txt
index fdd1bc206e..fc8acbddc9 100644
--- a/scripts/replace-cmake/sundials-4.1.0/CMakeLists.txt
+++ b/scripts/replace-cmake/sundials-4.1.0/CMakeLists.txt
@@ -1149,4 +1149,3 @@ INSTALL(
FILES ${PROJECT_SOURCE_DIR}/NOTICE
DESTINATION include/sundials
)
-
diff --git a/scripts/replace-cmake/sundials-5.0.0/CMakeLists.txt b/scripts/replace-cmake/sundials-5.0.0/CMakeLists.txt
index fdd1bc206e..fc8acbddc9 100644
--- a/scripts/replace-cmake/sundials-5.0.0/CMakeLists.txt
+++ b/scripts/replace-cmake/sundials-5.0.0/CMakeLists.txt
@@ -1149,4 +1149,3 @@ INSTALL(
FILES ${PROJECT_SOURCE_DIR}/NOTICE
DESTINATION include/sundials
)
-