Commit 5291f2ed authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

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

parent 97d3c843
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
}