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

This commit is contained in:
sjplimp 2009-11-17 16:10:08 +00:00
parent a78ba892af
commit 7fc817dc15
1 changed files with 4 additions and 1 deletions

View File

@ -113,13 +113,16 @@ void AtomVecHybrid::grow(int n)
else nmax = n;
atom->nmax = nmax;
// sub-styles perform all reallocation
// turn off nextra_grow so hybrid can do that once below
int tmp = atom->nextra_grow;
atom->nextra_grow = 0;
for (int k = 0; k < nstyles; k++) styles[k]->grow(nmax);
atom->nextra_grow = tmp;
// insure sub-style ptrs and hybrid local ptrs are up to date
// for sub-styles, is in case sub-style reallocs actually realloced
// for sub-styles, do this in case multiple sub-style reallocs occurred
for (int k = 0; k < nstyles; k++) styles[k]->grow_reset();
grow_reset();