Skip to content

Commit

Permalink
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5835 f3b2605a-c…
Browse files Browse the repository at this point in the history
…512-4ea7-a41b-209d697bcdaa
  • Loading branch information
sjplimp committed Mar 25, 2011
1 parent e3cf018 commit fbb475b
Show file tree
Hide file tree
Showing 149 changed files with 1,450 additions and 1,708 deletions.
4 changes: 1 addition & 3 deletions src/ASPHERE/atom_vec_ellipsoid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -728,9 +728,7 @@ int AtomVecEllipsoid::unpack_restart(double *buf)
if (nlocal == nmax) {
grow(0);
if (atom->nextra_store)
atom->extra = memory->grow_2d_double_array(atom->extra,nmax,
atom->nextra_store,
"atom:extra");
memory->grow(atom->extra,nmax,atom->nextra_store,"atom:extra");
}

int m = 1;
Expand Down
5 changes: 2 additions & 3 deletions src/ASPHERE/compute_erotate_asphere.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ ComputeERotateAsphere(LAMMPS *lmp, int narg, char **arg) :
scalar_flag = 1;
extscalar = 1;

inertia =
memory->create_2d_double_array(atom->ntypes+1,3,"fix_temp_sphere:inertia");
memory->create(inertia,atom->ntypes+1,3,"fix_temp_sphere:inertia");

// error checks

Expand All @@ -52,7 +51,7 @@ ComputeERotateAsphere(LAMMPS *lmp, int narg, char **arg) :

ComputeERotateAsphere::~ComputeERotateAsphere()
{
memory->destroy_2d_double_array(inertia);
memory->destroy(inertia);
}

/* ---------------------------------------------------------------------- */
Expand Down
5 changes: 2 additions & 3 deletions src/ASPHERE/compute_temp_asphere.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ ComputeTempAsphere::ComputeTempAsphere(LAMMPS *lmp, int narg, char **arg) :
}

vector = new double[6];
inertia =
memory->create_2d_double_array(atom->ntypes+1,3,"fix_temp_sphere:inertia");
memory->create(inertia,atom->ntypes+1,3,"fix_temp_sphere:inertia");

// error checks

Expand All @@ -75,7 +74,7 @@ ComputeTempAsphere::~ComputeTempAsphere()
{
delete [] id_bias;
delete [] vector;
memory->destroy_2d_double_array(inertia);
memory->destroy(inertia);
}

/* ---------------------------------------------------------------------- */
Expand Down
5 changes: 2 additions & 3 deletions src/ASPHERE/fix_nh_asphere.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ using namespace LAMMPS_NS;
FixNHAsphere::FixNHAsphere(LAMMPS *lmp, int narg, char **arg) :
FixNH(lmp, narg, arg)
{
inertia =
memory->create_2d_double_array(atom->ntypes+1,3,"fix_nvt_asphere:inertia");
memory->create(inertia,atom->ntypes+1,3,"fix_nvt_asphere:inertia");

if (!atom->quat_flag || !atom->angmom_flag || !atom->torque_flag ||
!atom->avec->shape_type)
Expand All @@ -49,7 +48,7 @@ FixNHAsphere::FixNHAsphere(LAMMPS *lmp, int narg, char **arg) :

FixNHAsphere::~FixNHAsphere()
{
memory->destroy_2d_double_array(inertia);
memory->destroy(inertia);
}

/* ---------------------------------------------------------------------- */
Expand Down
5 changes: 2 additions & 3 deletions src/ASPHERE/fix_nve_asphere.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ using namespace LAMMPS_NS;
FixNVEAsphere::FixNVEAsphere(LAMMPS *lmp, int narg, char **arg) :
FixNVE(lmp, narg, arg)
{
inertia =
memory->create_2d_double_array(atom->ntypes+1,3,"fix_nve_asphere:inertia");
memory->create(inertia,atom->ntypes+1,3,"fix_nve_asphere:inertia");

// error checks

Expand All @@ -52,7 +51,7 @@ FixNVEAsphere::FixNVEAsphere(LAMMPS *lmp, int narg, char **arg) :

FixNVEAsphere::~FixNVEAsphere()
{
memory->destroy_2d_double_array(inertia);
memory->destroy(inertia);
}

/* ---------------------------------------------------------------------- */
Expand Down
56 changes: 28 additions & 28 deletions src/ASPHERE/pair_gayberne.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,20 @@ PairGayBerne::PairGayBerne(LAMMPS *lmp) : Pair(lmp)
PairGayBerne::~PairGayBerne()
{
if (allocated) {
memory->destroy_2d_int_array(setflag);
memory->destroy_2d_double_array(cutsq);

memory->destroy_2d_int_array(form);
memory->destroy_2d_double_array(epsilon);
memory->destroy_2d_double_array(sigma);
memory->destroy_2d_double_array(shape);
memory->destroy_2d_double_array(well);
memory->destroy_2d_double_array(cut);
memory->destroy_2d_double_array(lj1);
memory->destroy_2d_double_array(lj2);
memory->destroy_2d_double_array(lj3);
memory->destroy_2d_double_array(lj4);
memory->destroy_2d_double_array(offset);
memory->destroy(setflag);
memory->destroy(cutsq);

memory->destroy(form);
memory->destroy(epsilon);
memory->destroy(sigma);
memory->destroy(shape);
memory->destroy(well);
memory->destroy(cut);
memory->destroy(lj1);
memory->destroy(lj2);
memory->destroy(lj3);
memory->destroy(lj4);
memory->destroy(offset);
delete [] lshape;
delete [] setwell;
}
Expand Down Expand Up @@ -227,24 +227,24 @@ void PairGayBerne::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");

form = memory->create_2d_int_array(n+1,n+1,"pair:form");
epsilon = memory->create_2d_double_array(n+1,n+1,"pair:epsilon");
sigma = memory->create_2d_double_array(n+1,n+1,"pair:sigma");
shape = memory->create_2d_double_array(n+1,3,"pair:shape");
well = memory->create_2d_double_array(n+1,3,"pair:well");
cut = memory->create_2d_double_array(n+1,n+1,"pair:cut");
lj1 = memory->create_2d_double_array(n+1,n+1,"pair:lj1");
lj2 = memory->create_2d_double_array(n+1,n+1,"pair:lj2");
lj3 = memory->create_2d_double_array(n+1,n+1,"pair:lj3");
lj4 = memory->create_2d_double_array(n+1,n+1,"pair:lj4");
offset = memory->create_2d_double_array(n+1,n+1,"pair:offset");
memory->create(cutsq,n+1,n+1,"pair:cutsq");

memory->create(form,n+1,n+1,"pair:form");
memory->create(epsilon,n+1,n+1,"pair:epsilon");
memory->create(sigma,n+1,n+1,"pair:sigma");
memory->create(shape,n+1,3,"pair:shape");
memory->create(well,n+1,3,"pair:well");
memory->create(cut,n+1,n+1,"pair:cut");
memory->create(lj1,n+1,n+1,"pair:lj1");
memory->create(lj2,n+1,n+1,"pair:lj2");
memory->create(lj3,n+1,n+1,"pair:lj3");
memory->create(lj4,n+1,n+1,"pair:lj4");
memory->create(offset,n+1,n+1,"pair:offset");

lshape = new double[n+1];
setwell = new int[n+1];
Expand Down
56 changes: 28 additions & 28 deletions src/ASPHERE/pair_resquared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,20 @@ PairRESquared::PairRESquared(LAMMPS *lmp) : Pair(lmp),
PairRESquared::~PairRESquared()
{
if (allocated) {
memory->destroy_2d_int_array(setflag);
memory->destroy_2d_double_array(cutsq);

memory->destroy_2d_int_array(form);
memory->destroy_2d_double_array(epsilon);
memory->destroy_2d_double_array(sigma);
memory->destroy_2d_double_array(shape2);
memory->destroy_2d_double_array(well);
memory->destroy_2d_double_array(cut);
memory->destroy_2d_double_array(lj1);
memory->destroy_2d_double_array(lj2);
memory->destroy_2d_double_array(lj3);
memory->destroy_2d_double_array(lj4);
memory->destroy_2d_double_array(offset);
memory->destroy(setflag);
memory->destroy(cutsq);

memory->destroy(form);
memory->destroy(epsilon);
memory->destroy(sigma);
memory->destroy(shape2);
memory->destroy(well);
memory->destroy(cut);
memory->destroy(lj1);
memory->destroy(lj2);
memory->destroy(lj3);
memory->destroy(lj4);
memory->destroy(offset);
delete [] lshape;
delete [] setwell;
}
Expand Down Expand Up @@ -219,24 +219,24 @@ void PairRESquared::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");

form = memory->create_2d_int_array(n+1,n+1,"pair:form");
epsilon = memory->create_2d_double_array(n+1,n+1,"pair:epsilon");
sigma = memory->create_2d_double_array(n+1,n+1,"pair:sigma");
shape2 = memory->create_2d_double_array(n+1,3,"pair:shape2");
well = memory->create_2d_double_array(n+1,3,"pair:well");
cut = memory->create_2d_double_array(n+1,n+1,"pair:cut");
lj1 = memory->create_2d_double_array(n+1,n+1,"pair:lj1");
lj2 = memory->create_2d_double_array(n+1,n+1,"pair:lj2");
lj3 = memory->create_2d_double_array(n+1,n+1,"pair:lj3");
lj4 = memory->create_2d_double_array(n+1,n+1,"pair:lj4");
offset = memory->create_2d_double_array(n+1,n+1,"pair:offset");
memory->create(cutsq,n+1,n+1,"pair:cutsq");

memory->create(form,n+1,n+1,"pair:form");
memory->create(epsilon,n+1,n+1,"pair:epsilon");
memory->create(sigma,n+1,n+1,"pair:sigma");
memory->create(shape2,n+1,3,"pair:shape2");
memory->create(well,n+1,3,"pair:well");
memory->create(cut,n+1,n+1,"pair:cut");
memory->create(lj1,n+1,n+1,"pair:lj1");
memory->create(lj2,n+1,n+1,"pair:lj2");
memory->create(lj3,n+1,n+1,"pair:lj3");
memory->create(lj4,n+1,n+1,"pair:lj4");
memory->create(offset,n+1,n+1,"pair:offset");

lshape = new double[n+1];
setwell = new int[n+1];
Expand Down
42 changes: 21 additions & 21 deletions src/CLASS2/pair_lj_class2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ PairLJClass2::PairLJClass2(LAMMPS *lmp) : Pair(lmp) {}
PairLJClass2::~PairLJClass2()
{
if (allocated) {
memory->destroy_2d_int_array(setflag);
memory->destroy_2d_double_array(cutsq);

memory->destroy_2d_double_array(cut);
memory->destroy_2d_double_array(epsilon);
memory->destroy_2d_double_array(sigma);
memory->destroy_2d_double_array(lj1);
memory->destroy_2d_double_array(lj2);
memory->destroy_2d_double_array(lj3);
memory->destroy_2d_double_array(lj4);
memory->destroy_2d_double_array(offset);
memory->destroy(setflag);
memory->destroy(cutsq);

memory->destroy(cut);
memory->destroy(epsilon);
memory->destroy(sigma);
memory->destroy(lj1);
memory->destroy(lj2);
memory->destroy(lj3);
memory->destroy(lj4);
memory->destroy(offset);
}
}

Expand Down Expand Up @@ -143,21 +143,21 @@ void PairLJClass2::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");
epsilon = memory->create_2d_double_array(n+1,n+1,"pair:epsilon");
sigma = memory->create_2d_double_array(n+1,n+1,"pair:sigma");
lj1 = memory->create_2d_double_array(n+1,n+1,"pair:lj1");
lj2 = memory->create_2d_double_array(n+1,n+1,"pair:lj2");
lj3 = memory->create_2d_double_array(n+1,n+1,"pair:lj3");
lj4 = memory->create_2d_double_array(n+1,n+1,"pair:lj4");
offset = memory->create_2d_double_array(n+1,n+1,"pair:offset");
memory->create(cut,n+1,n+1,"pair:cut");
memory->create(epsilon,n+1,n+1,"pair:epsilon");
memory->create(sigma,n+1,n+1,"pair:sigma");
memory->create(lj1,n+1,n+1,"pair:lj1");
memory->create(lj2,n+1,n+1,"pair:lj2");
memory->create(lj3,n+1,n+1,"pair:lj3");
memory->create(lj4,n+1,n+1,"pair:lj4");
memory->create(offset,n+1,n+1,"pair:offset");
}

/* ----------------------------------------------------------------------
Expand Down
56 changes: 28 additions & 28 deletions src/CLASS2/pair_lj_class2_coul_cut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,20 @@ PairLJClass2CoulCut::PairLJClass2CoulCut(LAMMPS *lmp) : Pair(lmp) {}
PairLJClass2CoulCut::~PairLJClass2CoulCut()
{
if (allocated) {
memory->destroy_2d_int_array(setflag);
memory->destroy_2d_double_array(cutsq);

memory->destroy_2d_double_array(cut_lj);
memory->destroy_2d_double_array(cut_ljsq);
memory->destroy_2d_double_array(cut_coul);
memory->destroy_2d_double_array(cut_coulsq);
memory->destroy_2d_double_array(epsilon);
memory->destroy_2d_double_array(sigma);
memory->destroy_2d_double_array(lj1);
memory->destroy_2d_double_array(lj2);
memory->destroy_2d_double_array(lj3);
memory->destroy_2d_double_array(lj4);
memory->destroy_2d_double_array(offset);
memory->destroy(setflag);
memory->destroy(cutsq);

memory->destroy(cut_lj);
memory->destroy(cut_ljsq);
memory->destroy(cut_coul);
memory->destroy(cut_coulsq);
memory->destroy(epsilon);
memory->destroy(sigma);
memory->destroy(lj1);
memory->destroy(lj2);
memory->destroy(lj3);
memory->destroy(lj4);
memory->destroy(offset);
}
}

Expand Down Expand Up @@ -166,24 +166,24 @@ void PairLJClass2CoulCut::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");

cut_lj = memory->create_2d_double_array(n+1,n+1,"pair:cut_lj");
cut_ljsq = memory->create_2d_double_array(n+1,n+1,"pair:cut_ljsq");
cut_coul = memory->create_2d_double_array(n+1,n+1,"pair:cut_coul");
cut_coulsq = memory->create_2d_double_array(n+1,n+1,"pair:cut_coulsq");
epsilon = memory->create_2d_double_array(n+1,n+1,"pair:epsilon");
sigma = memory->create_2d_double_array(n+1,n+1,"pair:sigma");
lj1 = memory->create_2d_double_array(n+1,n+1,"pair:lj1");
lj2 = memory->create_2d_double_array(n+1,n+1,"pair:lj2");
lj3 = memory->create_2d_double_array(n+1,n+1,"pair:lj3");
lj4 = memory->create_2d_double_array(n+1,n+1,"pair:lj4");
offset = memory->create_2d_double_array(n+1,n+1,"pair:offset");
memory->create(cutsq,n+1,n+1,"pair:cutsq");

memory->create(cut_lj,n+1,n+1,"pair:cut_lj");
memory->create(cut_ljsq,n+1,n+1,"pair:cut_ljsq");
memory->create(cut_coul,n+1,n+1,"pair:cut_coul");
memory->create(cut_coulsq,n+1,n+1,"pair:cut_coulsq");
memory->create(epsilon,n+1,n+1,"pair:epsilon");
memory->create(sigma,n+1,n+1,"pair:sigma");
memory->create(lj1,n+1,n+1,"pair:lj1");
memory->create(lj2,n+1,n+1,"pair:lj2");
memory->create(lj3,n+1,n+1,"pair:lj3");
memory->create(lj4,n+1,n+1,"pair:lj4");
memory->create(offset,n+1,n+1,"pair:offset");
}

/* ----------------------------------------------------------------------
Expand Down
Loading

0 comments on commit fbb475b

Please sign in to comment.