Skip to content

Commit

Permalink
#1477 fix codacity errors
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjrobins committed Aug 2, 2021
1 parent 06984c4 commit a1cf26e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pybamm/solvers/c_solvers/idaklu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,9 @@ Solution solve(np_array t_np, np_array y0_np, np_array yp0_np,

if (number_of_parameters > 0)
{
retval = IDASensInit(ida_mem, number_of_parameters,
IDA_SIMULTANEOUS, sensitivities, yyS, ypS);
retval = IDASensEEtolerances(ida_mem);
IDASensInit(ida_mem, number_of_parameters,
IDA_SIMULTANEOUS, sensitivities, yyS, ypS);
IDASensEEtolerances(ida_mem);
}

int t_i = 1;
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_solvers/test_idaklu_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def test_ida_roberts_klu_sensitivities(self):

# should be no sensitivities calculated
with self.assertRaises(KeyError):
sol.sensitivities["a"]
print(sol.sensitivities["a"])

# now solve with sensitivities (this should cause set_up to be run again)
sol = solver.solve(
Expand Down

0 comments on commit a1cf26e

Please sign in to comment.