fix uninitialized variable bug spotted by coverity scan

This commit is contained in:
Axel Kohlmeyer
2017-06-20 17:25:01 -04:00
parent 812f1a8fab
commit e13c94ed4f

View File

@ -246,7 +246,7 @@ void ComputeHeatFluxTally::compute_vector()
double ke_i;
if (rmass) ke_i = pfactor * rmass[i];
else ke_i *= pfactor * mass[type[i]];
else ke_i = pfactor * mass[type[i]];
ke_i *= (vi[0]*vi[0] + vi[1]*vi[1] + vi[2]*vi[2]);
ke_i += eatom[i];