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:
@ -79,6 +79,7 @@ NeighList::NeighList(LAMMPS *lmp) : Pointers(lmp)
|
|||||||
// USER-DPD package
|
// USER-DPD package
|
||||||
|
|
||||||
ndxAIR_ssa = NULL;
|
ndxAIR_ssa = NULL;
|
||||||
|
np = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|||||||
@ -82,6 +82,7 @@ class NeighList : protected Pointers {
|
|||||||
|
|
||||||
int AIRct_ssa[8]; // count of how many atoms in each AIR
|
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
|
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
|
// methods
|
||||||
|
|
||||||
|
|||||||
@ -785,7 +785,7 @@ int Neighbor::init_pair()
|
|||||||
}
|
}
|
||||||
|
|
||||||
PairCreator pair_creator = pairclass[flag-1];
|
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]->post_constructor(requests[i]);
|
||||||
neigh_pair[i]->istyle = flag;
|
neigh_pair[i]->istyle = flag;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user