forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@1882 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
7a2e31d715
commit
e7f99cb86a
|
@ -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]);
|
||||
}
|
||||
|
|
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue