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

« back to all changes in this revision

Viewing changes to src/fix.cpp

  • 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:
23
23
using namespace LAMMPS_NS;
24
24
using namespace FixConst;
25
25
 
 
26
// allocate space for static class instance variable and initialize it
 
27
 
 
28
int Fix::instance_total = 0;
 
29
 
26
30
/* ---------------------------------------------------------------------- */
27
31
 
28
32
Fix::Fix(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
29
33
{
 
34
  instance_me = instance_total++;
 
35
 
30
36
  // fix ID, group, and style
31
37
  // ID must be all alphanumeric chars or underscores
32
38
 
63
69
 
64
70
  scalar_flag = vector_flag = array_flag = 0;
65
71
  peratom_flag = local_flag = 0;
 
72
  size_vector_variable = size_array_rows_variable = 0;
66
73
 
67
74
  comm_forward = comm_reverse = comm_border = 0;
68
75
  restart_reset = 0;
84
91
  execution_space = Host;
85
92
  datamask_read = ALL_MASK;
86
93
  datamask_modify = ALL_MASK;
 
94
 
 
95
  copymode = 0;
87
96
}
88
97
 
89
98
/* ---------------------------------------------------------------------- */
90
99
 
91
100
Fix::~Fix()
92
101
{
93
 
  delete [] id;
94
 
  delete [] style;
95
 
  memory->destroy(vatom);
 
102
  if (!copymode) {
 
103
    delete [] id;
 
104
    delete [] style;
 
105
    memory->destroy(vatom);
 
106
  }
96
107
}
97
108
 
98
109
/* ----------------------------------------------------------------------