Commit 1f1c8723 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

add support for "error continue" option, which resets the timer timeout setting after a soft exit

parent 394c3bb5
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -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
------------------------------------------------------------------------- */
+1 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ class FixHalt : public Fix {
  int setmask();
  void init();
  void end_of_step();
  void post_run();

 private:
  int attribute,operation,eflag,ivar;