From 7940136d5d322e082b2f8b99abfc8ddf6ea07af6 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Thu, 2 Jul 2009 14:32:20 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@2944 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/ASPHERE/compute_temp_asphere.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ASPHERE/compute_temp_asphere.cpp b/src/ASPHERE/compute_temp_asphere.cpp index eee3709e5f..c7e7377aea 100755 --- a/src/ASPHERE/compute_temp_asphere.cpp +++ b/src/ASPHERE/compute_temp_asphere.cpp @@ -127,11 +127,12 @@ void ComputeTempAsphere::dof_compute() { // 6 dof for 3d, 3 dof for 2d // assume full rotation of extended particles - // user can correct this via compute_modify if needed + // user should correct this via compute_modify if needed double natoms = group->count(igroup); - if (domain->dimension == 3) dof = 6*natoms; - else dof = 3*natoms; + int nper = 6; + if (domain->dimension == 2) nper = 3; + dof = nper*natoms; // additional adjustments to dof @@ -145,8 +146,7 @@ void ComputeTempAsphere::dof_compute() if (tbias->dof_remove(i)) count++; int count_all; MPI_Allreduce(&count,&count_all,1,MPI_INT,MPI_SUM,world); - if (domain->dimension == 3) dof -= 6*count_all; - else dof -= 3*count_all; + dof -= nper*count_all; } dof -= extra_dof + fix_dof;