silence more compiler warnings

This commit is contained in:
Axel Kohlmeyer
2021-04-23 16:57:39 -04:00
parent 99fa6ed4b4
commit 917cd1b924
10 changed files with 17 additions and 18 deletions

View File

@ -100,7 +100,7 @@ void ComputeTorqueChunk::compute_array()
// zero local per-chunk values
for (int i = 0; i < nchunk; i++) {
for (i = 0; i < nchunk; i++) {
massproc[i] = 0.0;
com[i][0] = com[i][1] = com[i][2] = 0.0;
torque[i][0] = torque[i][1] = torque[i][2] = 0.0;
@ -116,7 +116,7 @@ void ComputeTorqueChunk::compute_array()
double *rmass = atom->rmass;
int nlocal = atom->nlocal;
for (int i = 0; i < nlocal; i++)
for (i = 0; i < nlocal; i++)
if (mask[i] & groupbit) {
index = ichunk[i]-1;
if (index < 0) continue;
@ -132,7 +132,7 @@ void ComputeTorqueChunk::compute_array()
MPI_Allreduce(massproc,masstotal,nchunk,MPI_DOUBLE,MPI_SUM,world);
MPI_Allreduce(&com[0][0],&comall[0][0],3*nchunk,MPI_DOUBLE,MPI_SUM,world);
for (int i = 0; i < nchunk; i++) {
for (i = 0; i < nchunk; i++) {
if (masstotal[i] > 0.0) {
comall[i][0] /= masstotal[i];
comall[i][1] /= masstotal[i];