Skip to content

Commit

Permalink
tests: adds calculate_sensitivities check for JaxSolver
Browse files Browse the repository at this point in the history
  • Loading branch information
BradyPlanden committed Sep 26, 2024
1 parent 48fff9a commit 83b5710
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/unit/test_solvers/test_jax_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ def test_model_solver(self):

np.testing.assert_array_equal(second_solution.y, solution.y)

# Test passing `calculate_sensitivities`
solution_sens = solver.solve(model, t_eval, calculate_sensitivities=True)
np.testing.assert_array_equal(solution_sens.y, solution.y)
assert len(solution_sens.sensitivities) == 0

def test_semi_explicit_model(self):
# Create model
model = pybamm.BaseModel()
Expand Down

0 comments on commit 83b5710

Please sign in to comment.