new reset_ids command and dump_modify delay option

This commit is contained in:
Steven J. Plimpton
2018-03-28 11:31:35 -06:00
parent b5b0f67bcd
commit 5fd17670b1
14 changed files with 4011 additions and 6 deletions

View File

@ -85,6 +85,7 @@ Dump::Dump(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
buffer_flag = 0;
padflag = 0;
pbcflag = 0;
delay_flag = 0;
maxbuf = maxids = maxsort = maxproc = 0;
buf = bufsort = NULL;
@ -304,6 +305,10 @@ void Dump::write()
imageint *imagehold;
double **xhold,**vhold;
// if timestep < delaystep, just return
if (delay_flag && update->ntimestep < delaystep) return;
// if file per timestep, open new file
if (multifile) openfile();
@ -876,6 +881,13 @@ void Dump::modify_params(int narg, char **arg)
error->all(FLERR,"Dump_modify buffer yes not allowed for this style");
iarg += 2;
} else if (strcmp(arg[iarg],"delay") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal dump_modify command");
delaystep = force->bnumeric(FLERR,arg[iarg+1]);
if (delaystep >= 0) delay_flag = 1;
else delay_flag = 0;
iarg += 2;
} else if (strcmp(arg[iarg],"every") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal dump_modify command");
int idump;