forked from lijiext/lammps
add post yes/no keyword to rerun commmand (with default to no)
This commit is contained in:
parent
e00e2676fc
commit
fc6e10921d
|
@ -15,7 +15,7 @@ Syntax
|
|||
|
||||
.. parsed-literal::
|
||||
|
||||
keyword = *first* or *last* or *every* or *skip* or *start* or *stop* or *dump*
|
||||
keyword = *first* or *last* or *every* or *skip* or *start* or *stop* or *post* or *dump*
|
||||
*first* args = Nfirst
|
||||
Nfirst = dump timestep to start on
|
||||
*last* args = Nlast
|
||||
|
@ -28,6 +28,7 @@ Syntax
|
|||
Nstart = timestep on which pseudo run will start
|
||||
*stop* args = Nstop
|
||||
Nstop = timestep to which pseudo run will end
|
||||
*post* value = *yes* or *no*
|
||||
*dump* args = same as :doc:`read_dump <read_dump>` command starting with its field arguments
|
||||
|
||||
Examples
|
||||
|
@ -154,6 +155,10 @@ Also note that an error will occur if you read a snapshot from the
|
|||
dump file with a timestep value larger than the *stop* setting you
|
||||
have specified.
|
||||
|
||||
The *post* keyword can be used to minimize the output to the screen that
|
||||
happens after a *rerun* command, similar to the post keyword of the
|
||||
:doc:`run command <run>`. It is set to *no* by default.
|
||||
|
||||
The *dump* keyword is required and must be the last keyword specified.
|
||||
Its arguments are passed internally to the :doc:`read_dump <read_dump>`
|
||||
command. The first argument following the *dump* keyword should be
|
||||
|
@ -226,4 +231,4 @@ Default
|
|||
|
||||
The option defaults are first = 0, last = a huge value (effectively
|
||||
infinity), start = same as first, stop = same as last, every = 0, skip
|
||||
= 1;
|
||||
= 1, post = no;
|
||||
|
|
|
@ -51,6 +51,7 @@ void Rerun::command(int narg, char **arg)
|
|||
if (strcmp(arg[iarg],"start") == 0) break;
|
||||
if (strcmp(arg[iarg],"stop") == 0) break;
|
||||
if (strcmp(arg[iarg],"dump") == 0) break;
|
||||
if (strcmp(arg[iarg],"post") == 0) break;
|
||||
iarg++;
|
||||
}
|
||||
int nfile = iarg;
|
||||
|
@ -65,6 +66,7 @@ void Rerun::command(int narg, char **arg)
|
|||
int nskip = 1;
|
||||
int startflag = 0;
|
||||
int stopflag = 0;
|
||||
int postflag = 0;
|
||||
bigint start = -1;
|
||||
bigint stop = -1;
|
||||
|
||||
|
@ -101,6 +103,14 @@ void Rerun::command(int narg, char **arg)
|
|||
stop = utils::bnumeric(FLERR,arg[iarg+1],false,lmp);
|
||||
if (stop < 0) error->all(FLERR,"Illegal rerun command");
|
||||
iarg += 2;
|
||||
} else if (strcmp(arg[iarg],"post") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal rerun command");
|
||||
if (strcmp(arg[iarg+1],"yes") == 0) {
|
||||
postflag = 1;
|
||||
} else if (strcmp(arg[iarg+1],"no") == 0) {
|
||||
postflag = 0;
|
||||
} else error->all(FLERR,"Illegal rerun command");
|
||||
iarg += 2;
|
||||
} else if (strcmp(arg[iarg],"dump") == 0) {
|
||||
break;
|
||||
} else error->all(FLERR,"Illegal rerun command");
|
||||
|
@ -182,7 +192,7 @@ void Rerun::command(int narg, char **arg)
|
|||
update->nsteps = ndump;
|
||||
|
||||
Finish finish(lmp);
|
||||
finish.end(1);
|
||||
finish.end(postflag);
|
||||
|
||||
update->whichflag = 0;
|
||||
update->firststep = update->laststep = 0;
|
||||
|
|
Loading…
Reference in New Issue