diff --git a/src/input.cpp b/src/input.cpp index 35b04946c0..30424ad5cb 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -27,9 +27,11 @@ #include "dihedral.h" #include "domain.h" #include "error.h" +#include "fix.h" #include "force.h" #include "group.h" #include "improper.h" +#include "integrate.h" #include "kspace.h" #include "memory.h" #include "min.h" @@ -1841,11 +1843,12 @@ void Input::timestep() update->dt = utils::numeric(FLERR,arg[0],false,lmp); update->dt_default = 0; - if (update->first_update == 0) return; - + // timestep command can be invoked between runs or by run every // calls to other classes that need to know timestep size changed // similar logic is in FixDtReset::end_of_step() - // only if a run has already occurred + // only need to do this if a run has already occurred + + if (update->first_update == 0) return; int respaflag = 0; if (utils::strmatch(update->integrate_style, "^respa")) respaflag = 1; diff --git a/src/output.cpp b/src/output.cpp index d34aa8d3f7..30248e449d 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -580,7 +580,8 @@ void Output::reset_timestep(bigint ntimestep) next_dump_any = MAXBIGINT; for (int idump = 0; idump < ndump; idump++) if (last_dump[idump] >= 0) - error->all("Cannot reset timestep with active dump - must undump first"); + error->all(FLERR, + "Cannot reset timestep with active dump - must undump first"); if (restart_flag_single) { if (restart_every_single) {