From eaddb7a95a3a4dbf0335980b6f45a531e08814bf Mon Sep 17 00:00:00 2001 From: sjplimp Date: Fri, 15 Dec 2006 22:10:01 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@196 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/output.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/output.cpp b/src/output.cpp index ff909bde1b..6570e06bb2 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -102,7 +102,8 @@ void Output::setup(int flag) { int ntimestep = update->ntimestep; - // perform dump at start of run if last dump was not on this timestep + // perform dump at start of run if current timestep is multiple of every + // and last dump was not on this timestep // set next_dump to multiple of every // will not write on last step of run unless multiple of every // set next_dump_any to smallest next_dump @@ -110,7 +111,8 @@ void Output::setup(int flag) if (ndump) { for (int idump = 0; idump < ndump; idump++) { - if (last_dump[idump] != ntimestep) { + if (ntimestep % dump_every[idump] == 0 && + last_dump[idump] != ntimestep) { dump[idump]->write(); last_dump[idump] = ntimestep; }