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 FIX_CLASS
47 
48 FixStyle(setforce,FixSetForce)
49 
50 #else
51 
52 #ifndef LMP_FIX_SET_FORCE_H
53 #define LMP_FIX_SET_FORCE_H
54 
55 #include "fix.h"
56 
57 namespace LAMMPS_NS {
58 
59 class FixSetForce : public Fix {
60  public:
61   FixSetForce(class LAMMPS *, int, char **);
62   ~FixSetForce();
63   int setmask();
64   void init();
65   void setup(int);
66   void min_setup(int);
67   void post_force(int);
68   void post_force_respa(int, int, int);
69   void min_post_force(int);
70   double compute_vector(int);
71   double memory_usage();
72 
73  private:
74   double xvalue,yvalue,zvalue;
75   int varflag,iregion;
76   char *xstr,*ystr,*zstr;
77   char *idregion;
78   int xvar,yvar,zvar,xstyle,ystyle,zstyle;
79   double foriginal[3],foriginal_all[3];
80   int varany,force_flag;
81   int nlevels_respa;
82 
83   int maxatom;
84   double **sforce;
85 };
86 
87 }
88 
89 #endif
90 #endif
91 
92 /* ERROR/WARNING messages:
93 
94 E: Illegal ... command
95 
96 Self-explanatory.  Check the input script syntax and compare to the
97 documentation for the command.  You can use -echo screen as a
98 command-line option when running LAMMPS to see the offending line.
99 
100 E: Region ID for fix setforce does not exist
101 
102 Self-explanatory.
103 
104 E: Variable name for fix setforce does not exist
105 
106 Self-explanatory.
107 
108 E: Variable for fix setforce is invalid style
109 
110 Only equal-style variables can be used.
111 
112 E: Cannot use non-zero forces in an energy minimization
113 
114 Fix setforce cannot be used in this manner.  Use fix addforce
115 instead.
116 
117 */
118