Don't compute count twice

This commit is contained in:
Stan Gerald Moore
2022-06-09 14:53:44 -06:00
parent 96b5a706da
commit 7f1e76b7a5
2 changed files with 0 additions and 4 deletions

View File

@ -215,7 +215,6 @@ void ComputeAveSphereAtom::compute_peratom()
// i atom contribution
count = 1;
totalmass = massone_i;
vnet[0] = v[i][0] - vavg[0];
vnet[1] = v[i][1] - vavg[1];
@ -231,7 +230,6 @@ void ComputeAveSphereAtom::compute_peratom()
delz = ztmp - x[j][2];
rsq = delx * delx + dely * dely + delz * delz;
if (rsq < cutsq) {
count++;
totalmass += massone_j;
vnet[0] = v[j][0] - vavg[0];
vnet[1] = v[j][1] - vavg[1];

View File

@ -177,7 +177,6 @@ void ComputeAveSphereAtomKokkos<DeviceType>::operator()(TagComputeAveSphereAtom,
// i atom contribution
count = 1;
totalmass = massone_i;
double vnet[3];
vnet[0] = v(i,0) - vavg[0];
@ -196,7 +195,6 @@ void ComputeAveSphereAtomKokkos<DeviceType>::operator()(TagComputeAveSphereAtom,
const F_FLOAT delz = x(j,2) - ztmp;
const F_FLOAT rsq = delx*delx + dely*dely + delz*delz;
if (rsq < cutsq) {
count++;
totalmass += massone_j;
vnet[0] = v(j,0) - vavg[0];
vnet[1] = v(j,1) - vavg[1];