fix indexing bugs in accessing compute and fix labels in fix ave/histo

(cherry picked from commit 579c527718)
This commit is contained in:
Axel Kohlmeyer 2016-08-16 23:54:56 -04:00
parent c88e9b46cf
commit 9babb7a4c2
1 changed files with 2 additions and 2 deletions

View File

@ -203,14 +203,14 @@ FixAveHisto::FixAveHisto(LAMMPS *lmp, int narg, char **arg) :
for (int i = 0; i < nvalues; i++) {
if (which[i] == X || which[i] == V || which[i] == F) kindflag = PERATOM;
else if (which[i] == COMPUTE) {
Compute *compute = modify->compute[modify->find_compute(ids[0])];
Compute *compute = modify->compute[modify->find_compute(ids[i])];
if (compute->scalar_flag || compute->vector_flag || compute->array_flag)
kindflag = GLOBAL;
else if (compute->peratom_flag) kindflag = PERATOM;
else if (compute->local_flag) kindflag = LOCAL;
else error->all(FLERR,"Fix ave/histo input is invalid compute");
} else if (which[i] == FIX) {
Fix *fix = modify->fix[modify->find_fix(ids[0])];
Fix *fix = modify->fix[modify->find_fix(ids[i])];
if (fix->scalar_flag || fix->vector_flag || fix->array_flag)
kindflag = GLOBAL;
else if (fix->peratom_flag) kindflag = PERATOM;