use min_post_force() method to hook fix halt into minimization

This commit is contained in:
Axel Kohlmeyer
2018-10-19 14:08:25 -04:00
parent cc6f1be82d
commit 80e0dddae0
2 changed files with 7 additions and 3 deletions

View File

@ -119,6 +119,7 @@ int FixHalt::setmask()
int mask = 0;
mask |= END_OF_STEP;
mask |= POST_RUN;
mask |= MIN_POST_FORCE;
return mask;
}
@ -138,14 +139,17 @@ void FixHalt::init()
// settings used by TLIMIT
nextstep = (update->ntimestep/nevery)*nevery + nevery;
thisstep = -1;
tratio = 0.5;
}
/* ---------------------------------------------------------------------- */
void FixHalt::min_step(double, double *)
void FixHalt::min_post_force(int /* vflag */)
{
if (update->ntimestep == thisstep) return;
if ((update->ntimestep % nevery) == 0) end_of_step();
thisstep = update->ntimestep;
}
/* ---------------------------------------------------------------------- */