diff --git a/src/fix_shear_history.cpp b/src/fix_shear_history.cpp index 21942d753f..17e78830f4 100644 --- a/src/fix_shear_history.cpp +++ b/src/fix_shear_history.cpp @@ -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; }