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 Alexander Podlozhnyuk (DCS Computing GmbH, Linz) 36 37 Copyright 2015- DCS Computing GmbH, Linz 38 ------------------------------------------------------------------------- */ 39 40 #ifdef SUPERQUADRIC_ACTIVE_FLAG 41 42 #ifdef ATOM_CLASS 43 44 AtomStyle(superquadric,AtomVecSuperquadric) 45 46 AtomStyle(granular_superquadric,AtomVecSuperquadric) 47 48 #else 49 50 #ifndef LMP_ATOM_VEC_SUPERQUADRIC_H 51 #define LMP_ATOM_VEC_SUPERQUADRIC_H 52 53 #include "atom_vec.h" 54 55 namespace LAMMPS_NS { 56 57 class AtomVecSuperquadric : public AtomVec { 58 public: 59 AtomVecSuperquadric(class LAMMPS *); 60 ~AtomVecSuperquadric() {} 61 void init(); 62 void grow(int); 63 void grow_reset(); 64 void copy(int, int, int); 65 int pack_comm(int, int *, double *, int, int *); 66 int pack_comm_vel(int, int *, double *, int, int *); 67 int pack_comm_vel_wedge(int, int *, double *, int, int *); 68 int pack_comm_hybrid(int, int *, double *); 69 void unpack_comm(int, int, double *); 70 void unpack_comm_vel(int, int, double *); 71 int unpack_comm_hybrid(int, int, double *); 72 int pack_reverse(int, int, double *); 73 int pack_reverse_hybrid(int, int, double *); 74 void unpack_reverse(int, int *, double *); 75 int unpack_reverse_hybrid(int, int *, double *); 76 int pack_border(int, int *, double *, int, int *); 77 int pack_border_vel(int, int *, double *, int, int *); 78 int pack_border_vel_wedge(int, int *, double *, int, int *); 79 int pack_border_hybrid(int, int *, double *); 80 void unpack_border(int, int, double *); 81 void unpack_border_vel(int, int, double *); 82 int unpack_border_hybrid(int, int, double *); 83 int pack_exchange(int, double *); 84 int unpack_exchange(double *); 85 int size_restart(); 86 int pack_restart(int, double *); 87 int unpack_restart(double *); 88 void create_atom(int, double *); 89 void data_atom(double *, tagint, char **); 90 int data_atom_hybrid(int, char **); 91 void data_vel(int, char **); 92 int data_vel_hybrid(int, char **); 93 void pack_data(double **); 94 void pack_data(double **buf,int tag_offset); 95 int pack_data_hybrid(int, double *); 96 void write_data(FILE *, int, double **); 97 int write_data_hybrid(FILE *, double *); 98 void pack_vel(double **); 99 void pack_vel(double **buf,int tag_offset); 100 int pack_vel_hybrid(int, double *); 101 void write_vel(FILE *, int, double **); 102 int write_vel_hybrid(FILE *, double *); 103 bigint memory_usage(); 104 double* return_quat_ptr(int i); 105 void set_shape(int, double, double, double); 106 void set_blockiness(int i, double, double); 107 108 private: 109 int *tag,*type,*mask; 110 tagint *image; 111 double **x,**v,**f; 112 double *radius,*density,*rmass; 113 double **omega,**torque; 114 //Superquadric bonus----------------------------------- 115 double **shape, **blockiness; //3 half axes and 2 blockiness parameters 116 double **inertia, *volume, *area; //3 main inertia tensor components and volume of particle 117 double **quaternion, **angmom; //quaternion (4 variables) of current orientation and angular moment (3 components) 118 //------------------------------------------------------ 119 int nvar_restart; //number of variables per atom (see above) 120 int radvary; 121 }; 122 123 } 124 125 #endif // LMP_ATOM_VEC_SUPERQUADRIC_H 126 #endif // ATOM_CLASS 127 #endif // SUPERQUADRIC_ACTIVE_FLAG 128 129 /* ERROR/WARNING messages: 130 131 E: Per-processor system is too big 132 133 The number of owned atoms plus ghost atoms on a single 134 processor must fit in 32-bit integer. 135 136 E: Invalid atom ID in Atoms section of data file 137 138 Atom IDs must be positive integers. 139 140 E: Invalid atom type in Atoms section of data file 141 142 Atom types must range from 1 to specified # of types. 143 144 E: Invalid radius in Atoms section of data file 145 146 Radius must be >= 0.0. 147 148 E: Invalid density in Atoms section of data file 149 150 Density value cannot be <= 0.0. 151 152 */ 153