Change to fix_property_atom to allow virtual override of grow_arrays() function

This commit is contained in:
Stan Moore
2016-12-15 15:48:09 -07:00
parent c0d6cbbdd3
commit d5f8f36442
2 changed files with 5 additions and 4 deletions

View File

@ -134,7 +134,6 @@ FixPropertyAtom::FixPropertyAtom(LAMMPS *lmp, int narg, char **arg) :
// register with Atom class
nmax_old = 0;
grow_arrays(atom->nmax);
atom->add_callback(0);
atom->add_callback(1);
if (border) atom->add_callback(2);
@ -190,6 +189,8 @@ int FixPropertyAtom::setmask()
void FixPropertyAtom::init()
{
grow_arrays(atom->nmax);
// error if atom style has changed since fix was defined
// don't allow this b/c user could change to style that defines molecule,q