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

This commit is contained in:
sjplimp
2008-03-11 17:15:30 +00:00
parent 07c6376bcf
commit d0e374e4c3
27 changed files with 412 additions and 206 deletions

View File

@ -42,6 +42,8 @@ ComputeTempPartial::ComputeTempPartial(LAMMPS *lmp, int narg, char **arg) :
extscalar = 0;
extvector = 1;
tempflag = 1;
tempbias = 1;
vbias[0] = vbias[1] = vbias[2] = 0.0;
vector = new double[6];
}
@ -140,3 +142,21 @@ void ComputeTempPartial::compute_vector()
MPI_Allreduce(t,vector,6,MPI_DOUBLE,MPI_SUM,world);
for (i = 0; i < 6; i++) vector[i] *= force->mvv2e;
}
/* ---------------------------------------------------------------------- */
void ComputeTempPartial::remove_bias(int i, double *v)
{
if (!xflag) {
vbias[0] = v[0];
v[0] = 0.0;
}
if (!yflag) {
vbias[1] = v[1];
v[1] = 0.0;
}
if (!zflag) {
vbias[2] = v[2];
v[2] = 0.0;
}
}