Commit 2013b7ed authored by Richard Berger's avatar Richard Berger
Browse files

Merge remote-tracking branch 'origin/master' into library_interface_update

parents 62b3e790 5d042cf6
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -134,7 +134,10 @@ void FixPrint::init()
    if (next_print <= update->ntimestep)
      error->all(FLERR,"Fix print timestep variable returned a bad timestep");
  } else {
    if (update->ntimestep % nevery)
      next_print = (update->ntimestep/nevery)*nevery + nevery;
    else 
      next_print = update->ntimestep;
  }

  // add next_print to all computes that store invocation times
@@ -146,6 +149,13 @@ void FixPrint::init()

/* ---------------------------------------------------------------------- */

void FixPrint::setup(int /* vflag */)
{
  end_of_step();
}

/* ---------------------------------------------------------------------- */

void FixPrint::end_of_step()
{
  if (update->ntimestep != next_print) return;
@@ -168,6 +178,7 @@ void FixPrint::end_of_step()
  } else {
    next_print = (update->ntimestep/nevery)*nevery + nevery;
  }

  modify->addstep_compute(next_print);

  if (me == 0) {
+1 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ class FixPrint : public Fix {
  FixPrint(class LAMMPS *, int, char **);
  ~FixPrint();
  void init();
  void setup(int);
  int setmask();
  void end_of_step();