Commit fab023a2 authored by sjplimp's avatar sjplimp
Browse files

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@1616 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent 416eb91e
Loading
Loading
Loading
Loading
+13 −7
Original line number Diff line number Diff line
@@ -78,7 +78,8 @@ void ComputeTempAsphere::init()
void ComputeTempAsphere::recount()
{
  double natoms = group->count(igroup);
  dof = domain->dimension * natoms;
  int dimension = domain->dimension;
  dof = dimension * natoms;
  dof -= extra_dof + fix_dof;

  // add rotational degrees of freedom
@@ -94,6 +95,10 @@ void ComputeTempAsphere::recount()
  for (int i = 0; i < nlocal; i++)
    if (mask[i] & groupbit) {
      itype = type[i];
      if (dimension == 2) {
	if (shape[itype][0] == shape[itype][1]) continue;
	else rot_dof += 1;
      } else {
	if (shape[itype][0] == shape[itype][1] && 
	    shape[itype][1] == shape[itype][2]) continue;
	else if (shape[itype][0] == shape[itype][1] || 
@@ -101,6 +106,7 @@ void ComputeTempAsphere::recount()
		 shape[itype][0] == shape[itype][2]) rot_dof += 2;
	else rot_dof += 3;
      }
    }

  int rot_total;
  MPI_Allreduce(&rot_dof,&rot_total,1,MPI_INT,MPI_SUM,world);