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

« back to all changes in this revision

Viewing changes to src/KOKKOS/atom_vec_charge_kokkos.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
#ifdef ATOM_CLASS
 
15
 
 
16
AtomStyle(charge/kk,AtomVecChargeKokkos)
 
17
 
 
18
#else
 
19
 
 
20
#ifndef LMP_ATOM_VEC_CHARGE_KOKKOS_H
 
21
#define LMP_ATOM_VEC_CHARGE_KOKKOS_H
 
22
 
 
23
#include "atom_vec_kokkos.h"
 
24
#include "kokkos_type.h"
 
25
 
 
26
namespace LAMMPS_NS {
 
27
 
 
28
class AtomVecChargeKokkos : public AtomVecKokkos {
 
29
 public:
 
30
  AtomVecChargeKokkos(class LAMMPS *);
 
31
  virtual ~AtomVecChargeKokkos() {}
 
32
  void grow(int);
 
33
  void copy(int, int, int);
 
34
  int pack_comm(int, int *, double *, int, int *);
 
35
  int pack_comm_vel(int, int *, double *, int, int *);
 
36
  void unpack_comm(int, int, double *);
 
37
  void unpack_comm_vel(int, int, double *);
 
38
  int pack_reverse(int, int, double *);
 
39
  void unpack_reverse(int, int *, double *);
 
40
  int pack_border(int, int *, double *, int, int *);
 
41
  int pack_border_vel(int, int *, double *, int, int *);
 
42
  int pack_border_hybrid(int, int *, double *);
 
43
  void unpack_border(int, int, double *);
 
44
  void unpack_border_vel(int, int, double *);
 
45
  int unpack_border_hybrid(int, int, double *);
 
46
  int pack_exchange(int, double *);
 
47
  int unpack_exchange(double *);
 
48
  int size_restart();
 
49
  int pack_restart(int, double *);
 
50
  int unpack_restart(double *);
 
51
  void create_atom(int, double *);
 
52
  void data_atom(double *, tagint, char **);
 
53
  int data_atom_hybrid(int , char **);
 
54
  void pack_data(double **);
 
55
  int pack_data_hybrid(int, double *);
 
56
  void write_data(FILE *, int, double **);
 
57
  int write_data_hybrid(FILE *, double *);
 
58
  bigint memory_usage();
 
59
 
 
60
  void grow_reset();
 
61
  int pack_comm_kokkos(const int &n, const DAT::tdual_int_2d &k_sendlist,
 
62
                       const int & iswap,
 
63
                       const DAT::tdual_xfloat_2d &buf,
 
64
                       const int &pbc_flag, const int pbc[]);
 
65
  void unpack_comm_kokkos(const int &n, const int &nfirst,
 
66
                          const DAT::tdual_xfloat_2d &buf);
 
67
  int pack_comm_self(const int &n, const DAT::tdual_int_2d &list,
 
68
                     const int & iswap, const int nfirst,
 
69
                     const int &pbc_flag, const int pbc[]);
 
70
  int pack_border_kokkos(int n, DAT::tdual_int_2d k_sendlist,
 
71
                         DAT::tdual_xfloat_2d buf,int iswap,
 
72
                         int pbc_flag, int *pbc, ExecutionSpace space);
 
73
  void unpack_border_kokkos(const int &n, const int &nfirst,
 
74
                            const DAT::tdual_xfloat_2d &buf,
 
75
                            ExecutionSpace space);
 
76
  int pack_exchange_kokkos(const int &nsend,DAT::tdual_xfloat_2d &buf,
 
77
                           DAT::tdual_int_1d k_sendlist,
 
78
                           DAT::tdual_int_1d k_copylist,
 
79
                           ExecutionSpace space, int dim,
 
80
                           X_FLOAT lo, X_FLOAT hi);
 
81
  int unpack_exchange_kokkos(DAT::tdual_xfloat_2d &k_buf, int nrecv,
 
82
                             int nlocal, int dim, X_FLOAT lo, X_FLOAT hi,
 
83
                             ExecutionSpace space);
 
84
 
 
85
  void sync(ExecutionSpace space, unsigned int mask);
 
86
  void modified(ExecutionSpace space, unsigned int mask);
 
87
 
 
88
 protected:
 
89
  tagint *tag;
 
90
  int *type,*mask;
 
91
  imageint *image;
 
92
  double **x,**v,**f;
 
93
 
 
94
  double *q;
 
95
 
 
96
  DAT::t_tagint_1d d_tag;
 
97
  HAT::t_tagint_1d h_tag;
 
98
 
 
99
  DAT::t_int_1d d_type, d_mask;
 
100
  HAT::t_int_1d h_type, h_mask;
 
101
 
 
102
  DAT::t_imageint_1d d_image;
 
103
  HAT::t_imageint_1d h_image;
 
104
 
 
105
  DAT::t_x_array d_x;
 
106
  DAT::t_v_array d_v;
 
107
  DAT::t_f_array d_f;
 
108
  HAT::t_x_array h_x;
 
109
  HAT::t_v_array h_v;
 
110
  HAT::t_f_array h_f;
 
111
 
 
112
  DAT::t_float_1d d_q;
 
113
 
 
114
  HAT::t_float_1d h_q;
 
115
 
 
116
  DAT::tdual_int_1d k_count;
 
117
};
 
118
 
 
119
}
 
120
 
 
121
#endif
 
122
#endif
 
123
 
 
124
/* ERROR/WARNING messages:
 
125
 
 
126
*/