diff --git a/src/COLLOID/pair_brownian.cpp b/src/COLLOID/pair_brownian.cpp index 4d17fddc5d..4d78145207 100644 --- a/src/COLLOID/pair_brownian.cpp +++ b/src/COLLOID/pair_brownian.cpp @@ -92,7 +92,6 @@ void PairBrownian::compute(int eflag, int vflag) double prethermostat; double xl[3], a_sq, a_sh, a_pu, Fbmag; double p1[3], p2[3], p3[3]; - int overlaps = 0; // This section of code adjusts R0/RT0/RS0 if necessary due to changes // in the volume fraction as a result of fix deform or moving walls @@ -187,10 +186,6 @@ void PairBrownian::compute(int eflag, int vflag) h_sep = r - 2.0 * radi; - // check for overlaps - - if (h_sep < 0.0) overlaps++; - // if less than minimum gap, use minimum gap instead if (r < cut_inner[itype][jtype]) h_sep = cut_inner[itype][jtype] - 2.0 * radi; @@ -336,9 +331,6 @@ void PairBrownian::compute(int eflag, int vflag) } } - int print_overlaps = 0; - if (print_overlaps && overlaps) printf("Number of overlaps=%d\n", overlaps); - if (vflag_fdotr) virial_fdotr_compute(); } diff --git a/src/COLLOID/pair_brownian_poly.cpp b/src/COLLOID/pair_brownian_poly.cpp index c356669f3f..2654410c03 100644 --- a/src/COLLOID/pair_brownian_poly.cpp +++ b/src/COLLOID/pair_brownian_poly.cpp @@ -72,7 +72,6 @@ void PairBrownianPoly::compute(int eflag, int vflag) int nlocal = atom->nlocal; double vxmu2f = force->vxmu2f; - int overlaps = 0; double randr; double prethermostat; double xl[3],a_sq,a_sh,a_pu,Fbmag; @@ -176,10 +175,6 @@ void PairBrownianPoly::compute(int eflag, int vflag) h_sep = r - radi-radj; - // check for overlaps - - if (h_sep < 0.0) overlaps++; - // if less than minimum gap, use minimum gap instead if (r < cut_inner[itype][jtype]) diff --git a/src/DIFFRACTION/fix_saed_vtk.cpp b/src/DIFFRACTION/fix_saed_vtk.cpp index 6bbfe5ae0d..b3f6693e9e 100644 --- a/src/DIFFRACTION/fix_saed_vtk.cpp +++ b/src/DIFFRACTION/fix_saed_vtk.cpp @@ -407,7 +407,6 @@ void FixSAEDVTK::invoke_vector(bigint ntimestep) // Finding the intersection of the reciprical space and Ewald sphere int NROW1 = 0; - int NROW2 = 0; double dinv2 = 0.0; double r = 0.0; double K[3]; @@ -425,11 +424,9 @@ void FixSAEDVTK::invoke_vector(bigint ntimestep) fprintf(fp,"%g\n",vector_total[NROW1]/norm); fflush(fp); NROW1++; - NROW2++; } else { fprintf(fp,"%d\n",-1); fflush(fp); - NROW2++; } } } @@ -449,17 +446,14 @@ void FixSAEDVTK::invoke_vector(bigint ntimestep) if ( (r > (R_Ewald - dR_Ewald) ) && (r < (R_Ewald + dR_Ewald) )) { fprintf(fp,"%g\n",vector_total[NROW1]/norm); fflush(fp); - NROW2++; NROW1++; } else { fprintf(fp,"%d\n",-1); fflush(fp); - NROW2++; } } else { fprintf(fp,"%d\n",-1); fflush(fp); - NROW2++; } } } diff --git a/src/DPD-REACT/fix_rx.cpp b/src/DPD-REACT/fix_rx.cpp index 9939a19bb3..96eb9d4572 100644 --- a/src/DPD-REACT/fix_rx.cpp +++ b/src/DPD-REACT/fix_rx.cpp @@ -390,7 +390,6 @@ void FixRX::initSparse() int mxprod = 0; int mxreac = 0; int mxspec = 0; - int nIntegral = 0; for (int i = 0; i < nreactions; ++i) { int nreac_i = 0, nprod_i = 0; std::string pstr, rstr; @@ -430,7 +429,6 @@ void FixRX::initSparse() mxreac = std::max( mxreac, nreac_i ); mxprod = std::max( mxprod, nprod_i ); mxspec = std::max( mxspec, nreac_i + nprod_i ); - if (allAreIntegral) nIntegral++; } if (comm->me == 0 && Verbosity > 1) { diff --git a/src/EFF/compute_temp_region_eff.cpp b/src/EFF/compute_temp_region_eff.cpp index e41adeb5c2..ff20d48124 100644 --- a/src/EFF/compute_temp_region_eff.cpp +++ b/src/EFF/compute_temp_region_eff.cpp @@ -141,12 +141,6 @@ double ComputeTempRegionEff::compute_scalar() if (dof < 0.0 && tarray_all[0] > 0.0) error->all(FLERR, "Temperature compute degrees of freedom < 0"); - int one = 0; - for (int i = 0; i < nlocal; i++) - if (mask[i] & groupbit && region->match(x[i][0], x[i][1], x[i][2])) { - if (abs(spin[i]) == 1) one++; - } - if (dof > 0.0) scalar = force->mvv2e * tarray_all[1] / (dof * force->boltz); else diff --git a/src/ELECTRODE/fix_electrode_conp.cpp b/src/ELECTRODE/fix_electrode_conp.cpp index a52fb2ee26..2c39a57532 100644 --- a/src/ELECTRODE/fix_electrode_conp.cpp +++ b/src/ELECTRODE/fix_electrode_conp.cpp @@ -1417,14 +1417,13 @@ void FixElectrodeConp::gather_list_iele() } taglist_local.clear(); iele_to_group_local.clear(); - for (int i = 0, iele = 0; i < nlocal; i++) { + for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { tagint const t = tag[i]; if (matrix_algo) list_iele.push_back(tag_to_iele[t]); taglist_local.push_back(t); for (int g = 0; g < num_of_groups; g++) if (mask[i] & group_bits[g]) iele_to_group_local.push_back(g); - iele++; } } nlocalele = static_cast(taglist_local.size()); // just for safety diff --git a/src/KSPACE/ewald_disp.cpp b/src/KSPACE/ewald_disp.cpp index 7943ffd194..43b5c8840b 100644 --- a/src/KSPACE/ewald_disp.cpp +++ b/src/KSPACE/ewald_disp.cpp @@ -1209,7 +1209,7 @@ void EwaldDisp::compute_virial_dipole() double *ke, c[EWALD_NFUNCS] = { 8.0*MY_PI*qscale/volume, 2.0*MY_PI*MY_PIS/(12.0*volume), 2.0*MY_PI*MY_PIS/(192.0*volume), 8.0*MY_PI*mumurd2e/volume}; - int i, kx, ky, lbytes = (2*nbox+1)*sizeof(cvector), *type = atom->type; + int i, kx, ky, lbytes = (2*nbox+1)*sizeof(cvector); int func[EWALD_NFUNCS]; memcpy(func, function, EWALD_NFUNCS*sizeof(int)); @@ -1273,7 +1273,6 @@ void EwaldDisp::compute_virial_dipole() vatomj[n] -= mysum[n]; z = (cvector *) ((char *) z+lbytes); - ++type; if (vflag_atom) vatomj += 6; } diff --git a/src/OPENMP/pair_brownian_omp.cpp b/src/OPENMP/pair_brownian_omp.cpp index de095bb063..45288f13dd 100644 --- a/src/OPENMP/pair_brownian_omp.cpp +++ b/src/OPENMP/pair_brownian_omp.cpp @@ -197,7 +197,6 @@ void PairBrownianOMP::eval(int iifrom, int iito, ThrData * const thr) double prethermostat; double xl[3],a_sq,a_sh,a_pu,Fbmag; double p1[3],p2[3],p3[3]; - int overlaps = 0; // scale factor for Brownian moments @@ -252,10 +251,6 @@ void PairBrownianOMP::eval(int iifrom, int iito, ThrData * const thr) h_sep = r - 2.0*radi; - // check for overlaps - - if (h_sep < 0.0) overlaps++; - // if less than minimum gap, use minimum gap instead if (r < cut_inner[itype][jtype]) diff --git a/src/OPENMP/pair_brownian_poly_omp.cpp b/src/OPENMP/pair_brownian_poly_omp.cpp index 2d28c47a1d..91a496979d 100644 --- a/src/OPENMP/pair_brownian_poly_omp.cpp +++ b/src/OPENMP/pair_brownian_poly_omp.cpp @@ -187,7 +187,6 @@ void PairBrownianPolyOMP::eval(int iifrom, int iito, ThrData * const thr) RanMars &rng = *random_thr[thr->get_tid()]; double vxmu2f = force->vxmu2f; - int overlaps = 0; double randr; double prethermostat; double xl[3],a_sq,a_sh,a_pu,Fbmag; @@ -248,10 +247,6 @@ void PairBrownianPolyOMP::eval(int iifrom, int iito, ThrData * const thr) h_sep = r - radi-radj; - // check for overlaps - - if (h_sep < 0.0) overlaps++; - // if less than minimum gap, use minimum gap instead if (r < cut_inner[itype][jtype]) diff --git a/src/OPENMP/pair_lubricate_omp.cpp b/src/OPENMP/pair_lubricate_omp.cpp index 260fcdfdc7..2145744a5b 100644 --- a/src/OPENMP/pair_lubricate_omp.cpp +++ b/src/OPENMP/pair_lubricate_omp.cpp @@ -162,8 +162,6 @@ void PairLubricateOMP::eval(int iifrom, int iito, ThrData * const thr) const int * const type = atom->type; const int nlocal = atom->nlocal; - int overlaps = 0; - ilist = list->ilist; numneigh = list->numneigh; firstneigh = list->firstneigh; @@ -317,10 +315,6 @@ void PairLubricateOMP::eval(int iifrom, int iito, ThrData * const thr) h_sep = r - 2.0*radi; - // check for overlaps - - if (h_sep < 0.0) overlaps++; - // if less than the minimum gap use the minimum gap instead if (r < cut_inner[itype][jtype]) diff --git a/src/OPENMP/pair_lubricate_poly_omp.cpp b/src/OPENMP/pair_lubricate_poly_omp.cpp index b4c2380532..5b98ec7b14 100644 --- a/src/OPENMP/pair_lubricate_poly_omp.cpp +++ b/src/OPENMP/pair_lubricate_poly_omp.cpp @@ -163,8 +163,6 @@ void PairLubricatePolyOMP::eval(int iifrom, int iito, ThrData * const thr) const int * const type = atom->type; const int nlocal = atom->nlocal; - int overlaps = 0; - ilist = list->ilist; numneigh = list->numneigh; firstneigh = list->firstneigh; @@ -322,10 +320,6 @@ void PairLubricatePolyOMP::eval(int iifrom, int iito, ThrData * const thr) h_sep = r - radi-radj; - // check for overlaps - - if (h_sep < 0.0) overlaps++; - // if less than the minimum gap use the minimum gap instead if (r < cut_inner[itype][jtype]) diff --git a/src/OPENMP/reaxff_hydrogen_bonds_omp.cpp b/src/OPENMP/reaxff_hydrogen_bonds_omp.cpp index e8db77389f..6e1db5ffe7 100644 --- a/src/OPENMP/reaxff_hydrogen_bonds_omp.cpp +++ b/src/OPENMP/reaxff_hydrogen_bonds_omp.cpp @@ -56,7 +56,6 @@ namespace ReaxFF { int start_j, end_j, hb_start_j, hb_end_j; int hblist[MAX_BONDS]; int itr, top; - int num_hb_intrs = 0; double r_jk, theta, cos_theta, sin_xhz4, cos_xhz1, sin_theta2; double e_hb, e_hb_thr = 0.0, exp_hb2, exp_hb3, CEhb1, CEhb2, CEhb3; rvec dcos_theta_di, dcos_theta_dj, dcos_theta_dk; @@ -140,7 +139,6 @@ namespace ReaxFF { type_i = system->my_atoms[i].type; if (type_i < 0) continue; hbp = &(system->reax_param.hbp[type_i][type_j][type_k]); - ++num_hb_intrs; Calculate_Theta(pbond_ij->dvec, pbond_ij->d, dvec_jk, r_jk, &theta, &cos_theta); diff --git a/src/REAXFF/pair_reaxff.cpp b/src/REAXFF/pair_reaxff.cpp index 63c5e0d730..ef859a0cda 100644 --- a/src/REAXFF/pair_reaxff.cpp +++ b/src/REAXFF/pair_reaxff.cpp @@ -587,8 +587,8 @@ void PairReaxFF::set_far_nbr(far_neighbor_data *fdest, int PairReaxFF::estimate_reax_lists() { int itr_i, itr_j, i, j; - int num_nbrs, num_marked; - int *ilist, *jlist, *numneigh, **firstneigh, *marked; + int num_nbrs; + int *ilist, *jlist, *numneigh, **firstneigh; double d_sqr; rvec dvec; double **x; @@ -602,15 +602,11 @@ int PairReaxFF::estimate_reax_lists() firstneigh = list->firstneigh; num_nbrs = 0; - num_marked = 0; - marked = (int*) calloc(api->system->N, sizeof(int)); int numall = list->inum + list->gnum; for (itr_i = 0; itr_i < numall; ++itr_i) { i = ilist[itr_i]; - marked[i] = 1; - ++num_marked; jlist = firstneigh[i]; for (itr_j = 0; itr_j < numneigh[i]; ++itr_j) { @@ -623,8 +619,6 @@ int PairReaxFF::estimate_reax_lists() } } - free(marked); - return static_cast (MAX(num_nbrs*safezone, mincap*REAX_MIN_NBRS)); } diff --git a/src/REAXFF/reaxff_hydrogen_bonds.cpp b/src/REAXFF/reaxff_hydrogen_bonds.cpp index 5c7629ffb7..6f5c663da0 100644 --- a/src/REAXFF/reaxff_hydrogen_bonds.cpp +++ b/src/REAXFF/reaxff_hydrogen_bonds.cpp @@ -39,7 +39,6 @@ namespace ReaxFF { int start_j, end_j, hb_start_j, hb_end_j; int hblist[MAX_BONDS]; int itr, top; - int num_hb_intrs = 0; double r_jk, theta, cos_theta, sin_xhz4, cos_xhz1, sin_theta2; double e_hb, exp_hb2, exp_hb3, CEhb1, CEhb2, CEhb3; rvec dcos_theta_di, dcos_theta_dj, dcos_theta_dk; @@ -102,7 +101,6 @@ namespace ReaxFF { if (type_i < 0) continue; hbp = &(system->reax_param.hbp[type_i][type_j][type_k]); if (hbp->r0_hb <= 0.0) continue; - ++num_hb_intrs; Calculate_Theta(pbond_ij->dvec, pbond_ij->d, dvec_jk, r_jk, &theta, &cos_theta); diff --git a/src/REAXFF/reaxff_torsion_angles.cpp b/src/REAXFF/reaxff_torsion_angles.cpp index 2b94bf50ae..e9b6bc618d 100644 --- a/src/REAXFF/reaxff_torsion_angles.cpp +++ b/src/REAXFF/reaxff_torsion_angles.cpp @@ -119,7 +119,6 @@ namespace ReaxFF { int type_i, type_j, type_k, type_l; int start_j, end_j; int start_pj, end_pj, start_pk, end_pk; - int num_frb_intrs = 0; double Delta_j, Delta_k; double r_ij, r_jk, r_kl, r_li; @@ -242,7 +241,6 @@ namespace ReaxFF { if (i != l && fbh->cnt && bo_kl->BO > control->thb_cut/*0*/ && bo_ij->BO * bo_jk->BO * bo_kl->BO > control->thb_cut/*0*/) { - ++num_frb_intrs; r_kl = pbond_kl->d; BOA_kl = bo_kl->BO - control->thb_cut; diff --git a/src/RIGID/fix_shake.cpp b/src/RIGID/fix_shake.cpp index 7c08ca7b4b..1678a36e02 100644 --- a/src/RIGID/fix_shake.cpp +++ b/src/RIGID/fix_shake.cpp @@ -869,13 +869,11 @@ void FixShake::find_clusters() // else it's an error flag = 0; - int flag2 = 0; for (i = 0; i < nlocal; i++) for (j = 0; j < npartner[i]; j++) { if (partner_type[i][j] == 0) flag++; if (!(mask[i] & groupbit)) continue; if (!(partner_mask[i][j] & groupbit)) continue; - if (partner_bondtype[i][j] == 0) flag2++; } MPI_Allreduce(&flag,&flag_all,1,MPI_INT,MPI_SUM,world);