1 // clang-format off 2 /* -*- c++ -*- ---------------------------------------------------------- 3 LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator 4 https://www.lammps.org/, Sandia National Laboratories 5 Steve Plimpton, sjplimp@sandia.gov 6 7 Copyright (2003) Sandia Corporation. Under the terms of Contract 8 DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains 9 certain rights in this software. This software is distributed under 10 the GNU General Public License. 11 12 See the README file in the top-level LAMMPS directory. 13 ------------------------------------------------------------------------- */ 14 15 /* ---------------------------------------------------------------------- 16 Contributing author: Stan Moore (Sandia) 17 ------------------------------------------------------------------------- */ 18 19 #ifdef BOND_CLASS 20 // clang-format off 21 BondStyle(fene/intel,BondFENEIntel); 22 // clang-format on 23 #else 24 25 #ifndef LMP_BOND_FENE_INTEL_H 26 #define LMP_BOND_FENE_INTEL_H 27 28 #include "bond_fene.h" 29 #include "fix_intel.h" 30 31 namespace LAMMPS_NS { 32 33 class BondFENEIntel : public BondFENE { 34 public: 35 BondFENEIntel(class LAMMPS *); 36 virtual ~BondFENEIntel(); 37 virtual void compute(int, int); 38 virtual void init_style(); 39 40 protected: 41 FixIntel *fix; 42 43 template <class flt_t> class ForceConst; 44 template <class flt_t, class acc_t> 45 void compute(int eflag, int vflag, IntelBuffers<flt_t, acc_t> *buffers, 46 const ForceConst<flt_t> &fc); 47 template <int EVFLAG, int EFLAG, int NEWTON_BOND, class flt_t, class acc_t> 48 void eval(const int vflag, IntelBuffers<flt_t, acc_t> *buffers, const ForceConst<flt_t> &fc); 49 template <class flt_t, class acc_t> 50 void pack_force_const(ForceConst<flt_t> &fc, IntelBuffers<flt_t, acc_t> *buffers); 51 52 #ifdef _LMP_INTEL_OFFLOAD 53 int _use_base; 54 #endif 55 56 template <class flt_t> class ForceConst { 57 public: 58 typedef struct { 59 flt_t k, ir0sq, sigma, epsilon; 60 } fc_packed1; 61 fc_packed1 *fc; 62 ForceConst()63 ForceConst() : _nbondtypes(0) {} ~ForceConst()64 ~ForceConst() { set_ntypes(0, nullptr); } 65 66 void set_ntypes(const int nbondtypes, Memory *memory); 67 68 private: 69 int _nbondtypes; 70 Memory *_memory; 71 }; 72 ForceConst<float> force_const_single; 73 ForceConst<double> force_const_double; 74 }; 75 76 } // namespace LAMMPS_NS 77 78 #endif 79 #endif 80 81 /* ERROR/WARNING messages: 82 83 E: Incorrect args for bond coefficients 84 85 Self-explanatory. Check the input script or data file. 86 87 */ 88