insure compute pair/property local will use a copy of granular neigh list

This commit is contained in:
Steve Plimpton
2017-06-21 12:44:35 -06:00
parent 87c028ed02
commit 7dc380b113
4 changed files with 28 additions and 0 deletions

View File

@ -1268,6 +1268,10 @@ void Neighbor::morph_copy()
if (irq->ghost && !jrq->ghost) continue;
// do not copy from a history list
if (jrq->history) continue;
// these flags must be same,
// else 2 lists do not store same pairs
// or their data structures are different
@ -1619,6 +1623,21 @@ void Neighbor::requests_new2old()
old_oneatom = oneatom;
}
/* ----------------------------------------------------------------------
find and return request made by classptr
if not found or classpt = NULL, return NULL
------------------------------------------------------------------------- */
NeighRequest *Neighbor::find_request(void *classptr)
{
if (classptr == NULL) return NULL;
for (int i = 0; i < nrequest; i++)
if (requests[i]->requestor == classptr) return requests[i];
return NULL;
}
/* ----------------------------------------------------------------------
assign NBin class to a NeighList
use neigh request settings to build mask