fix bug in fix shear/history reported by kevin hanley. see #500

This commit is contained in:
Axel Kohlmeyer
2017-05-25 10:11:24 -04:00
parent 97d3c843c4
commit 5291f2ed6e

View File

@ -389,7 +389,7 @@ void FixShearHistory::pre_exchange_newton()
maxtouch = 0;
for (i = 0; i < nlocal_neigh; i++) maxtouch = MAX(maxtouch,npartner[i]);
comm->maxexchange_fix = MAX(comm->maxexchange_fix,4*maxtouch+1);
comm->maxexchange_fix = MAX(comm->maxexchange_fix,(dnum+1)*maxtouch+1);
// zero npartner values from previous nlocal_neigh to current nlocal
@ -590,7 +590,7 @@ int FixShearHistory::pack_reverse_comm_size(int n, int first)
last = first + n;
for (i = first; i < last; i++)
m += 1 + 4*npartner[i];
m += 1 + (dnum+1)*npartner[i];
return m;
}