From 4379417aba062307e02e16c20527e81ec4d00816 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Wed, 1 Dec 2010 00:03:15 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5344 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/atom.cpp | 9 +-- src/atom.h | 3 - src/compute_erotate_sphere.cpp | 14 +--- src/compute_property_atom.cpp | 131 --------------------------------- src/compute_property_atom.h | 6 -- 5 files changed, 2 insertions(+), 161 deletions(-) diff --git a/src/atom.cpp b/src/atom.cpp index f9145e2ebc..16f21748f0 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -76,8 +76,6 @@ Atom::Atom(LAMMPS *lmp) : Pointers(lmp) spin = NULL; eradius = ervel = erforce = NULL; - length = theta = NULL; - maxspecial = 1; nspecial = NULL; special = NULL; @@ -104,7 +102,6 @@ Atom::Atom(LAMMPS *lmp) : Pointers(lmp) quat_flag = omega_flag = angmom_flag = torque_flag = 0; radius_flag = density_flag = rmass_flag = vfrac_flag = 0; spin_flag = eradius_flag = ervel_flag = erforce_flag = 0; - line_flag = 0; // ntype-length arrays @@ -188,9 +185,6 @@ Atom::~Atom() memory->sfree(ervel); memory->sfree(erforce); - memory->sfree(length); - memory->sfree(theta); - memory->sfree(molecule); memory->destroy_2d_int_array(nspecial); @@ -268,8 +262,7 @@ void Atom::create_avec(const char *style, int narg, char **arg) quat_flag = omega_flag = angmom_flag = torque_flag = 0; radius_flag = density_flag = rmass_flag = vfrac_flag = 0; spin_flag = eradius_flag = ervel_flag = erforce_flag = 0; - line_flag = 0; - + avec = new_avec(style,narg,arg); int n = strlen(style) + 1; atom_style = new char[n]; diff --git a/src/atom.h b/src/atom.h index 41706d21a2..b12b337062 100644 --- a/src/atom.h +++ b/src/atom.h @@ -55,8 +55,6 @@ class Atom : protected Pointers { int *spin; double *eradius,*ervel,*erforce; - double *length,*theta; - int **nspecial; // 0,1,2 = cummulative # of 1-2,1-3,1-4 neighs int **special; // IDs of 1-2,1-3,1-4 neighs of each atom int maxspecial; // special[nlocal][maxspecial] @@ -86,7 +84,6 @@ class Atom : protected Pointers { int quat_flag,omega_flag,angmom_flag,torque_flag; int radius_flag,density_flag,rmass_flag,vfrac_flag; int spin_flag,eradius_flag,ervel_flag,erforce_flag; - int line_flag; // extra peratom info in restart file destined for fix & diag diff --git a/src/compute_erotate_sphere.cpp b/src/compute_erotate_sphere.cpp index 27e121bcdc..1558196cce 100644 --- a/src/compute_erotate_sphere.cpp +++ b/src/compute_erotate_sphere.cpp @@ -23,8 +23,7 @@ using namespace LAMMPS_NS; -//#define INERTIA 0.4 // moment of inertia for sphere -#define INERTIA (1.0/12.0) // moment of inertia for sphere +#define INERTIA 0.4 // moment of inertia for sphere /* ---------------------------------------------------------------------- */ @@ -38,13 +37,11 @@ ComputeERotateSphere::ComputeERotateSphere(LAMMPS *lmp, int narg, char **arg) : // error checks - /* if (!atom->omega_flag) error->all("Compute erotate/sphere requires atom attribute omega"); if (!atom->radius_flag && !atom->avec->shape_type) error->all("Compute erotate/sphere requires atom attribute " "radius or shape"); - */ } /* ---------------------------------------------------------------------- */ @@ -56,7 +53,6 @@ void ComputeERotateSphere::init() // if shape used, check that all particles are spherical // point particles are allowed - /* if (atom->radius == NULL) { double **shape = atom->shape; int *type = atom->type; @@ -72,7 +68,6 @@ void ComputeERotateSphere::init() "spherical particle shapes"); } } - */ pfactor = 0.5 * force->mvv2e * INERTIA; } @@ -117,13 +112,6 @@ double ComputeERotateSphere::compute_scalar() } else { if (rmass) { - for (i = 0; i < nlocal; i++) - if (mask[i] & groupbit) { - erotate += (omega[i][0]*omega[i][0] + omega[i][1]*omega[i][1] + - omega[i][2]*omega[i][2]) * - atom->length[i]*atom->length[i]*rmass[i]; - } - } else if (rmass) { for (i = 0; i < nlocal; i++) if (mask[i] & groupbit) { itype = type[i]; diff --git a/src/compute_property_atom.cpp b/src/compute_property_atom.cpp index 926e5d2e6f..4447d9f06f 100644 --- a/src/compute_property_atom.cpp +++ b/src/compute_property_atom.cpp @@ -11,7 +11,6 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "math.h" #include "string.h" #include "compute_property_atom.h" #include "atom.h" @@ -219,37 +218,6 @@ ComputePropertyAtom::ComputePropertyAtom(LAMMPS *lmp, int narg, char **arg) : "atom property that isn't allocated"); pack_choice[i] = &ComputePropertyAtom::pack_erforce; - } else if (strcmp(arg[iarg],"end1x") == 0) { - if (!atom->line_flag) - error->all("Compute property/atom for " - "atom property that isn't allocated"); - pack_choice[i] = &ComputePropertyAtom::pack_end1x; - } else if (strcmp(arg[iarg],"end1y") == 0) { - if (!atom->line_flag) - error->all("Compute property/atom for " - "atom property that isn't allocated"); - pack_choice[i] = &ComputePropertyAtom::pack_end1y; - } else if (strcmp(arg[iarg],"end1z") == 0) { - if (!atom->line_flag) - error->all("Compute property/atom for " - "atom property that isn't allocated"); - pack_choice[i] = &ComputePropertyAtom::pack_end1z; - } else if (strcmp(arg[iarg],"end2x") == 0) { - if (!atom->line_flag) - error->all("Compute property/atom for " - "atom property that isn't allocated"); - pack_choice[i] = &ComputePropertyAtom::pack_end2x; - } else if (strcmp(arg[iarg],"end2y") == 0) { - if (!atom->line_flag) - error->all("Compute property/atom for " - "atom property that isn't allocated"); - pack_choice[i] = &ComputePropertyAtom::pack_end2y; - } else if (strcmp(arg[iarg],"end2z") == 0) { - if (!atom->line_flag) - error->all("Compute property/atom for " - "atom property that isn't allocated"); - pack_choice[i] = &ComputePropertyAtom::pack_end2z; - } else error->all("Invalid keyword in compute property/atom command"); } @@ -1132,102 +1100,3 @@ void ComputePropertyAtom::pack_erforce(int n) n += nvalues; } } - -/* ---------------------------------------------------------------------- */ - -void ComputePropertyAtom::pack_end1x(int n) -{ - double **x = atom->x; - double *length = atom->length; - double *theta = atom->theta; - int *mask = atom->mask; - int nlocal = atom->nlocal; - - for (int i = 0; i < nlocal; i++) { - if (mask[i] & groupbit) buf[n] = x[i][0] - 0.5*length[i]*cos(theta[i]); - else buf[n] = 0.0; - n += nvalues; - } -} - -/* ---------------------------------------------------------------------- */ - -void ComputePropertyAtom::pack_end1y(int n) -{ - double **x = atom->x; - double *length = atom->length; - double *theta = atom->theta; - int *mask = atom->mask; - int nlocal = atom->nlocal; - - for (int i = 0; i < nlocal; i++) { - if (mask[i] & groupbit) buf[n] = x[i][1] - 0.5*length[i]*sin(theta[i]); - else buf[n] = 0.0; - n += nvalues; - } -} - -/* ---------------------------------------------------------------------- */ - -void ComputePropertyAtom::pack_end1z(int n) -{ - double **x = atom->x; - int *mask = atom->mask; - int nlocal = atom->nlocal; - - for (int i = 0; i < nlocal; i++) { - if (mask[i] & groupbit) buf[n] = x[i][2]; - else buf[n] = 0.0; - n += nvalues; - } -} - -/* ---------------------------------------------------------------------- */ - -void ComputePropertyAtom::pack_end2x(int n) -{ - double **x = atom->x; - double *length = atom->length; - double *theta = atom->theta; - int *mask = atom->mask; - int nlocal = atom->nlocal; - - for (int i = 0; i < nlocal; i++) { - if (mask[i] & groupbit) buf[n] = x[i][0] + 0.5*length[i]*cos(theta[i]); - else buf[n] = 0.0; - n += nvalues; - } -} - -/* ---------------------------------------------------------------------- */ - -void ComputePropertyAtom::pack_end2y(int n) -{ - double **x = atom->x; - double *length = atom->length; - double *theta = atom->theta; - int *mask = atom->mask; - int nlocal = atom->nlocal; - - for (int i = 0; i < nlocal; i++) { - if (mask[i] & groupbit) buf[n] = x[i][1] + 0.5*length[i]*sin(theta[i]); - else buf[n] = 0.0; - n += nvalues; - } -} - -/* ---------------------------------------------------------------------- */ - -void ComputePropertyAtom::pack_end2z(int n) -{ - double **x = atom->x; - int *mask = atom->mask; - int nlocal = atom->nlocal; - - for (int i = 0; i < nlocal; i++) { - if (mask[i] & groupbit) buf[n] = x[i][2]; - else buf[n] = 0.0; - n += nvalues; - } -} - diff --git a/src/compute_property_atom.h b/src/compute_property_atom.h index 196a22b735..1d8cd07f23 100644 --- a/src/compute_property_atom.h +++ b/src/compute_property_atom.h @@ -94,12 +94,6 @@ class ComputePropertyAtom : public Compute { void pack_eradius(int); void pack_ervel(int); void pack_erforce(int); - void pack_end1x(int); - void pack_end1y(int); - void pack_end1z(int); - void pack_end2x(int); - void pack_end2y(int); - void pack_end2z(int); }; }