Skip to content

Commit

Permalink
Fix progress interval in newmark method
Browse files Browse the repository at this point in the history
  • Loading branch information
jguarato committed Feb 27, 2024
1 parent 8b8f02f commit 8f51ef8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ross/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,8 @@ def newmark(fun, t, y_size, **options):
yout[0, :] = y0

for step in range(1, n_steps):
if round((t[step] + 1e-15) % progress_interval, 12) == 0:
aux = round(t[step] / progress_interval, 9)
if aux - int(aux) == 0:
print(f"Time Step: {t[step]:.6f} s")

dt = t[step] - t[step - 1]
Expand Down

1 comment on commit 8f51ef8

@jguarato
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last fix (ef1aea2) for this part didn't work in some cases.

Please sign in to comment.