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 #ifdef COMPUTE_CLASS
47 
48 ComputeStyle(property/local,ComputePropertyLocal)
49 
50 #else
51 
52 #ifndef LMP_COMPUTE_PROPERTY_LOCAL_H
53 #define LMP_COMPUTE_PROPERTY_LOCAL_H
54 
55 #include "compute.h"
56 
57 namespace LAMMPS_NS {
58 
59 class ComputePropertyLocal : public Compute {
60  public:
61   ComputePropertyLocal(class LAMMPS *, int &iarg, int, char **);
62   ~ComputePropertyLocal();
63   void init();
64   void init_list(int, class NeighList *);
65   void compute_local();
66   double memory_usage();
67 
68  private:
69   int nvalues,kindflag;
70 
71   int nmax;
72   double *vector;
73   double **array;
74   double *buf;
75 
76   class NeighList *list;
77 
78   int ncount;
79   int **indices;
80 
81   int count_pairs(int, int);
82   int count_bonds(int);
83   int count_angles(int);
84   int count_dihedrals(int);
85   int count_impropers(int);
86   void reallocate(int);
87 
88   typedef void (ComputePropertyLocal::*FnPtrPack)(int);
89   FnPtrPack *pack_choice;              // ptrs to pack functions
90 
91   void pack_patom1(int);
92   void pack_patom2(int);
93   void pack_ptype1(int);
94   void pack_ptype2(int);
95 
96   void pack_batom1(int);
97   void pack_batom2(int);
98   void pack_btype(int);
99 
100   void pack_aatom1(int);
101   void pack_aatom2(int);
102   void pack_aatom3(int);
103   void pack_atype(int);
104 
105   void pack_datom1(int);
106   void pack_datom2(int);
107   void pack_datom3(int);
108   void pack_datom4(int);
109   void pack_dtype(int);
110 
111   void pack_iatom1(int);
112   void pack_iatom2(int);
113   void pack_iatom3(int);
114   void pack_iatom4(int);
115   void pack_itype(int);
116 };
117 
118 }
119 
120 #endif
121 #endif
122 
123 /* ERROR/WARNING messages:
124 
125 E: Illegal ... command
126 
127 Self-explanatory.  Check the input script syntax and compare to the
128 documentation for the command.  You can use -echo screen as a
129 command-line option when running LAMMPS to see the offending line.
130 
131 E: Compute property/local cannot use these inputs together
132 
133 Only inputs that generate the same number of datums can be used
134 togther.  E.g. bond and angle quantities cannot be mixed.
135 
136 E: Invalid keyword in compute property/local command
137 
138 Self-explanatory.
139 
140 E: Compute property/local for property that isn't allocated
141 
142 Self-explanatory.
143 
144 E: No pair style is defined for compute property/local
145 
146 Self-explanatory.
147 
148 E: Pair style does not support compute property/local
149 
150 The pair style does not have a single() function, so it can
151 not be invoked by fix bond/swap.
152 
153 */
154