Commit 151b3f55 authored by Tim Mattox's avatar Tim Mattox
Browse files

USER-DPD: Save pointer to the NPair used to create the NeighList

Gives a user of NeighList access to data stored in a custom NPair
parent 52aaad90
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@ NeighList::NeighList(LAMMPS *lmp) : Pointers(lmp)
  // USER-DPD package

  ndxAIR_ssa = NULL;
  np = NULL;
}

/* ---------------------------------------------------------------------- */
+1 −0
Original line number Diff line number Diff line
@@ -82,6 +82,7 @@ class NeighList : protected Pointers {

  int AIRct_ssa[8]; // count of how many atoms in each AIR
  uint16_t (*ndxAIR_ssa)[8]; // for each atom, last neighbor index of each AIR
  class NPair *np;           // ptr to NPair instance I depend on

  // methods

+1 −1
Original line number Diff line number Diff line
@@ -785,7 +785,7 @@ int Neighbor::init_pair()
    }

    PairCreator pair_creator = pairclass[flag-1];
    neigh_pair[i] = pair_creator(lmp);
    lists[i]->np = neigh_pair[i] = pair_creator(lmp);
    neigh_pair[i]->post_constructor(requests[i]);
    neigh_pair[i]->istyle = flag;