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

This commit is contained in:
sjplimp
2015-02-13 18:30:07 +00:00
parent db215ba242
commit dfc6073e7a
9 changed files with 25 additions and 16 deletions

View File

@ -115,8 +115,10 @@ void ComputeMSDChunk::compute_array()
// first time call, allocate per-chunk arrays
// thereafter, require nchunk remain the same
if (firstflag) allocate(n);
else if (n != nchunk)
if (firstflag) {
nchunk = n;
allocate();
} else if (n != nchunk)
error->all(FLERR,"Compute msd/chunk nchunk is not static");
// zero local per-chunk values
@ -236,9 +238,8 @@ void ComputeMSDChunk::unlock(Fix *fixptr)
one-time allocate of per-chunk arrays
------------------------------------------------------------------------- */
void ComputeMSDChunk::allocate(int n)
void ComputeMSDChunk::allocate()
{
size_array_rows = nchunk = n;
memory->create(massproc,nchunk,"msd/chunk:massproc");
memory->create(masstotal,nchunk,"msd/chunk:masstotal");
memory->create(com,nchunk,3,"msd/chunk:com");