git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@1091 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2007-10-22 23:26:34 +00:00
parent acf51990bf
commit 9c1c10e1c4
4 changed files with 24 additions and 4 deletions

View File

@ -12,6 +12,7 @@
------------------------------------------------------------------------- */
#include "string.h"
#include "stdlib.h"
#include "update.h"
#include "neighbor.h"
#include "force.h"
@ -179,6 +180,25 @@ void Update::create_minimize(int narg, char **arg)
strcpy(minimize_style,arg[0]);
}
/* ----------------------------------------------------------------------
reset timestep from input script
do not allow dump files or a restart to be defined
------------------------------------------------------------------------- */
void Update::reset_timestep(int narg, char **arg)
{
if (narg != 1) error->all("Illegal reset_timestep command");
for (int i = 0; i < output->ndump; i++)
if (output->last_dump[i] >= 0)
error->all("Cannot reset timestep with dump file already written to");
if (output->restart && output->last_restart >= 0)
error->all("Cannot reset timestep with restart file already written");
ntimestep = atoi(arg[0]);
if (ntimestep < 0) error->all("Timestep must be >= 0");
}
/* ----------------------------------------------------------------------
memory usage of update and integrate/minimize
------------------------------------------------------------------------- */