Commit 841cae36 authored by sjplimp's avatar sjplimp
Browse files

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@16048 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent 28af5911
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ NeighRequest::NeighRequest(LAMMPS *lmp) : Pointers(lmp)
  command_style = NULL;

  // combination of settings, mutiple can be set to 1
  // default is every reneighboring
  // default is every reneighboring, not occasional
  // default is use newton_pair setting in force
  // default is no size history (when gran = 1)
  // default is no one-sided sphere/surface interactions (when gran = 1)
@@ -55,6 +55,7 @@ NeighRequest::NeighRequest(LAMMPS *lmp) : Pointers(lmp)
  // default is no multi-threaded neighbor list build
  // default is no Kokkos neighbor list build
  // default is no Shardlow Splitting Algorithm (SSA) neighbor list build
  // default is neighbors of atoms, not bonds

  occasional = 0;
  newton = 0;
@@ -65,6 +66,7 @@ NeighRequest::NeighRequest(LAMMPS *lmp) : Pointers(lmp)
  intel = 0;
  kokkos_host = kokkos_device = 0;
  ssa = 0;
  bond = 0;

  // copy/skip/derive info, default is no copy or skip
  // none or only one option is set
@@ -142,6 +144,7 @@ int NeighRequest::identical(NeighRequest *other)
  if (kokkos_host != other->kokkos_host) same = 0;
  if (kokkos_device != other->kokkos_device) same = 0;
  if (ssa != other->ssa) same = 0;
  if (bond != other->bond) same = 0;

  if (copy != other->copy_original) same = 0;
  if (same_skip(other) == 0) same = 0;
@@ -182,6 +185,7 @@ int NeighRequest::same_kind(NeighRequest *other)
  if (kokkos_host != other->kokkos_host) same = 0;
  if (kokkos_device != other->kokkos_device) same = 0;
  if (ssa != other->ssa) same = 0;
  if (bond != other->bond) same = 0;

  // copy/skip/derive info does not need to be the same

@@ -237,4 +241,5 @@ void NeighRequest::copy_request(NeighRequest *other)
  kokkos_host = other->kokkos_host;
  kokkos_device = other->kokkos_device;
  ssa = other->ssa;
  bond = other->bond;
}
+4 −0
Original line number Diff line number Diff line
@@ -95,6 +95,10 @@ class NeighRequest : protected Pointers {
  
  int ssa;

  // 1 if bond neighbors, not atom neighbors
  
  int bond;

  // -----------------
  // end of optional settings
  // -----------------
+6 −4
Original line number Diff line number Diff line
@@ -1411,11 +1411,11 @@ int Neighbor::choose_pair(NeighRequest *rq)

  int copyflag,skipflag,halfflag,fullflag,halffullflag,sizeflag,respaflag,
    ghostflag,off2onflag,onesideflag,ssaflag,ompflag,intelflag,
    kokkos_device_flag,kokkos_host_flag;
    kokkos_device_flag,kokkos_host_flag,bondflag;

  copyflag = skipflag = halfflag = fullflag = halffullflag = sizeflag = 
    ghostflag = respaflag = off2onflag = onesideflag = ssaflag = 
    ompflag = intelflag = kokkos_device_flag = kokkos_host_flag = 0;
    ompflag = intelflag = kokkos_device_flag = kokkos_host_flag = bondflag = 0;

  if (rq->copy) copyflag = NP_COPY;
  if (rq->skip) skipflag = NP_SKIP;
@@ -1447,6 +1447,7 @@ int Neighbor::choose_pair(NeighRequest *rq)
  if (rq->intel) intelflag = NP_INTEL;
  if (rq->kokkos_device) kokkos_device_flag = NP_KOKKOS_DEVICE;
  if (rq->kokkos_host) kokkos_host_flag = NP_KOKKOS_HOST;
  if (rq->bond) bondflag = NP_BOND;

  int newtflag;
  if (rq->newton == 0 && newton_pair) newtflag = 1;
@@ -1459,10 +1460,10 @@ int Neighbor::choose_pair(NeighRequest *rq)

  int mask;

  //printf("FLAGS: %d %d %d %d %d %d %d %d %d %d %d %d %d %d\n",
  //printf("FLAGS: %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d\n",
  //       copyflag,skipflag,halfflag,fullflag,halffullflag,
  //       sizeflag,respaflag,ghostflag,off2onflag,onesideflag,ssaflag,
  //       ompflag,intelflag,newtflag);
  //       ompflag,intelflag,newtflag,bondflag);

  for (int i = 0; i < npclass; i++) {
    mask = pairmasks[i];
@@ -1496,6 +1497,7 @@ int Neighbor::choose_pair(NeighRequest *rq)
    if (off2onflag != (mask & NP_OFF2ON)) continue;
    if (onesideflag != (mask & NP_ONESIDE)) continue;
    if (ssaflag != (mask & NP_SSA)) continue;
    if (bondflag != (mask & NP_BOND)) continue;
    if (ompflag != (mask & NP_OMP)) continue;
    if (intelflag != (mask & NP_INTEL)) continue;

+1 −0
Original line number Diff line number Diff line
@@ -267,6 +267,7 @@ namespace NeighConst {
  static const int NP_TRI      = 1<<19;
  static const int NP_KOKKOS_DEVICE = 1<<20;
  static const int NP_KOKKOS_HOST   = 1<<21;
  static const int NP_BOND     = 1<<22;
}

}