~ubuntu-branches/debian/sid/lammps/sid

« back to all changes in this revision

Viewing changes to src/USER-INTEL/pair_lj_cut_intel.h

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2015-04-29 23:44:49 UTC
  • mfrom: (5.1.3 experimental)
  • Revision ID: package-import@ubuntu.com-20150429234449-mbhy9utku6hp6oq8
Tags: 0~20150313.gitfa668e1-1
Upload into unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- c++ -*- ----------------------------------------------------------
 
2
   LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
 
3
   http://lammps.sandia.gov, 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
/* ----------------------------------------------------------------------
 
15
   Contributing author: W. Michael Brown (Intel)
 
16
------------------------------------------------------------------------- */
 
17
 
 
18
#ifdef PAIR_CLASS
 
19
 
 
20
PairStyle(lj/cut/intel,PairLJCutIntel)
 
21
 
 
22
#else
 
23
 
 
24
#ifndef LMP_PAIR_LJ_CUT_INTEL_H
 
25
#define LMP_PAIR_LJ_CUT_INTEL_H
 
26
 
 
27
#include "pair_lj_cut.h"
 
28
#include "fix_intel.h"
 
29
 
 
30
namespace LAMMPS_NS {
 
31
 
 
32
class PairLJCutIntel : public PairLJCut {
 
33
 
 
34
 public:
 
35
  PairLJCutIntel(class LAMMPS *);
 
36
 
 
37
  virtual void compute(int, int);
 
38
  void init_style();
 
39
 
 
40
 private:
 
41
  FixIntel *fix;
 
42
  int _cop;
 
43
 
 
44
  template <class flt_t> class ForceConst;
 
45
  template <class flt_t, class acc_t>
 
46
  void compute(int eflag, int vflag, IntelBuffers<flt_t,acc_t> *buffers,
 
47
               const ForceConst<flt_t> &fc);
 
48
  template <int EVFLAG, int EFLAG, int NEWTON_PAIR, class flt_t, class acc_t>
 
49
  void eval(const int offload, const int vflag,
 
50
            IntelBuffers<flt_t,acc_t> * buffers,
 
51
            const ForceConst<flt_t> &fc, const int astart, const int aend);
 
52
 
 
53
  template <class flt_t, class acc_t>
 
54
  void pack_force_const(ForceConst<flt_t> &fc,
 
55
                        IntelBuffers<flt_t, acc_t> *buffers);
 
56
 
 
57
  // ----------------------------------------------------------------------
 
58
 
 
59
  template <class flt_t>
 
60
  class ForceConst {
 
61
   public:
 
62
    typedef struct { flt_t cutsq, lj1, lj2, offset; } fc_packed1;
 
63
    typedef struct { flt_t lj3, lj4; } fc_packed2;
 
64
 
 
65
    _alignvar(flt_t special_lj[4],64);
 
66
    fc_packed1 **ljc12o;
 
67
    fc_packed2 **lj34;
 
68
 
 
69
    ForceConst() : _ntypes(0)  {}
 
70
    ~ForceConst() { set_ntypes(0, NULL, _cop); }
 
71
 
 
72
    void set_ntypes(const int ntypes, Memory *memory, const int cop);
 
73
 
 
74
   private:
 
75
    int _ntypes, _cop;
 
76
    Memory *_memory;
 
77
  };
 
78
  ForceConst<float> force_const_single;
 
79
  ForceConst<double> force_const_double;
 
80
};
 
81
 
 
82
}
 
83
 
 
84
#endif
 
85
#endif
 
86
 
 
87
/* ERROR/WARNING messages:
 
88
 
 
89
E: The 'package intel' command is required for /intel styles
 
90
 
 
91
Self-explanatory.
 
92
 
 
93
*/