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

This commit is contained in:
sjplimp 2007-04-13 15:24:36 +00:00
parent 96bdc01670
commit b9f2d23fa7
1 changed files with 3 additions and 3 deletions

View File

@ -49,7 +49,7 @@ void ComputeRotateGran::init()
double ComputeRotateGran::compute_scalar()
{
double **phiv = atom->phiv;
double **omega = atom->omega;
double *radius = atom->radius;
double *rmass = atom->rmass;
int *mask = atom->mask;
@ -59,8 +59,8 @@ double ComputeRotateGran::compute_scalar()
for (int i = 0; i < nlocal; i++)
if (mask[i] & groupbit)
erot += (phiv[i][0]*phiv[i][0] + phiv[i][1]*phiv[i][1] +
phiv[i][2]*phiv[i][2]) * radius[i]*radius[i]*rmass[i];
erot += (omega[i][0]*omega[i][0] + omega[i][1]*omega[i][1] +
omega[i][2]*omega[i][2]) * radius[i]*radius[i]*rmass[i];
MPI_Allreduce(&erot,&scalar,1,MPI_DOUBLE,MPI_SUM,world);
scalar *= pfactor;