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

This commit is contained in:
sjplimp
2015-03-31 22:02:12 +00:00
parent 8428bd3d9d
commit 536ae8000d
13 changed files with 54 additions and 49 deletions

View File

@ -214,6 +214,8 @@ void ComputeTempCS::dof_compute()
dof = nper * natoms;
dof -= nper * nshells;
dof -= extra_dof + fix_dof;
if (dof < 0.0 && natoms > 0.0)
error->all(FLERR,"Temperature compute degrees of freedom < 0");
if (dof > 0) tfactor = force->mvv2e / (dof * force->boltz);
else tfactor = 0.0;
}
@ -256,8 +258,6 @@ double ComputeTempCS::compute_scalar()
MPI_Allreduce(&t,&scalar,1,MPI_DOUBLE,MPI_SUM,world);
if (dynamic) dof_compute();
if (tfactor == 0.0 && atom->natoms != 0)
error->all(FLERR,"Temperature compute degrees of freedom < 0");
scalar *= tfactor;
return scalar;
}