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
This commit is contained in:
Tim Mattox
2017-02-07 12:53:45 -05:00
parent 52aaad907f
commit 151b3f552b
3 changed files with 3 additions and 1 deletions

View File

@ -79,6 +79,7 @@ NeighList::NeighList(LAMMPS *lmp) : Pointers(lmp)
// USER-DPD package
ndxAIR_ssa = NULL;
np = NULL;
}
/* ---------------------------------------------------------------------- */

View File

@ -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

View File

@ -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;