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

This commit is contained in:
sjplimp
2015-03-30 23:17:06 +00:00
parent 8d078d0602
commit bd37304ade
27 changed files with 135 additions and 39 deletions

View File

@ -20,6 +20,7 @@
#include "force.h"
#include "domain.h"
#include "modify.h"
#include "comm.h"
#include "group.h"
#include "error.h"
@ -114,7 +115,6 @@ void ComputeTempSphere::setup()
{
dynamic = 0;
if (dynamic_user || group->dynamic[igroup]) dynamic = 1;
fix_dof = -1;
dof_compute();
}
@ -124,7 +124,7 @@ void ComputeTempSphere::dof_compute()
{
int count,count_all;
if (fix_dof) adjust_dof_fix();
fix_dof = modify->adjust_dof_fix(igroup);
// 6 or 3 dof for extended/point particles for 3d
// 3 or 2 dof for extended/point particles for 2d
@ -252,6 +252,8 @@ double ComputeTempSphere::compute_scalar()
MPI_Allreduce(&t,&scalar,1,MPI_DOUBLE,MPI_SUM,world);
if (dynamic || tempbias == 2) dof_compute();
if (tfactor == 0.0 && scalar != 0.0)
error->all(FLERR,"Temperature compute degrees of freedom < 0");
scalar *= tfactor;
return scalar;
}