Merge branch 'fix_ave_chunk_cdof_bug' into collected-small-changes

This commit is contained in:
Axel Kohlmeyer
2021-04-02 17:50:33 -04:00
2 changed files with 4 additions and 2 deletions

View File

@ -307,7 +307,9 @@ atoms in the chunk. The averaged output value for the chunk on the
average over atoms across the entire *Nfreq* timescale. For the average over atoms across the entire *Nfreq* timescale. For the
*density/number* and *density/mass* values, the volume (bin volume or *density/number* and *density/mass* values, the volume (bin volume or
system volume) used in the final normalization will be the volume at system volume) used in the final normalization will be the volume at
the final *Nfreq* timestep. the final *Nfreq* timestep. For the *temp* values, degrees of freedom and
kinetic energy are summed separately across the entire *Nfreq* timescale, and
the output value is calculated by dividing those two sums.
If the *norm* setting is *sample*\ , the chunk value is summed over If the *norm* setting is *sample*\ , the chunk value is summed over
atoms for each sample, as is the count, and an "average sample value" atoms for each sample, as is the count, and an "average sample value"

View File

@ -869,7 +869,7 @@ void FixAveChunk::end_of_step()
if (count_sum[m] > 0.0) if (count_sum[m] > 0.0)
for (j = 0; j < nvalues; j++) { for (j = 0; j < nvalues; j++) {
if (which[j] == ArgInfo::TEMPERATURE) { if (which[j] == ArgInfo::TEMPERATURE) {
values_sum[m][j] *= mvv2e / ((cdof + adof*count_sum[m]) * boltz); values_sum[m][j] *= mvv2e/((repeat*cdof + adof*count_sum[m])*boltz);
} else if (which[j] == ArgInfo::DENSITY_NUMBER) { } else if (which[j] == ArgInfo::DENSITY_NUMBER) {
if (volflag == SCALAR) values_sum[m][j] /= chunk_volume_scalar; if (volflag == SCALAR) values_sum[m][j] /= chunk_volume_scalar;
else values_sum[m][j] /= chunk_volume_vec[m]; else values_sum[m][j] /= chunk_volume_vec[m];