diff --git a/src/KSPACE/pair_born_coul_msm.cpp b/src/KSPACE/pair_born_coul_msm.cpp index c22e0e2ac6..a33e9d245b 100644 --- a/src/KSPACE/pair_born_coul_msm.cpp +++ b/src/KSPACE/pair_born_coul_msm.cpp @@ -195,7 +195,7 @@ void PairBornCoulMSM::compute(int eflag, int vflag) if (force->kspace->scalar_pressure_flag && vflag) { for (i = 0; i < 3; i++) virial[i] += force->pair->eng_coul/3.0; - for (int i = 0; i < nmax; i++) { + for (i = 0; i < nmax; i++) { f[i][0] += ftmp[i][0]; f[i][1] += ftmp[i][1]; f[i][2] += ftmp[i][2]; diff --git a/src/compute_coord_atom.cpp b/src/compute_coord_atom.cpp index 1c56466b36..aba22e3f60 100644 --- a/src/compute_coord_atom.cpp +++ b/src/compute_coord_atom.cpp @@ -305,7 +305,7 @@ void ComputeCoordAtom::compute_peratom() rsq = delx*delx + dely*dely + delz*delz; if (rsq < cutsq) { double dot_product = 0.0; - for (int m=0; m < 2*(2*l+1); m++) { + for (m=0; m < 2*(2*l+1); m++) { dot_product += normv[i][nqlist+m]*normv[j][nqlist+m]; } if (dot_product > threshold) n++; diff --git a/src/compute_gyration_chunk.cpp b/src/compute_gyration_chunk.cpp index c2db9fa855..bedc815c34 100644 --- a/src/compute_gyration_chunk.cpp +++ b/src/compute_gyration_chunk.cpp @@ -139,7 +139,7 @@ void ComputeGyrationChunk::compute_vector() MPI_Allreduce(rg,rgall,nchunk,MPI_DOUBLE,MPI_SUM,world); - for (int i = 0; i < nchunk; i++) + for (i = 0; i < nchunk; i++) if (masstotal[i] > 0.0) rgall[i] = sqrt(rgall[i]/masstotal[i]); } diff --git a/src/compute_inertia_chunk.cpp b/src/compute_inertia_chunk.cpp index 9e0084acfb..095a573e54 100644 --- a/src/compute_inertia_chunk.cpp +++ b/src/compute_inertia_chunk.cpp @@ -101,7 +101,7 @@ void ComputeInertiaChunk::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; for (j = 0; j < 6; j++) inertia[i][j] = 0.0; @@ -117,7 +117,7 @@ void ComputeInertiaChunk::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; @@ -133,7 +133,7 @@ void ComputeInertiaChunk::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]; diff --git a/src/compute_omega_chunk.cpp b/src/compute_omega_chunk.cpp index da3b482341..9b81d1f19e 100644 --- a/src/compute_omega_chunk.cpp +++ b/src/compute_omega_chunk.cpp @@ -108,7 +108,7 @@ void ComputeOmegaChunk::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; for (j = 0; j < 6; j++) inertia[i][j] = 0.0; @@ -126,7 +126,7 @@ void ComputeOmegaChunk::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; @@ -142,7 +142,7 @@ void ComputeOmegaChunk::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]; diff --git a/src/compute_orientorder_atom.cpp b/src/compute_orientorder_atom.cpp index 8a836a97b8..98b8b7cb80 100644 --- a/src/compute_orientorder_atom.cpp +++ b/src/compute_orientorder_atom.cpp @@ -308,7 +308,7 @@ void ComputeOrientOrderAtom::compute_peratom() // if not nnn neighbors, order parameter = 0; if ((ncount == 0) || (ncount < nnn)) { - for (int jj = 0; jj < ncol; jj++) + for (jj = 0; jj < ncol; jj++) qn[jj] = 0.0; continue; } diff --git a/src/compute_temp_chunk.cpp b/src/compute_temp_chunk.cpp index 31f955fcb5..4ae0cc37c8 100644 --- a/src/compute_temp_chunk.cpp +++ b/src/compute_temp_chunk.cpp @@ -438,7 +438,7 @@ void ComputeTempChunk::vcm_compute() int *ichunk = cchunk->ichunk; - for (int i = 0; i < nchunk; i++) { + for (i = 0; i < nchunk; i++) { vcm[i][0] = vcm[i][1] = vcm[i][2] = 0.0; massproc[i] = 0.0; } @@ -487,7 +487,7 @@ void ComputeTempChunk::temperature(int icol) // zero local per-chunk values - for (int i = 0; i < nchunk; i++) { + for (i = 0; i < nchunk; i++) { count[i] = 0; sum[i] = 0.0; } @@ -560,7 +560,7 @@ void ComputeTempChunk::temperature(int icol) double mvv2e = force->mvv2e; double boltz = force->boltz; - for (int i = 0; i < nchunk; i++) { + for (i = 0; i < nchunk; i++) { dof = cdof + adof*countall[i]; if (dof > 0.0) tfactor = mvv2e / (dof * boltz); else tfactor = 0.0; diff --git a/src/compute_temp_profile.cpp b/src/compute_temp_profile.cpp index 6938560359..11fe72440f 100644 --- a/src/compute_temp_profile.cpp +++ b/src/compute_temp_profile.cpp @@ -313,7 +313,7 @@ void ComputeTempProfile::compute_array() for (i = 0; i < nbins; i++) tbin[i] = 0.0; - for (int i = 0; i < nlocal; i++) + for (i = 0; i < nlocal; i++) if (mask[i] & groupbit) { ibin = bin[i]; if (xflag) vthermal[0] = v[i][0] - binave[ibin][ivx]; diff --git a/src/compute_torque_chunk.cpp b/src/compute_torque_chunk.cpp index 9aea024114..158bf178e8 100644 --- a/src/compute_torque_chunk.cpp +++ b/src/compute_torque_chunk.cpp @@ -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]; diff --git a/src/irregular.cpp b/src/irregular.cpp index c1c4ff44fb..072209af09 100644 --- a/src/irregular.cpp +++ b/src/irregular.cpp @@ -891,7 +891,6 @@ int Irregular::create_data_grouped(int n, int *procs, int sortflag) utils::merge_sort(order,nrecv_proc,(void *)proc_recv,compare_standalone); #endif - int j; for (i = 0; i < nrecv_proc; i++) { j = order[i]; proc_recv_ordered[i] = proc_recv[j];