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 COMPUTE_CLASS
15 // clang-format off
16 ComputeStyle(centroid/stress/atom,ComputeCentroidStressAtom);
17 // clang-format on
18 #else
19 
20 #ifndef LMP_COMPUTE_CENTROID_STRESS_ATOM_H
21 #define LMP_COMPUTE_CENTROID_STRESS_ATOM_H
22 
23 #include "compute.h"
24 
25 namespace LAMMPS_NS {
26 
27 class ComputeCentroidStressAtom : public Compute {
28  public:
29   ComputeCentroidStressAtom(class LAMMPS *, int, char **);
30   ~ComputeCentroidStressAtom();
31   void init();
32   void compute_peratom();
33   int pack_reverse_comm(int, int, double *);
34   void unpack_reverse_comm(int, int *, double *);
35   double memory_usage();
36 
37  private:
38   int keflag, pairflag, bondflag, angleflag, dihedralflag, improperflag;
39   int kspaceflag, fixflag, biasflag;
40   Compute *temperature;
41   char *id_temp;
42 
43   int nmax;
44   double **stress;
45 };
46 
47 }    // namespace LAMMPS_NS
48 
49 #endif
50 #endif
51 
52 /* ERROR/WARNING messages:
53 
54 E: Illegal ... command
55 
56 Self-explanatory.  Check the input script syntax and compare to the
57 documentation for the command.  You can use -echo screen as a
58 command-line option when running LAMMPS to see the offending line.
59 
60 E: Could not find compute centroid/stress/atom temperature ID
61 
62 Self-explanatory.
63 
64 E: Compute centroid/stress/atom temperature ID does not compute temperature
65 
66 The specified compute must compute temperature.
67 
68 E: Per-atom virial was not tallied on needed timestep
69 
70 You are using a thermo keyword that requires potentials to have
71 tallied the virial, but they didn't on this timestep.  See the
72 variable doc page for ideas on how to make this work.
73 
74 */
75