fix bug looking up neighbor lists
This commit is contained in:
@ -1740,7 +1740,7 @@ void Neighbor::requests_new2old()
|
||||
TODO: should have optional argument "id" to match ID if multiple requests
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
NeighRequest *Neighbor::find_request(void *classptr)
|
||||
NeighRequest *Neighbor::find_request(void *classptr) const
|
||||
{
|
||||
if (classptr == nullptr) return nullptr;
|
||||
|
||||
@ -1768,11 +1768,11 @@ const std::vector<NeighRequest *> Neighbor::get_pair_requests() const
|
||||
TODO: should have optional argument "id" to match ID if multiple requests
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
NeighList *Neighbor::find_list(void *classptr)
|
||||
NeighList *Neighbor::find_list(void *classptr) const
|
||||
{
|
||||
if (classptr == nullptr) return nullptr;
|
||||
|
||||
for (int i = 0; i < nrequest; i++)
|
||||
for (int i = 0; i < nlist; i++)
|
||||
if (lists[i]->requestor == classptr) return lists[i];
|
||||
|
||||
return nullptr;
|
||||
|
||||
@ -153,8 +153,8 @@ class Neighbor : protected Pointers {
|
||||
|
||||
void exclusion_group_group_delete(int, int); // rm a group-group exclusion
|
||||
int exclude_setting(); // return exclude value to accelerator pkg
|
||||
NeighList *find_list(void *); // find a neighbor request
|
||||
NeighRequest *find_request(void *); // find a neighbor request
|
||||
NeighList *find_list(void *) const; // find a neighbor list based on requestor
|
||||
NeighRequest *find_request(void *) const; // find a neighbor request based on requestor
|
||||
const std::vector<NeighRequest *> get_pair_requests() const;
|
||||
int any_full(); // Check if any old requests had full neighbor lists
|
||||
void build_collection(int); // build peratom collection array starting at the given index
|
||||
|
||||
Reference in New Issue
Block a user