From 415a55bc3e6c5ec986eee9a3b7b24f1f5d994e84 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Wed, 17 Jan 2018 10:41:56 -0700 Subject: [PATCH] Fix bug in fix_property_atom --- src/KOKKOS/fix_property_atom_kokkos.cpp | 1 + src/fix_property_atom.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/KOKKOS/fix_property_atom_kokkos.cpp b/src/KOKKOS/fix_property_atom_kokkos.cpp index fe2f101e56..9e29b6c35d 100644 --- a/src/KOKKOS/fix_property_atom_kokkos.cpp +++ b/src/KOKKOS/fix_property_atom_kokkos.cpp @@ -31,6 +31,7 @@ FixPropertyAtomKokkos::FixPropertyAtomKokkos(LAMMPS *lmp, int narg, char **arg) FixPropertyAtom(lmp, narg, arg) { atomKK = (AtomKokkos *) atom; + grow_arrays(atom->nmax); } /* ---------------------------------------------------------------------- diff --git a/src/fix_property_atom.cpp b/src/fix_property_atom.cpp index 002260d8f0..9ef939c58d 100644 --- a/src/fix_property_atom.cpp +++ b/src/fix_property_atom.cpp @@ -134,6 +134,8 @@ FixPropertyAtom::FixPropertyAtom(LAMMPS *lmp, int narg, char **arg) : // register with Atom class nmax_old = 0; + if (!lmp->kokkos) + grow_arrays(atom->nmax); atom->add_callback(0); atom->add_callback(1); if (border) atom->add_callback(2); @@ -189,8 +191,6 @@ 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