add support for "error continue" option, which resets the timer timeout setting after a soft exit
This commit is contained in:
@ -109,6 +109,7 @@ int FixHalt::setmask()
|
||||
{
|
||||
int mask = 0;
|
||||
mask |= END_OF_STEP;
|
||||
mask |= POST_RUN;
|
||||
return mask;
|
||||
}
|
||||
|
||||
@ -170,14 +171,21 @@ void FixHalt::end_of_step()
|
||||
id,update->ntimestep,attvalue);
|
||||
|
||||
if (eflag == HARD) error->all(FLERR,str);
|
||||
else if (eflag == SOFT) {
|
||||
else if (eflag == SOFT || eflag == CONTINUE) {
|
||||
if (comm->me == 0) error->message(FLERR,str);
|
||||
timer->force_timeout();
|
||||
} else if (eflag == CONTINUE) {
|
||||
// exit this run, but not subsequent ones
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
reset expired timer setting to original value, if requested
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void FixHalt::post_run()
|
||||
{
|
||||
if (eflag == CONTINUE) timer->reset_timeout();
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
compute max length of any bond using Neighbor bondlist for each proc
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user