Skip to content

Commit

Permalink
fix bug in milestone timestep implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
kaelyndunnell committed Nov 15, 2024
1 parent 0769a6f commit 8399a26
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/festim/stepsize.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def modify_value(self, value, nb_iterations, t=None):
if updated_value > time_to_milestone and not np.isclose(
t, next_milestone, atol=0
):
updated_value = next_milestone
updated_value = time_to_milestone

return updated_value

Expand Down
2 changes: 1 addition & 1 deletion test/test_stepsize.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def test_overshoot_milestone(nb_its=1, target=4):
value=current_value, nb_iterations=nb_its, t=0.9
)

expected_value = 1.3
expected_value = 1.3 - current_value

assert new_value == expected_value

Expand Down

0 comments on commit 8399a26

Please sign in to comment.