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

This commit is contained in:
sjplimp
2014-12-09 19:37:05 +00:00
parent ced125c2b4
commit 792d174d10
3 changed files with 10 additions and 5 deletions

View File

@ -93,6 +93,11 @@ Compute::Compute(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
datamask = ALL_MASK; datamask = ALL_MASK;
datamask_ext = ALL_MASK; datamask_ext = ALL_MASK;
// force init to zero in case these are used as logicals
vector = vector_atom = vector_local = NULL;
array = array_atom = array_local = NULL;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -106,7 +106,7 @@ ComputeAtomMolecule(LAMMPS *lmp, int narg, char **arg) :
int ifix = modify->find_fix(ids[i]); int ifix = modify->find_fix(ids[i]);
if (ifix < 0) if (ifix < 0)
error->all(FLERR,"Fix ID for compute atom/molecule does not exist"); error->all(FLERR,"Fix ID for compute atom/molecule does not exist");
if (modify->fix[ifix]->peratom_flag) if (modify->fix[ifix]->peratom_flag == 0)
error->all(FLERR,"Compute atom/molecule fix does not " error->all(FLERR,"Compute atom/molecule fix does not "
"calculate per-atom values"); "calculate per-atom values");
if (argindex[i] == 0 && if (argindex[i] == 0 &&
@ -299,9 +299,8 @@ void ComputeAtomMolecule::compute_one(int m)
peratom = compute->vector_atom; peratom = compute->vector_atom;
nstride = 1; nstride = 1;
} else { } else {
if (compute->array_atom) peratom = &compute->array_atom[0][aidx-1]; peratom = &compute->array_atom[0][aidx-1];
else peratom = NULL; nstride = compute->size_peratom_cols;
nstride = compute->size_array_cols;
} }
// access fix fields, check if fix frequency is a match // access fix fields, check if fix frequency is a match
@ -317,7 +316,7 @@ void ComputeAtomMolecule::compute_one(int m)
nstride = 1; nstride = 1;
} else { } else {
peratom = &fix->array_atom[0][aidx-1]; peratom = &fix->array_atom[0][aidx-1];
nstride = fix->size_array_cols; nstride = fix->size_peratom_cols;
} }
// evaluate atom-style variable // evaluate atom-style variable

View File

@ -41,6 +41,7 @@ FixGravity::FixGravity(LAMMPS *lmp, int narg, char **arg) :
{ {
if (narg < 5) error->all(FLERR,"Illegal fix gravity command"); if (narg < 5) error->all(FLERR,"Illegal fix gravity command");
dynamic_group_allow = 1;
scalar_flag = 1; scalar_flag = 1;
global_freq = 1; global_freq = 1;
extscalar = 1; extscalar = 1;