git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13353 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -126,11 +126,9 @@ void ComputeTempRamp::setup()
|
||||
void ComputeTempRamp::dof_compute()
|
||||
{
|
||||
adjust_dof_fix();
|
||||
double natoms = group->count(igroup);
|
||||
dof = domain->dimension * natoms;
|
||||
natoms_temp = group->count(igroup);
|
||||
dof = domain->dimension * natoms_temp;
|
||||
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;
|
||||
}
|
||||
@ -172,6 +170,8 @@ double ComputeTempRamp::compute_scalar()
|
||||
|
||||
MPI_Allreduce(&t,&scalar,1,MPI_DOUBLE,MPI_SUM,world);
|
||||
if (dynamic) dof_compute();
|
||||
if (dof < 0.0 && natoms_temp > 0.0)
|
||||
error->all(FLERR,"Temperature compute degrees of freedom < 0");
|
||||
scalar *= tfactor;
|
||||
return scalar;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user