mirror of https://github.com/lammps/lammps.git
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13256 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
ea303bbf9a
commit
448f69a4d4
|
@ -43,8 +43,6 @@ FixAveAtom::FixAveAtom(LAMMPS *lmp, int narg, char **arg) :
|
|||
nrepeat = force->inumeric(FLERR,arg[4]);
|
||||
peratom_freq = force->inumeric(FLERR,arg[5]);
|
||||
|
||||
time_depend = 1;
|
||||
|
||||
// parse remaining values
|
||||
|
||||
which = new int[narg-6];
|
||||
|
@ -198,6 +196,7 @@ FixAveAtom::FixAveAtom(LAMMPS *lmp, int narg, char **arg) :
|
|||
// once in end_of_step() can set timestep for ones actually invoked
|
||||
|
||||
irepeat = 0;
|
||||
nvalid_last = -1;
|
||||
nvalid = nextvalid();
|
||||
modify->addstep_compute_all(nvalid);
|
||||
}
|
||||
|
@ -281,9 +280,13 @@ void FixAveAtom::end_of_step()
|
|||
int i,j,m,n;
|
||||
|
||||
// skip if not step which requires doing something
|
||||
// error check if timestep was reset in an invalid manner
|
||||
|
||||
bigint ntimestep = update->ntimestep;
|
||||
if (ntimestep < nvalid_last || ntimestep > nvalid)
|
||||
error->all(FLERR,"Invalid timestep resets for fix ave/time");
|
||||
if (ntimestep != nvalid) return;
|
||||
nvalid_last = nvalid;
|
||||
|
||||
// zero if first step
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ class FixAveAtom : public Fix {
|
|||
private:
|
||||
int nvalues;
|
||||
int nrepeat,irepeat;
|
||||
bigint nvalid;
|
||||
bigint nvalid,nvalid_last;
|
||||
int *which,*argindex,*value2index;
|
||||
char **ids;
|
||||
double **array;
|
||||
|
|
Loading…
Reference in New Issue