forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8225 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
153bb556f5
commit
f46eb9dedb
|
@ -344,7 +344,18 @@ void Update::create_minimize(int narg, char **arg)
|
|||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
reset timestep from input script
|
||||
reset timestep as called from input script
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void Update::reset_timestep(int narg, char **arg)
|
||||
{
|
||||
if (narg != 1) error->all(FLERR,"Illegal reset_timestep command");
|
||||
bigint newstep = ATOBIGINT(arg[0]);
|
||||
reset_timestep(newstep);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
reset timestep
|
||||
do not allow dump files or a restart to be defined
|
||||
do not allow any timestep-dependent fixes to be defined
|
||||
do not allow any dynamic regions to be defined
|
||||
|
@ -354,10 +365,8 @@ void Update::create_minimize(int narg, char **arg)
|
|||
clear timestep list of computes that store future invocation times
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void Update::reset_timestep(int narg, char **arg)
|
||||
void Update::reset_timestep(bigint newstep)
|
||||
{
|
||||
if (narg != 1) error->all(FLERR,"Illegal reset_timestep command");
|
||||
|
||||
for (int i = 0; i < output->ndump; i++)
|
||||
if (output->last_dump[i] >= 0)
|
||||
error->all(FLERR,
|
||||
|
@ -389,7 +398,7 @@ void Update::reset_timestep(int narg, char **arg)
|
|||
for (int i = 0; i < modify->ncompute; i++)
|
||||
if (modify->compute[i]->timeflag) modify->compute[i]->clearstep();
|
||||
|
||||
ntimestep = ATOBIGINT(arg[0]);
|
||||
ntimestep = newstep;
|
||||
if (ntimestep < 0) error->all(FLERR,"Timestep must be >= 0");
|
||||
if (ntimestep > MAXBIGINT) error->all(FLERR,"Too big a timestep");
|
||||
}
|
||||
|
|
|
@ -51,6 +51,7 @@ class Update : protected Pointers {
|
|||
void create_integrate(int, char **, char *);
|
||||
void create_minimize(int, char **);
|
||||
void reset_timestep(int, char **);
|
||||
void reset_timestep(bigint);
|
||||
bigint memory_usage();
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in New Issue