git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5344 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -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];
|
||||
|
||||
Reference in New Issue
Block a user