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 1104 mass matrix for bdf #1107

Merged
merged 40 commits into from
Jul 20, 2020
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
aede5c1
#1031 start to reformat jax_bdf_integrate to fit with jax custom_vjp …
martinjrobins Jun 26, 2020
dbea36b
#1031 add a sensitivities test
martinjrobins Jul 2, 2020
3cd80d3
#1031 add fix for int captured args to fun
martinjrobins Jul 4, 2020
003bbc4
#1031 swap to using fun(y, t)
martinjrobins Jul 4, 2020
0330cdc
#1031 try to improve performance on autodiff of solver
martinjrobins Jul 6, 2020
c74c35e
#1031 finalise sensitivity test for jax_bdf_solver
martinjrobins Jul 10, 2020
610d215
#1031 add test for sensitivities with jax solver
martinjrobins Jul 10, 2020
ebe7109
#1031 fix flake8 errors
martinjrobins Jul 10, 2020
d8b9a32
#1031 fix tests
martinjrobins Jul 10, 2020
ce39947
#1031 fix more tests
martinjrobins Jul 10, 2020
7b27581
#1031 fix test
martinjrobins Jul 11, 2020
b7d1f1b
#1031 refactor jax_bdf_solver.py to make clear which code is taken fr…
martinjrobins Jul 11, 2020
5886f45
#1031 fix for windows
martinjrobins Jul 13, 2020
a917572
#1031 fix codacity issues
martinjrobins Jul 13, 2020
22e7a0a
#1031 fix codacity error
martinjrobins Jul 13, 2020
9ceef30
#1031 correct comments on JAX code
martinjrobins Jul 13, 2020
0ae3c18
#1031 remove solver stats print lines
martinjrobins Jul 13, 2020
a42f4e5
#1104 debugging for incorporation of mass matrix
martinjrobins Jul 12, 2020
5f2db7c
#1104 fix scaling of newton iteration
martinjrobins Jul 12, 2020
81eb538
#1104 add test in jax solver for semi-explicit dae case
martinjrobins Jul 13, 2020
107f7ce
#1104 tidy up
martinjrobins Jul 13, 2020
1bdb5fd
#1104 jax bdf solver calculates own consistent initial conditions for…
martinjrobins Jul 13, 2020
df5326a
#1104 remove cond in update_step_size
martinjrobins Jul 14, 2020
c4c4c66
#1104 remove cond in newton iteration
martinjrobins Jul 14, 2020
0ca87c4
#1104 get rid of lax.cond calls in bdf solver
martinjrobins Jul 14, 2020
3e31c5f
#1104 fix flake8 and some minor bugs
martinjrobins Jul 14, 2020
4e3a78b
#1104 improve coverage
martinjrobins Jul 14, 2020
acc8314
#1104 merge develop
martinjrobins Jul 14, 2020
f08dc57
#1104 put in proper adjoint equations for semi-explicit dae index 1
martinjrobins Jul 15, 2020
016e12d
#1104 allow users to choose alternate root method to set initial cond…
martinjrobins Jul 15, 2020
71cfee6
#1104 add changelog
martinjrobins Jul 15, 2020
dd8180d
#1104 handle augmented dynamics with inputs
martinjrobins Jul 15, 2020
6776638
#1104 fix for newton iteration logic
martinjrobins Jul 15, 2020
957611e
#1104 fix calc of init conditions
martinjrobins Jul 15, 2020
02bfd2c
#1104 convert to diagonal mass matrix
martinjrobins Jul 16, 2020
b35019b
#1104 swap back to full mass matrix
martinjrobins Jul 16, 2020
6a85083
#1104 remove commented out code
martinjrobins Jul 19, 2020
1cd40f8
#1104 add jax bdf solver to compare-dae-solver
martinjrobins Jul 19, 2020
9ceabe2
Revert "#1104 add jax bdf solver to compare-dae-solver"
martinjrobins Jul 20, 2020
f6c51f9
#1104 more detail to changelog
martinjrobins Jul 20, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Features

- Added support for index 1 dae equations and sensitivity calculations to JAX BDF solver ([#1107](https://github.com/pybamm-team/PyBaMM/pull/1107))
- Allowed keyword arguments to be passed to `Simulation.plot()` ([#1099](https://github.com/pybamm-team/PyBaMM/pull/1099))

## Optimizations
Expand Down
5 changes: 4 additions & 1 deletion pybamm/solvers/base_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,9 +451,12 @@ def calculate_consistent_state(self, model, time=0, inputs=None):
-------
y0_consistent : array-like, same shape as y0_guess
Initial conditions that are consistent with the algebraic equations (roots
of the algebraic equations)
of the algebraic equations). If self.root_method == None then returns
model.y0.
"""
pybamm.logger.info("Start calculating consistent states")
if self.root_method is None:
return model.y0
try:
root_sol = self.root_method._integrate(model, [time], inputs)
except pybamm.SolverError as e:
Expand Down
Loading