git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5835 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -38,11 +38,11 @@ PairCoulCut::PairCoulCut(LAMMPS *lmp) : Pair(lmp) {}
|
||||
PairCoulCut::~PairCoulCut()
|
||||
{
|
||||
if (allocated) {
|
||||
memory->destroy_2d_int_array(setflag);
|
||||
memory->destroy_2d_double_array(cutsq);
|
||||
memory->destroy(setflag);
|
||||
memory->destroy(cutsq);
|
||||
|
||||
memory->destroy_2d_double_array(cut);
|
||||
memory->destroy_2d_double_array(scale);
|
||||
memory->destroy(cut);
|
||||
memory->destroy(scale);
|
||||
}
|
||||
}
|
||||
|
||||
@ -137,15 +137,15 @@ void PairCoulCut::allocate()
|
||||
allocated = 1;
|
||||
int n = atom->ntypes;
|
||||
|
||||
setflag = memory->create_2d_int_array(n+1,n+1,"pair:setflag");
|
||||
memory->create(setflag,n+1,n+1,"pair:setflag");
|
||||
for (int i = 1; i <= n; i++)
|
||||
for (int j = i; j <= n; j++)
|
||||
setflag[i][j] = 0;
|
||||
|
||||
cutsq = memory->create_2d_double_array(n+1,n+1,"pair:cutsq");
|
||||
memory->create(cutsq,n+1,n+1,"pair:cutsq");
|
||||
|
||||
cut = memory->create_2d_double_array(n+1,n+1,"pair:cut");
|
||||
scale = memory->create_2d_double_array(n+1,n+1,"pair:scale");
|
||||
memory->create(cut,n+1,n+1,"pair:cut");
|
||||
memory->create(scale,n+1,n+1,"pair:scale");
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user