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

This commit is contained in:
sjplimp
2012-06-07 23:51:09 +00:00
parent 78f8f69895
commit 441c71f367
18 changed files with 175 additions and 54 deletions

View File

@ -52,7 +52,6 @@ FixAveTime::FixAveTime(LAMMPS *lmp, int narg, char **arg) :
nfreq = atoi(arg[5]);
global_freq = nfreq;
time_depend = 1;
// scan values to count them
// then read options so know mode = SCALAR/VECTOR before re-reading values
@ -181,7 +180,8 @@ FixAveTime::FixAveTime(LAMMPS *lmp, int narg, char **arg) :
if (argindex[i] && modify->compute[icompute]->vector_flag == 0)
error->all(FLERR,"Fix ave/time compute does not calculate a vector");
if (argindex[i] && argindex[i] > modify->compute[icompute]->size_vector)
error->all(FLERR,"Fix ave/time compute vector is accessed out-of-range");
error->all(FLERR,
"Fix ave/time compute vector is accessed out-of-range");
} else if (which[i] == COMPUTE && mode == VECTOR) {
int icompute = modify->find_compute(ids[i]);
@ -206,7 +206,8 @@ FixAveTime::FixAveTime(LAMMPS *lmp, int narg, char **arg) :
if (argindex[i] && argindex[i] > modify->fix[ifix]->size_vector)
error->all(FLERR,"Fix ave/time fix vector is accessed out-of-range");
if (nevery % modify->fix[ifix]->global_freq)
error->all(FLERR,"Fix for fix ave/time not computed at compatible time");
error->all(FLERR,
"Fix for fix ave/time not computed at compatible time");
} else if (which[i] == FIX && mode == VECTOR) {
int ifix = modify->find_fix(ids[i]);
@ -923,3 +924,10 @@ bigint FixAveTime::nextvalid()
if (nvalid < update->ntimestep) nvalid += nfreq;
return nvalid;
}
/* ---------------------------------------------------------------------- */
void FixAveTime::reset_timestep(bigint ntimestep)
{
if (ntimestep > nvalid) error->all(FLERR,"Fix ave/time missed timestep");
}