avoid overflows when computing time or timestep related values

This commit is contained in:
Axel Kohlmeyer
2021-02-06 18:15:24 -05:00
parent 77402bdbc8
commit 779bbd0853
4 changed files with 11 additions and 11 deletions

View File

@ -310,7 +310,7 @@ void PRD::command(int narg, char **arg)
dynamics(t_event,time_dynamics);
fix_event->store_state_quench();
quench();
clock = clock + t_event*universe->nworlds;
clock += (bigint)t_event*universe->nworlds;
ireplica = check_event();
if (ireplica >= 0) break;
fix_event->restore_state_quench();