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_NBIN_H 15 #define LMP_NBIN_H 16 17 #include "pointers.h" 18 19 namespace LAMMPS_NS { 20 21 class NBin : protected Pointers { 22 public: 23 int istyle; // 1-N index into binnames 24 bigint last_bin; // last timestep atoms were binned 25 double cutoff_custom; // cutoff set by requestor 26 27 // Variables for NBinStandard 28 29 int nbinx, nbiny, nbinz; // # of global bins 30 int mbins; // # of local bins and offset on this proc 31 int mbinx, mbiny, mbinz; 32 int mbinxlo, mbinylo, mbinzlo; 33 34 double binsizex, binsizey, binsizez; // bin sizes and inverse sizes 35 double bininvx, bininvy, bininvz; 36 37 int *binhead; // index of first atom in each bin 38 int *bins; // index of next atom in same bin 39 int *atom2bin; // bin assignment for each atom (local+ghost) 40 41 // Analogues for NBinMultimulti 42 43 int *nbinx_multi, *nbiny_multi, *nbinz_multi; 44 int *mbins_multi; 45 int *mbinx_multi, *mbiny_multi, *mbinz_multi; 46 int *mbinxlo_multi, *mbinylo_multi, *mbinzlo_multi; 47 double *binsizex_multi, *binsizey_multi, *binsizez_multi; 48 double *bininvx_multi, *bininvy_multi, *bininvz_multi; 49 50 int **binhead_multi; 51 52 NBin(class LAMMPS *); 53 ~NBin(); 54 void post_constructor(class NeighRequest *); 55 virtual void copy_neighbor_info(); 56 57 virtual void bin_atoms_setup(int) = 0; 58 virtual void setup_bins(int) = 0; 59 virtual void bin_atoms() = 0; memory_usage()60 virtual double memory_usage() { return 0.0; } 61 62 // Kokkos package 63 64 int kokkos; // 1 if class stores Kokkos data 65 66 protected: 67 // data from Neighbor class 68 69 int includegroup; 70 double cutneighmin; 71 double cutneighmax; 72 int binsizeflag; 73 double binsize_user; 74 double *bboxlo, *bboxhi; 75 int ncollections; 76 double **cutcollectionsq; 77 78 // data common to all NBin variants 79 80 int dimension; 81 int triclinic; 82 83 // data for standard NBin 84 85 int maxatom; // size of bins array 86 int maxbin; // size of binhead array 87 88 // data for multi NBin 89 90 int maxcollections; // size of multi arrays 91 int *maxbins_multi; // size of 2nd dimension of binhead_multi array 92 93 // methods 94 95 int coord2bin(double *); 96 int coord2bin_multi(double *, int); 97 }; 98 99 } // namespace LAMMPS_NS 100 101 #endif 102 103 /* ERROR/WARNING messages: 104 105 E: Non-numeric positions - simulation unstable 106 107 UNDOCUMENTED 108 109 */ 110