1 /* ----------------------------------------------------------------------
2     This is the
3 
4     ██╗     ██╗ ██████╗  ██████╗  ██████╗ ██╗  ██╗████████╗███████╗
5     ██║     ██║██╔════╝ ██╔════╝ ██╔════╝ ██║  ██║╚══██╔══╝██╔════╝
6     ██║     ██║██║  ███╗██║  ███╗██║  ███╗███████║   ██║   ███████╗
7     ██║     ██║██║   ██║██║   ██║██║   ██║██╔══██║   ██║   ╚════██║
8     ███████╗██║╚██████╔╝╚██████╔╝╚██████╔╝██║  ██║   ██║   ███████║
9     ╚══════╝╚═╝ ╚═════╝  ╚═════╝  ╚═════╝ ╚═╝  ╚═╝   ╚═╝   ╚══════╝®
10 
11     DEM simulation engine, released by
12     DCS Computing Gmbh, Linz, Austria
13     http://www.dcs-computing.com, office@dcs-computing.com
14 
15     LIGGGHTS® is part of CFDEM®project:
16     http://www.liggghts.com | http://www.cfdem.com
17 
18     Core developer and main author:
19     Christoph Kloss, christoph.kloss@dcs-computing.com
20 
21     LIGGGHTS® is open-source, distributed under the terms of the GNU Public
22     License, version 2 or later. It is distributed in the hope that it will
23     be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
24     of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. You should have
25     received a copy of the GNU General Public License along with LIGGGHTS®.
26     If not, see http://www.gnu.org/licenses . See also top-level README
27     and LICENSE files.
28 
29     LIGGGHTS® and CFDEM® are registered trade marks of DCS Computing GmbH,
30     the producer of the LIGGGHTS® software and the CFDEM®coupling software
31     See http://www.cfdem.com/terms-trademark-policy for details.
32 
33 -------------------------------------------------------------------------
34     Contributing author and copyright for this file:
35     This file is from LAMMPS
36     LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
37     http://lammps.sandia.gov, Sandia National Laboratories
38     Steve Plimpton, sjplimp@sandia.gov
39 
40     Copyright (2003) Sandia Corporation.  Under the terms of Contract
41     DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
42     certain rights in this software.  This software is distributed under
43     the GNU General Public License.
44 ------------------------------------------------------------------------- */
45 
46 #ifndef LMP_NEIGH_REQUEST_H
47 #define LMP_NEIGH_REQUEST_H
48 
49 #include "pointers.h"
50 
51 namespace LAMMPS_NS {
52 
53 class NeighRequest : protected Pointers {
54  public:
55   void *requestor;       // class that made request
56   int id;                // ID of request
57                          // used to track multiple requests from one class
58 
59   int64_t pairgran_hashcode;
60 
61   // which class is requesting the list, one flag is 1, others are 0
62 
63   int pair;              // set by default
64   int fix;
65   int compute;
66   int command;
67 
68   // kind of list requested, one flag is 1, others are 0
69   // set by requesting class
70 
71   int half;              // 1 if half neigh list (set by default)
72   int full;              // 1 if full neigh list
73 
74   int gran;              // 1 if granular list
75   int granhistory;       // 1 if granular history list
76 
77   int respainner;        // 1 if a rRESPA inner list
78   int respamiddle;       // 1 if a rRESPA middle list
79   int respaouter;        // 1 if a rRESPA outer list
80 
81   int half_from_full;    // 1 if half list computed from previous full list
82 
83   // 0 if needed every reneighboring during run
84   // 1 if occasionally needed by a fix, compute, etc
85   // set by requesting class
86 
87   int occasional;
88 
89   // 0 if use force::newton_pair setting
90   // 1 if override with pair newton on
91   // 2 if override with pair newton off
92 
93   int newton;
94 
95   // 0 if user of list wants no encoding of special bond flags and all neighs
96   // 1 if user of list wants special bond flags encoded, set by default
97 
98   int special;
99 
100   // number of auxiliary floating point values to store, 0 if none
101   // set by requesting class
102 
103   int dnum;
104 
105   // 1 if also need neighbors of ghosts
106 
107   int ghost;
108 
109   // 1 if neighbor list build will be done on GPU
110 
111   int cudable;
112 
113   // 1 if using multi-threaded neighbor list build
114 
115   int omp;
116 
117   // set by neighbor and pair_hybrid after all requests are made
118   // these settings do not change kind value
119 
120   int copy;              // 1 if this list copied from another list
121 
122   int skip;              // 1 if this list skips atom types from another list
123   int *iskip;            // iskip[i] if atoms of type I are not in list
124   int **ijskip;          // ijskip[i][j] if pairs of type I,J are not in list
125 
126   int otherlist;         // index of other list to copy or skip from
127 
128   // original params by requester
129   // stored to compare against in identical() in case Neighbor changes them
130 
131   int half_original;
132   int half_from_full_original;
133   int copy_original;
134   int otherlist_original;
135 
136   // methods
137 
138   NeighRequest(class LAMMPS *);
139   ~NeighRequest();
140   void archive();
141   int identical(NeighRequest *);
142   int same_kind(NeighRequest *);
143   int same_skip(NeighRequest *);
144   void copy_request(NeighRequest *);
145 };
146 
147 }
148 
149 #endif
150