You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To Reproduce
This code snippet below has a time-step of 0.1ms. It should save the data to the buffer every 20ms and it should dump the buffer to the file every 1.0001ms.
However, in this case the (current_step + 1) % self.save_every == 0 will never be triggered, as it never reaches there as this time-step is skipped by step_skip=2e2. PR #125 would fix this.
Environment
Python=3.10.5, pip=22.1.2
Numpy/numba version: 22.1.2
PyElastica version: 0.2.3
OS, Device: macOS / macBook Pro 15'' 2019
Expected behavior
By specifying save_every, the data should be saved every save_every time-steps, irrespective of the chosen skip_step setting.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
* Fix bug with `save_every` condition in ExportCallBack
* minimizing any potential delays for saving into storage
Co-authored-by: Seung Hyun Kim <[email protected]>
Describe the bug
If
save_every
is not a multiple ofstep_skip
, the condition(current_step + 1) % self.save_every == 0
(https://github.com/GazzolaLab/PyElastica/blob/master/elastica/callback_functions.py#L205) will never be trigged and the data will never be saved, if the condition about the buffer size does not become active neither.To Reproduce
This code snippet below has a time-step of
0.1
ms. It should save the data to the buffer every20
ms and it should dump the buffer to the file every1.0001
ms.However, in this case the
(current_step + 1) % self.save_every == 0
will never be triggered, as it never reaches there as this time-step is skipped bystep_skip=2e2
. PR #125 would fix this.Environment
Expected behavior
By specifying
save_every
, the data should be saved everysave_every
time-steps, irrespective of the chosenskip_step
setting.Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: