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 36 Christoph Kloss (DCS Computing GmbH, Linz) 37 Christoph Kloss (JKU Linz) 38 Philippe Seil (JKU Linz) 39 40 Copyright 2012- DCS Computing GmbH, Linz 41 Copyright 2009-2012 JKU Linz 42 ------------------------------------------------------------------------- */ 43 44 #ifdef FIX_CLASS 45 46 FixStyle(move/mesh,FixMoveMesh) 47 FixStyle(move/mesh/gran,FixMoveMesh) // for backward compatibility 48 FixStyle(move/mesh/file,FixMoveMesh) 49 50 #else 51 52 #ifndef FIX_MOVE_MESH_H 53 #define FIX_MOVE_MESH_H 54 55 #include "fix.h" 56 #include "container.h" 57 #include <string> 58 59 namespace LAMMPS_NS 60 { 61 62 class FixMoveMesh : public LAMMPS_NS::Fix 63 { 64 public: 65 66 FixMoveMesh(LAMMPS *lmp, int narg, char **arg); 67 virtual ~FixMoveMesh(); 68 69 void post_create(); 70 71 void setup(int vflag); 72 void pre_delete(bool unfixflag); 73 int setmask(); 74 void init(); 75 76 void initial_integrate(int); 77 void final_integrate(); 78 79 void write_restart(FILE *); 80 void restart(char *); 81 82 void add_reference_point(double *point); 83 void get_reference_point(double *point); 84 void reset_reference_point(); 85 void resetNodePosOrig(); 86 87 void move(const double * const dx); 88 void rotate(const double dphi, const double * const axis, const double * const center); 89 90 class AbstractMesh * mesh() 91 { return mesh_; } 92 93 bool fixMeshCompare(const class FixMesh* fixMeshToCompare) const 94 { return fixMeshToCompare == fix_mesh_; } 95 96 class FixMesh* fixMesh() 97 { return fix_mesh_; } 98 99 private: 100 101 class FixMesh *fix_mesh_; 102 std::string fix_mesh_id_; 103 class MeshMover *move_; 104 class AbstractMesh *mesh_; 105 106 double time_; 107 double time_since_setup_; 108 109 double reference_point_[3]; 110 }; 111 } /* namespace LAMMPS_NS */ 112 #endif 113 #endif 114