Unverified Commit 0008c0ec authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

need to setup bins again if binning style has be reset

parent 262ce37e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -26,11 +26,13 @@ using namespace LAMMPS_NS;
NBin::NBin(LAMMPS *lmp) : Pointers(lmp)
{
  last_bin = -1;
  maxbin = maxatom = 0;
  mbins = maxbin = maxatom = 0;
  binhead = NULL;
  bins = NULL;
  atom2bin = NULL;

  neighbor->last_setup_bins = -1;

  // geometry settings

  dimension = domain->dimension;
+1 −0
Original line number Diff line number Diff line
@@ -2078,6 +2078,7 @@ void Neighbor::build(int topoflag)
  //   leading to errors or even a crash

  if (style != Neighbor::NSQ) {
    if (last_setup_bins < 0) setup_bins();
    for (int i = 0; i < nbin; i++) {
      neigh_bin[i]->bin_atoms_setup(nall);
      neigh_bin[i]->bin_atoms();