try a different workaround for "fix not computed at compatible time" with write_dump

This commit is contained in:
Axel Kohlmeyer
2024-03-03 23:58:33 -05:00
parent 3c8bb5a1be
commit 6e91123910

View File

@ -45,11 +45,15 @@ void WriteDump::command(int narg, char **arg)
// create the Dump instance
// create dump command line with extra required args
// work around "fix not computed at compatible times" errors.
const int dumpfreq = MAX(1, update->nsteps);
auto dumpargs = new char *[modindex + 2];
dumpargs[0] = (char *) "WRITE_DUMP"; // dump id
dumpargs[1] = arg[0]; // group
dumpargs[2] = arg[1]; // dump style
dumpargs[3] = utils::strdup(std::to_string(MAX(update->ntimestep, 1))); // dump frequency
dumpargs[0] = (char *) "WRITE_DUMP"; // dump id
dumpargs[1] = arg[0]; // group
dumpargs[2] = arg[1]; // dump style
dumpargs[3] = utils::strdup(std::to_string(dumpfreq)); // dump frequency
for (int i = 2; i < modindex; ++i) dumpargs[i + 2] = arg[i];