use min_post_force() method to hook fix halt into minimization
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user