git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@1882 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2008-06-06 17:31:26 +00:00
parent 7a2e31d715
commit e7f99cb86a
3 changed files with 12 additions and 12 deletions

View File

@ -328,7 +328,7 @@ void FixNPTAsphere::omega_from_mq(double *q, double *m, double *inertia,
void FixNPTAsphere::calculate_inertia(double mass, double *shape,
double *inertia)
{
inertia[0] = mass*(shape[1]*shape[1]+shape[2]*shape[2])/5.0;
inertia[1] = mass*(shape[0]*shape[0]+shape[2]*shape[2])/5.0;
inertia[2] = mass*(shape[0]*shape[0]+shape[1]*shape[1])/5.0;
inertia[0] = 0.2*mass*(shape[1]*shape[1]+shape[2]*shape[2]);
inertia[1] = 0.2*mass*(shape[0]*shape[0]+shape[2]*shape[2]);
inertia[2] = 0.2*mass*(shape[0]*shape[0]+shape[1]*shape[1]);
}

View File

@ -218,11 +218,11 @@ void FixNVEAsphere::calculate_inertia()
double **shape = atom->shape;
for (int i = 1; i <= atom->ntypes; i++) {
inertia[i][0] = mass[i] *
(shape[i][1]*shape[i][1]+shape[i][2]*shape[i][2]) / 5.0;
inertia[i][1] = mass[i] *
(shape[i][0]*shape[i][0]+shape[i][2]*shape[i][2]) / 5.0;
inertia[i][2] = mass[i] *
(shape[i][0]*shape[i][0]+shape[i][1]*shape[i][1]) / 5.0;
inertia[i][0] = 0.2*mass[i] *
(shape[i][1]*shape[i][1]+shape[i][2]*shape[i][2]);
inertia[i][1] = 0.2*mass[i] *
(shape[i][0]*shape[i][0]+shape[i][2]*shape[i][2]);
inertia[i][2] = 0.2*mass[i] *
(shape[i][0]*shape[i][0]+shape[i][1]*shape[i][1]);
}
}

View File

@ -276,7 +276,7 @@ void FixNVTAsphere::omega_from_mq(double *q, double *m, double *inertia,
void FixNVTAsphere::calculate_inertia(double mass, double *shape,
double *inertia)
{
inertia[0] = mass*(shape[1]*shape[1]+shape[2]*shape[2])/5.0;
inertia[1] = mass*(shape[0]*shape[0]+shape[2]*shape[2])/5.0;
inertia[2] = mass*(shape[0]*shape[0]+shape[1]*shape[1])/5.0;
inertia[0] = 0.2*mass*(shape[1]*shape[1]+shape[2]*shape[2]);
inertia[1] = 0.2*mass*(shape[0]*shape[0]+shape[2]*shape[2]);
inertia[2] = 0.2*mass*(shape[0]*shape[0]+shape[1]*shape[1]);
}