1 /* -*- c++ -*- ---------------------------------------------------------- 2 LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator 3 https://www.lammps.org/, Sandia National Laboratories 4 Steve Plimpton, sjplimp@sandia.gov 5 6 Copyright (2003) Sandia Corporation. Under the terms of Contract 7 DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains 8 certain rights in this software. This software is distributed under 9 the GNU General Public License. 10 11 See the README file in the top-level LAMMPS directory. 12 ------------------------------------------------------------------------- */ 13 14 #ifndef LMP_NEIGH_REQUEST_H 15 #define LMP_NEIGH_REQUEST_H 16 17 #include "pointers.h" 18 19 namespace LAMMPS_NS { 20 21 class NeighRequest : protected Pointers { 22 public: 23 int index; // index of which neigh request this is 24 void *requestor; // class that made request 25 int requestor_instance; // instance of that class (only Fix, Compute, Pair) 26 int id; // ID of request as stored by requestor 27 // used to track multiple requests from one class 28 29 // ----------------------------- 30 // flags set by requesting class for attributes of neighor list they need 31 // all must be set appropriately, all have defaults 32 // ----------------------------- 33 34 // which class style requests the list 35 // one flag is 1, others are 0 36 37 int pair; // pair is set by default 38 int fix; 39 int compute; 40 int command; 41 int neigh; 42 43 // half/full setting, determines which neighbors appear in list 44 // one flag is 1, other is 0 45 46 int half; // half neigh list (set by default) 47 int full; // full neigh list 48 49 // attribute flags, all are 0 by default 50 51 int occasional; // how often list is built 52 // 0 if needed every reneighboring during run 53 // 1 if only occasionally needed by a fix, compute, etc 54 55 int newton; // which owned/ghost pairs appear in list 56 // 0 if use force::newton_pair setting 57 // 1 if override with pair newton on 58 // 2 if override with pair newton off 59 60 int ghost; // 1 if includes ghost atom neighbors 61 int size; // 1 if pair cutoff set by particle radius 62 int history; // 1 if there is also neigh history info (FixNeighHist) 63 int granonesided; // 1 if one-sided granular list for 64 // sphere/surf interactions 65 int respainner; // 1 if need a rRESPA inner list 66 int respamiddle; // 1 if need a rRESPA middle list 67 int respaouter; // 1 if need a rRESPA outer list 68 int bond; // 1 if store bond neighbors instead of atom neighs 69 int omp; // set by OPENMP package 70 int intel; // set by INTEL package 71 int kokkos_host; // set by KOKKOS package 72 int kokkos_device; 73 int ssa; // set by DPD-REACT package, for Shardlow lists 74 int cut; // 1 if use a non-standard cutoff length 75 double cutoff; // special cutoff distance for this list 76 77 // flags set by pair hybrid 78 79 int skip; // 1 if this list skips atom types from another list 80 int *iskip; // iskip[i] if atoms of type I are not in list 81 int **ijskip; // ijskip[i][j] if pairs of type I,J are not in list 82 83 // command_style only set if command = 1 84 // allows print_pair_info() to access command name 85 86 const char *command_style; 87 88 // ----------------------------- 89 // flags set by Neighbor class to morph original requests 90 // ----------------------------- 91 92 int skiplist; // index of list to skip from 93 int off2on; // 1 if this is newton on list, but skips from off list 94 95 int copy; // 1 if this list copied from another list 96 int copylist; // index of list to copy from 97 98 int halffull; // 1 if half list computed from another full list 99 int halffulllist; // index of full list to derive half from 100 101 int unique; // 1 if this list requires its own 102 // NStencil, Nbin class - because of requestor cutoff 103 104 // ----------------------------- 105 // internal settings made by Neighbor class 106 // ----------------------------- 107 108 int index_bin; // index of NBin class assigned to this request 109 int index_stencil; // index of NStencil class assigned to this request 110 int index_pair; // index of NPair class assigned to this request 111 112 // methods 113 114 NeighRequest(class LAMMPS *); 115 ~NeighRequest(); 116 void archive(); 117 int identical(NeighRequest *); 118 int same_skip(NeighRequest *); 119 void copy_request(NeighRequest *, int); 120 }; 121 122 } // namespace LAMMPS_NS 123 124 #endif 125