From ed9c8b4ea0df6ee9d9a19545bb3ac11479a821ef Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 11 Feb 2020 00:30:09 -0500 Subject: [PATCH] reset Modify::n_timeflag in post_run() so we won't skip computes defined between runs --- src/modify.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/modify.cpp b/src/modify.cpp index 3dddd3f085..864bc8f2b4 100644 --- a/src/modify.cpp +++ b/src/modify.cpp @@ -527,6 +527,11 @@ void Modify::thermo_energy_atom(int nlocal, double *energy) void Modify::post_run() { for (int i = 0; i < nfix; i++) fix[i]->post_run(); + + // must reset this to its default value, since computes may be added + // or removed between runs and with this change we will redirect any + // calls to addstep_compute() to addstep_compute_all() instead. + n_timeflag = -1; } /* ----------------------------------------------------------------------