Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed Dec 12, 2023
1 parent 0dfd25e commit 34fde49
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion python/sdist/amici/de_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -2227,7 +2227,9 @@ def _compute_equation(self, name: str) -> None:
)

# finish chain rule for the state variables
tmp_eq += smart_multiply(self.eq("ddeltaxdx")[ie], tmp_dxdp)
tmp_eq += smart_multiply(
self.eq("ddeltaxdx")[ie], tmp_dxdp
)
else:
tmp_eq = smart_multiply(
self.sym("xdot") - self.sym("xdot_old"),
Expand Down
8 changes: 6 additions & 2 deletions python/tests/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,12 @@ def check_trajectories_with_forward_sensitivities(
solver.setAbsoluteToleranceFSA(1e-15)
solver.setRelativeToleranceFSA(1e-13)
rdata = runAmiciSimulation(amici_model, solver=solver)
_check_close(rdata["x"], result_expected_x, field="x", rtol=1e-10, atol=1e-12)
_check_close(rdata["sx"], result_expected_sx, field="sx", rtol=1e-7, atol=1e-9)
_check_close(
rdata["x"], result_expected_x, field="x", rtol=1e-10, atol=1e-12
)
_check_close(
rdata["sx"], result_expected_sx, field="sx", rtol=1e-7, atol=1e-9
)


def check_trajectories_with_adjoint_sensitivities(amici_model: AmiciModel):
Expand Down

0 comments on commit 34fde49

Please sign in to comment.