diff --git a/src/atom.cpp b/src/atom.cpp index 2f27dd7457..00b9701689 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -38,10 +38,6 @@ #include #include -#ifdef LMP_INTEL -#include "neigh_request.h" -#endif - #ifdef LMP_GPU #include "fix_gpu.h" #include @@ -2177,12 +2173,7 @@ void Atom::setup_sort_bins() bininvz = nbinz / (bboxhi[2]-bboxlo[2]); #ifdef LMP_INTEL - int intel_neigh = 0; - if (neighbor->nrequest) { - if (neighbor->requests[0]->intel) intel_neigh = 1; - } else if (neighbor->old_nrequest) - if (neighbor->old_requests[0]->intel) intel_neigh = 1; - if (intel_neigh && userbinsize == 0.0) { + if (neighbor->has_intel_request() && userbinsize == 0.0) { if (neighbor->binsizeflag) bininv = 1.0/neighbor->binsize_user; double nx_low = neighbor->bboxlo[0]; diff --git a/src/neighbor.cpp b/src/neighbor.cpp index 3d82479c6c..45dc5cfecd 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -2091,6 +2091,13 @@ NeighRequest *Neighbor::add_request(Command *requestor, const char *style, int f return req; } +/* report if there is a neighbor list with the intel flag set */ +bool Neighbor::has_intel_request() const +{ + return (((nrequest > 0) && (requests[0]->intel > 0)) + || ((old_nrequest > 0) && (old_requests[0]->intel > 0))); +} + /* ---------------------------------------------------------------------- setup neighbor binning and neighbor stencils called before run and every reneighbor if box size/shape changes diff --git a/src/neighbor.h b/src/neighbor.h index 3c392feb0a..3f3a75aa1e 100644 --- a/src/neighbor.h +++ b/src/neighbor.h @@ -133,6 +133,9 @@ class Neighbor : protected Pointers { NeighRequest *add_request(class Compute *, int); NeighRequest *add_request(class Command *, const char *, int); + // report if we have INTEL package neighbor lists + bool has_intel_request() const; + int decide(); // decide whether to build or not virtual int check_distance(); // check max distance moved since last build void setup_bins(); // setup bins based on box and cutoff