From 5291f2ed6e8db047cb1195feb8e84afce2cd0d82 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 25 May 2017 10:11:24 -0400 Subject: [PATCH] fix bug in fix shear/history reported by kevin hanley. see #500 --- src/fix_shear_history.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }