From 3732b1c75ae7ad59a4e13000f82c6b2e5a40a21e Mon Sep 17 00:00:00 2001 From: sjplimp Date: Tue, 18 May 2010 23:38:07 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@4142 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/output.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/output.cpp b/src/output.cpp index c71caba8d5..b4f6b9764a 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -131,6 +131,7 @@ void Output::setup(int flag) // set next_dump_any to smallest next_dump // if no dumps, set next_dump_any to last+1 so will not influence next // wrap dumps that invoke computes with clear/add + // if dump not written now, add_all on future step since clear/add is noop int writeflag; @@ -147,7 +148,10 @@ void Output::setup(int flag) } next_dump[idump] = (ntimestep/dump_every[idump])*dump_every[idump] + dump_every[idump]; - if (dump[idump]->clearstep) modify->addstep_compute(next_dump[idump]); + if (dump[idump]->clearstep) { + if (writeflag) modify->addstep_compute(next_dump[idump]); + else modify->addstep_compute_all(next_dump[idump]); + } if (idump) next_dump_any = MYMIN(next_dump_any,next_dump[idump]); else next_dump_any = next_dump[0]; }