git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@3158 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -133,11 +133,12 @@ void Output::setup(int flag)
|
|||||||
// will not write on last step of run unless multiple of every
|
// will not write on last step of run unless multiple of every
|
||||||
// set next_dump_any to smallest next_dump
|
// set next_dump_any to smallest next_dump
|
||||||
// if no dumps, set next_dump_any to last+1 so will not influence next
|
// if no dumps, set next_dump_any to last+1 so will not influence next
|
||||||
// dump custom may invoke computes so wrap with clear/add
|
// dump custom/cfg may invoke computes so wrap with clear/add
|
||||||
|
|
||||||
if (ndump && update->restrict_output == 0) {
|
if (ndump && update->restrict_output == 0) {
|
||||||
for (int idump = 0; idump < ndump; idump++) {
|
for (int idump = 0; idump < ndump; idump++) {
|
||||||
if (strcmp(dump[idump]->style,"custom") == 0)
|
if (strcmp(dump[idump]->style,"custom") == 0 ||
|
||||||
|
strcmp(dump[idump]->style,"cfg") == 0)
|
||||||
modify->clearstep_compute();
|
modify->clearstep_compute();
|
||||||
if ((ntimestep % dump_every[idump] == 0 &&
|
if ((ntimestep % dump_every[idump] == 0 &&
|
||||||
last_dump[idump] != ntimestep) || last_dump[idump] < 0) {
|
last_dump[idump] != ntimestep) || last_dump[idump] < 0) {
|
||||||
@ -146,7 +147,8 @@ void Output::setup(int flag)
|
|||||||
}
|
}
|
||||||
next_dump[idump] =
|
next_dump[idump] =
|
||||||
(ntimestep/dump_every[idump])*dump_every[idump] + dump_every[idump];
|
(ntimestep/dump_every[idump])*dump_every[idump] + dump_every[idump];
|
||||||
if (strcmp(dump[idump]->style,"custom") == 0)
|
if (strcmp(dump[idump]->style,"custom") == 0 ||
|
||||||
|
strcmp(dump[idump]->style,"cfg") == 0)
|
||||||
modify->addstep_compute(next_dump[idump]);
|
modify->addstep_compute(next_dump[idump]);
|
||||||
if (idump) next_dump_any = MYMIN(next_dump_any,next_dump[idump]);
|
if (idump) next_dump_any = MYMIN(next_dump_any,next_dump[idump]);
|
||||||
else next_dump_any = next_dump[0];
|
else next_dump_any = next_dump[0];
|
||||||
@ -199,17 +201,19 @@ void Output::setup(int flag)
|
|||||||
void Output::write(int ntimestep)
|
void Output::write(int ntimestep)
|
||||||
{
|
{
|
||||||
// next_dump does not force output on last step of run
|
// next_dump does not force output on last step of run
|
||||||
// dump custom may invoke computes so wrap with clear/add
|
// dump custom/cfg may invoke computes so wrap with clear/add
|
||||||
|
|
||||||
if (next_dump_any == ntimestep) {
|
if (next_dump_any == ntimestep) {
|
||||||
for (int idump = 0; idump < ndump; idump++) {
|
for (int idump = 0; idump < ndump; idump++) {
|
||||||
if (next_dump[idump] == ntimestep && last_dump[idump] != ntimestep) {
|
if (next_dump[idump] == ntimestep && last_dump[idump] != ntimestep) {
|
||||||
if (strcmp(dump[idump]->style,"custom") == 0)
|
if (strcmp(dump[idump]->style,"custom") == 0 ||
|
||||||
|
strcmp(dump[idump]->style,"cfg") == 0)
|
||||||
modify->clearstep_compute();
|
modify->clearstep_compute();
|
||||||
dump[idump]->write();
|
dump[idump]->write();
|
||||||
last_dump[idump] = ntimestep;
|
last_dump[idump] = ntimestep;
|
||||||
next_dump[idump] += dump_every[idump];
|
next_dump[idump] += dump_every[idump];
|
||||||
if (strcmp(dump[idump]->style,"custom") == 0)
|
if (strcmp(dump[idump]->style,"custom") == 0 ||
|
||||||
|
strcmp(dump[idump]->style,"cfg") == 0)
|
||||||
modify->addstep_compute(next_dump[idump]);
|
modify->addstep_compute(next_dump[idump]);
|
||||||
}
|
}
|
||||||
if (idump) next_dump_any = MYMIN(next_dump_any,next_dump[idump]);
|
if (idump) next_dump_any = MYMIN(next_dump_any,next_dump[idump]);
|
||||||
|
|||||||
Reference in New Issue
Block a user