From 0b465472c81b6d2776266a0723b65200d7b4289e Mon Sep 17 00:00:00 2001 From: sjplimp Date: Mon, 29 Nov 2010 18:35:34 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5339 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/fix_ave_spatial.cpp | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/src/fix_ave_spatial.cpp b/src/fix_ave_spatial.cpp index a7b880f706..4510558d91 100644 --- a/src/fix_ave_spatial.cpp +++ b/src/fix_ave_spatial.cpp @@ -34,7 +34,7 @@ using namespace LAMMPS_NS; enum{LOWER,CENTER,UPPER,COORD}; -enum{X,V,F,DENSITY_NUMBER,DENSITY_MASS,COMPUTE,FIX,VARIABLE}; +enum{V,F,DENSITY_NUMBER,DENSITY_MASS,COMPUTE,FIX,VARIABLE}; enum{SAMPLE,ALL}; enum{BOX,LATTICE,REDUCED}; enum{ONE,RUNNING,WINDOW}; @@ -102,17 +102,7 @@ FixAveSpatial::FixAveSpatial(LAMMPS *lmp, int narg, char **arg) : while (iarg < narg) { ids[nvalues] = NULL; - if (strcmp(arg[iarg],"x") == 0) { - which[nvalues] = X; - argindex[nvalues++] = 0; - } else if (strcmp(arg[iarg],"y") == 0) { - which[nvalues] = X; - argindex[nvalues++] = 1; - } else if (strcmp(arg[iarg],"z") == 0) { - which[nvalues] = X; - argindex[nvalues++] = 2; - - } else if (strcmp(arg[iarg],"vx") == 0) { + if (strcmp(arg[iarg],"vx") == 0) { which[nvalues] = V; argindex[nvalues++] = 0; } else if (strcmp(arg[iarg],"vy") == 0) { @@ -554,12 +544,11 @@ void FixAveSpatial::end_of_step() n = value2index[m]; j = argindex[m]; - // X,V,F adds coords,velocities,forces to values + // V,F adds velocities,forces to values - if (which[m] == X || which[m] == V || which[m] == F) { + if (which[m] == V || which[m] == F) { double **attribute; - if (which[m] == X) attribute = x; - else if (which[m] == V) attribute = atom->v; + if (which[m] == V) attribute = atom->v; else attribute = atom->f; if (regionflag == 0) {