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 #ifdef FIX_CLASS
15 // clang-format off
16 FixStyle(vector,FixVector);
17 // clang-format on
18 #else
19 
20 #ifndef LMP_FIX_VECTOR_H
21 #define LMP_FIX_VECTOR_H
22 
23 #include "fix.h"
24 
25 namespace LAMMPS_NS {
26 
27 class FixVector : public Fix {
28  public:
29   FixVector(class LAMMPS *, int, char **);
30   ~FixVector();
31   int setmask();
32   void init();
33   void setup(int);
34   void end_of_step();
35   double compute_vector(int);
36   double compute_array(int, int);
37 
38  private:
39   int nvalues;
40   int *which, *argindex, *value2index;
41   char **ids;
42 
43   bigint nextstep, initialstep;
44 
45   int ncount;       // # of values currently in growing vector or array
46   int ncountmax;    // max # of values vector/array can hold
47   double *vector;
48   double **array;
49 };
50 
51 }    // namespace LAMMPS_NS
52 
53 #endif
54 #endif
55 
56 /* ERROR/WARNING messages:
57 
58 E: Illegal ... command
59 
60 Self-explanatory.  Check the input script syntax and compare to the
61 documentation for the command.  You can use -echo screen as a
62 command-line option when running LAMMPS to see the offending line.
63 
64 E: Compute ID for fix vector does not exist
65 
66 Self-explanatory.
67 
68 E: Fix vector compute does not calculate a scalar
69 
70 Self-explanatory.
71 
72 E: Fix vector compute does not calculate a vector
73 
74 Self-explanatory.
75 
76 E: Fix vector compute vector is accessed out-of-range
77 
78 Self-explanatory.
79 
80 E: Fix ID for fix vector does not exist
81 
82 Self-explanatory.
83 
84 E: Fix vector fix does not calculate a scalar
85 
86 Self-explanatory.
87 
88 E: Fix vector fix does not calculate a vector
89 
90 Self-explanatory.
91 
92 E: Fix vector fix vector is accessed out-of-range
93 
94 Self-explanatory.
95 
96 E: Fix for fix vector not computed at compatible time
97 
98 Fixes generate their values on specific timesteps.  Fix vector is
99 requesting a value on a non-allowed timestep.
100 
101 E: Variable name for fix vector does not exist
102 
103 Self-explanatory.
104 
105 E: Fix vector variable is not equal-style variable
106 
107 Self-explanatory.
108 
109 E: Fix vector variable is not vector-style variable
110 
111 UNDOCUMENTED
112 
113 E: Fix vector cannot set output array intensive/extensive from these inputs
114 
115 The inputs to the command have conflicting intensive/extensive attributes.
116 You need to use more than one fix vector command.
117 
118 E: Overflow of allocated fix vector storage
119 
120 This should not normally happen if the fix correctly calculated
121 how long the vector will grow to.  Contact the developers.
122 
123 */
124