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 #ifndef LMP_ANGLE_H 47 #define LMP_ANGLE_H 48 49 #include <stdio.h> 50 #include "pointers.h" 51 52 namespace LAMMPS_NS { 53 54 class Angle : protected Pointers { 55 friend class ThrOMP; 56 friend class FixOMP; 57 public: 58 int allocated; 59 int *setflag; 60 int writedata; // 1 if writes coeffs to data file 61 double energy; // accumulated energies 62 double virial[6]; // accumlated virial 63 double *eatom,**vatom; // accumulated per-atom energy/virial 64 unsigned int datamask; 65 unsigned int datamask_ext; 66 67 Angle(class LAMMPS *); 68 virtual ~Angle(); 69 virtual void init(); 70 virtual void compute(int, int) = 0; settings(int,char **)71 virtual void settings(int, char **) {} 72 virtual void coeff(int, char **) = 0; init_style()73 virtual void init_style() {}; 74 virtual double equilibrium_angle(int) = 0; 75 virtual void write_restart(FILE *) = 0; 76 virtual void read_restart(FILE *) = 0; write_data(FILE *)77 virtual void write_data(FILE *) {} 78 virtual double single(int, int, int, int) = 0; 79 virtual double memory_usage(); 80 data_mask()81 virtual unsigned int data_mask() {return datamask;} data_mask_ext()82 virtual unsigned int data_mask_ext() {return datamask_ext;} 83 84 protected: 85 int suffix_flag; // suffix compatibility flag 86 87 int evflag; 88 int eflag_either,eflag_global,eflag_atom; 89 int vflag_either,vflag_global,vflag_atom; 90 int maxeatom,maxvatom; 91 92 void ev_setup(int, int); 93 void ev_tally(int, int, int, int, int, double, double *, double *, 94 double, double, double, double, double, double); 95 }; 96 97 } 98 99 #endif 100 101 /* ERROR/WARNING messages: 102 103 E: Angle coeffs are not set 104 105 No angle coefficients have been assigned in the data file or via the 106 angle_coeff command. 107 108 E: All angle coeffs are not set 109 110 All angle coefficients must be set in the data file or by the 111 angle_coeff command before running a simulation. 112 113 */ 114