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

This commit is contained in:
sjplimp
2009-01-05 22:26:08 +00:00
parent e1f72f6d3a
commit 0cc1d090f4
90 changed files with 1129 additions and 779 deletions

View File

@ -16,6 +16,9 @@
#include "update.h"
#include "neighbor.h"
#include "force.h"
#include "modify.h"
#include "fix.h"
#include "compute.h"
#include "output.h"
#include "memory.h"
#include "error.h"
@ -42,6 +45,8 @@ Update::Update(LAMMPS *lmp) : Pointers(lmp)
firststep = laststep = 0;
beginstep = endstep = 0;
eflag_global = vflag_global = -1;
unit_style = NULL;
set_units("lj");
@ -207,6 +212,10 @@ void Update::create_minimize(int narg, char **arg)
/* ----------------------------------------------------------------------
reset timestep from input script
do not allow dump files or a restart to be defined
do not allow any timestep-dependent fixes to be defined
reset eflag/vflag global so nothing will think eng/virial are current
reset invoked flags of computes, so nothing will think they are current
clear timestep list of computes that store one
------------------------------------------------------------------------- */
void Update::reset_timestep(int narg, char **arg)
@ -219,6 +228,21 @@ void Update::reset_timestep(int narg, char **arg)
if (output->restart && output->last_restart >= 0)
error->all("Cannot reset timestep with restart file already written");
for (int i = 0; i < modify->nfix; i++)
if (modify->fix[i]->time_depend)
error->all("Cannot reset timestep with a time-dependent fix defined");
eflag_global = vflag_global = -1;
for (int i = 0; i < modify->ncompute; i++) {
modify->compute[i]->invoked_scalar = -1;
modify->compute[i]->invoked_vector = -1;
modify->compute[i]->invoked_peratom = -1;
}
for (int i = 0; i < modify->ncompute; i++)
if (modify->compute[i]->timeflag) modify->compute[i]->clearstep();
ntimestep = atoi(arg[0]);
if (ntimestep < 0) error->all("Timestep must be >= 0");
}