git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@7003 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -36,7 +36,7 @@ enum{X,V,F,COMPUTE,FIX,VARIABLE};
|
||||
FixAveAtom::FixAveAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
Fix(lmp, narg, arg)
|
||||
{
|
||||
if (narg < 7) error->all("Illegal fix ave/atom command");
|
||||
if (narg < 7) error->all(FLERR,"Illegal fix ave/atom command");
|
||||
|
||||
time_depend = 1;
|
||||
|
||||
@ -100,7 +100,7 @@ FixAveAtom::FixAveAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
char *ptr = strchr(suffix,'[');
|
||||
if (ptr) {
|
||||
if (suffix[strlen(suffix)-1] != ']')
|
||||
error->all("Illegal fix ave/atom command");
|
||||
error->all(FLERR,"Illegal fix ave/atom command");
|
||||
argindex[nvalues] = atoi(ptr+1);
|
||||
*ptr = '\0';
|
||||
} else argindex[nvalues] = 0;
|
||||
@ -111,7 +111,7 @@ FixAveAtom::FixAveAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
nvalues++;
|
||||
delete [] suffix;
|
||||
|
||||
} else error->all("Illegal fix ave/atom command");
|
||||
} else error->all(FLERR,"Illegal fix ave/atom command");
|
||||
|
||||
iarg++;
|
||||
}
|
||||
@ -120,49 +120,49 @@ FixAveAtom::FixAveAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
// for fix inputs, check that fix frequency is acceptable
|
||||
|
||||
if (nevery <= 0 || nrepeat <= 0 || peratom_freq <= 0)
|
||||
error->all("Illegal fix ave/atom command");
|
||||
error->all(FLERR,"Illegal fix ave/atom command");
|
||||
if (peratom_freq % nevery || (nrepeat-1)*nevery >= peratom_freq)
|
||||
error->all("Illegal fix ave/atom command");
|
||||
error->all(FLERR,"Illegal fix ave/atom command");
|
||||
|
||||
for (int i = 0; i < nvalues; i++) {
|
||||
if (which[i] == COMPUTE) {
|
||||
int icompute = modify->find_compute(ids[i]);
|
||||
if (icompute < 0)
|
||||
error->all("Compute ID for fix ave/atom does not exist");
|
||||
error->all(FLERR,"Compute ID for fix ave/atom does not exist");
|
||||
if (modify->compute[icompute]->peratom_flag == 0)
|
||||
error->all("Fix ave/atom compute does not calculate per-atom values");
|
||||
error->all(FLERR,"Fix ave/atom compute does not calculate per-atom values");
|
||||
if (argindex[i] == 0 &&
|
||||
modify->compute[icompute]->size_peratom_cols != 0)
|
||||
error->all("Fix ave/atom compute does not "
|
||||
error->all(FLERR,"Fix ave/atom compute does not "
|
||||
"calculate a per-atom vector");
|
||||
if (argindex[i] && modify->compute[icompute]->size_peratom_cols == 0)
|
||||
error->all("Fix ave/atom compute does not "
|
||||
error->all(FLERR,"Fix ave/atom compute does not "
|
||||
"calculate a per-atom array");
|
||||
if (argindex[i] &&
|
||||
argindex[i] > modify->compute[icompute]->size_peratom_cols)
|
||||
error->all("Fix ave/atom compute array is accessed out-of-range");
|
||||
error->all(FLERR,"Fix ave/atom compute array is accessed out-of-range");
|
||||
|
||||
} else if (which[i] == FIX) {
|
||||
int ifix = modify->find_fix(ids[i]);
|
||||
if (ifix < 0)
|
||||
error->all("Fix ID for fix ave/atom does not exist");
|
||||
error->all(FLERR,"Fix ID for fix ave/atom does not exist");
|
||||
if (modify->fix[ifix]->peratom_flag == 0)
|
||||
error->all("Fix ave/atom fix does not calculate per-atom values");
|
||||
error->all(FLERR,"Fix ave/atom fix does not calculate per-atom values");
|
||||
if (argindex[i] == 0 && modify->fix[ifix]->size_peratom_cols != 0)
|
||||
error->all("Fix ave/atom fix does not calculate a per-atom vector");
|
||||
error->all(FLERR,"Fix ave/atom fix does not calculate a per-atom vector");
|
||||
if (argindex[i] && modify->fix[ifix]->size_peratom_cols == 0)
|
||||
error->all("Fix ave/atom fix does not calculate a per-atom array");
|
||||
error->all(FLERR,"Fix ave/atom fix does not calculate a per-atom array");
|
||||
if (argindex[i] && argindex[i] > modify->fix[ifix]->size_peratom_cols)
|
||||
error->all("Fix ave/atom fix array is accessed out-of-range");
|
||||
error->all(FLERR,"Fix ave/atom fix array is accessed out-of-range");
|
||||
if (nevery % modify->fix[ifix]->peratom_freq)
|
||||
error->all("Fix for fix ave/atom not computed at compatible time");
|
||||
error->all(FLERR,"Fix for fix ave/atom not computed at compatible time");
|
||||
|
||||
} else if (which[i] == VARIABLE) {
|
||||
int ivariable = input->variable->find(ids[i]);
|
||||
if (ivariable < 0)
|
||||
error->all("Variable name for fix ave/atom does not exist");
|
||||
error->all(FLERR,"Variable name for fix ave/atom does not exist");
|
||||
if (input->variable->atomstyle(ivariable) == 0)
|
||||
error->all("Fix ave/atom variable is not atom-style variable");
|
||||
error->all(FLERR,"Fix ave/atom variable is not atom-style variable");
|
||||
}
|
||||
}
|
||||
|
||||
@ -233,19 +233,19 @@ void FixAveAtom::init()
|
||||
if (which[m] == COMPUTE) {
|
||||
int icompute = modify->find_compute(ids[m]);
|
||||
if (icompute < 0)
|
||||
error->all("Compute ID for fix ave/atom does not exist");
|
||||
error->all(FLERR,"Compute ID for fix ave/atom does not exist");
|
||||
value2index[m] = icompute;
|
||||
|
||||
} else if (which[m] == FIX) {
|
||||
int ifix = modify->find_fix(ids[m]);
|
||||
if (ifix < 0)
|
||||
error->all("Fix ID for fix ave/atom does not exist");
|
||||
error->all(FLERR,"Fix ID for fix ave/atom does not exist");
|
||||
value2index[m] = ifix;
|
||||
|
||||
} else if (which[m] == VARIABLE) {
|
||||
int ivariable = input->variable->find(ids[m]);
|
||||
if (ivariable < 0)
|
||||
error->all("Variable name for fix ave/atom does not exist");
|
||||
error->all(FLERR,"Variable name for fix ave/atom does not exist");
|
||||
value2index[m] = ivariable;
|
||||
|
||||
} else value2index[m] = -1;
|
||||
|
||||
Reference in New Issue
Block a user