diff --git a/src/EXTRA-FIX/fix_pafi.cpp b/src/EXTRA-FIX/fix_pafi.cpp index eea8a2c1d3..3b51906ae1 100644 --- a/src/EXTRA-FIX/fix_pafi.cpp +++ b/src/EXTRA-FIX/fix_pafi.cpp @@ -593,7 +593,6 @@ void FixPAFI::initial_integrate(int /*vflag*/) if (rmass) { for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { - dtfm = dtf / rmass[i]; v[i][0] = 0.; v[i][1] = 0.; v[i][2] = 0.; @@ -604,7 +603,6 @@ void FixPAFI::initial_integrate(int /*vflag*/) } else { for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { - dtfm = dtf / mass[type[i]]; v[i][0] = 0.; v[i][1] = 0.; v[i][2] = 0.; diff --git a/src/compute_angle_local.cpp b/src/compute_angle_local.cpp index fa0b52f39c..7401d8b214 100644 --- a/src/compute_angle_local.cpp +++ b/src/compute_angle_local.cpp @@ -220,7 +220,7 @@ int ComputeAngleLocal::compute_angles(int flag) Angle *angle = force->angle; - m = n = 0; + m = 0; for (atom2 = 0; atom2 < nlocal; atom2++) { if (!(mask[atom2] & groupbit)) continue; @@ -292,7 +292,7 @@ int ComputeAngleLocal::compute_angles(int flag) if (tstr) input->variable->internal_set(tvar,theta); } - for (n = 0; n < nvalues; n++) { + for (int n = 0; n < nvalues; n++) { switch (bstyle[n]) { case THETA: ptr[n] = 180.0*theta/MY_PI; diff --git a/src/compute_bond_local.cpp b/src/compute_bond_local.cpp index 8818f15fb7..ab0fa3fb0a 100644 --- a/src/compute_bond_local.cpp +++ b/src/compute_bond_local.cpp @@ -299,8 +299,7 @@ int ComputeBondLocal::compute_bonds(int flag) rsq = dx*dx + dy*dy + dz*dz; if (btype == 0) { - engpot = fbond = 0.0; - engvib = engrot = engtrans = omegasq = vvib = 0.0; + fbond = 0.0; } else { if (singleflag) engpot = bond->single(btype,rsq,atom1,atom2,fbond); diff --git a/src/fix_move.cpp b/src/fix_move.cpp index fdf22fd6d0..72fd9b75d2 100644 --- a/src/fix_move.cpp +++ b/src/fix_move.cpp @@ -779,10 +779,8 @@ void FixMove::initial_integrate(int /*vflag*/) if (vxvarstyle == EQUAL) v[i][0] = vx; else v[i][0] = velocity[i][0]; if (rmass) { - dtfm = dtf / rmass[i]; x[i][0] += dtv * v[i][0]; } else { - dtfm = dtf / mass[type[i]]; x[i][0] += dtv * v[i][0]; } } else { @@ -809,10 +807,8 @@ void FixMove::initial_integrate(int /*vflag*/) if (vyvarstyle == EQUAL) v[i][1] = vy; else v[i][1] = velocity[i][1]; if (rmass) { - dtfm = dtf / rmass[i]; x[i][1] += dtv * v[i][1]; } else { - dtfm = dtf / mass[type[i]]; x[i][1] += dtv * v[i][1]; } } else { @@ -839,10 +835,8 @@ void FixMove::initial_integrate(int /*vflag*/) if (vzvarstyle == EQUAL) v[i][2] = vz; else v[i][2] = velocity[i][2]; if (rmass) { - dtfm = dtf / rmass[i]; x[i][2] += dtv * v[i][2]; } else { - dtfm = dtf / mass[type[i]]; x[i][2] += dtv * v[i][2]; } } else { diff --git a/src/lammps.cpp b/src/lammps.cpp index 291bb84499..b6c7fdcdef 100644 --- a/src/lammps.cpp +++ b/src/lammps.cpp @@ -506,7 +506,7 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator) : else if (strcmp(arg[inflag], "none") == 0) infile = stdin; else infile = fopen(arg[inflag],"r"); if (infile == nullptr) - error->one(FLERR,"Cannot open input script {}: {}",arg[inflag], utils::getsyserror()); + error->one(FLERR,"Cannot open input script {}: {}", arg[inflag], utils::getsyserror()); } if ((universe->me == 0) && !helpflag) diff --git a/src/min.cpp b/src/min.cpp index 69e24a541f..ab8b1a5235 100644 --- a/src/min.cpp +++ b/src/min.cpp @@ -959,20 +959,19 @@ double Min::fnorm_max() double Min::total_torque() { - double fmsq,ftotsqone,ftotsqall; + double ftotsqone,ftotsqall; int nlocal = atom->nlocal; double hbar = force->hplanck/MY_2PI; double tx,ty,tz; double **sp = atom->sp; double **fm = atom->fm; - fmsq = ftotsqone = ftotsqall = 0.0; + ftotsqone = ftotsqall = 0.0; for (int i = 0; i < nlocal; i++) { tx = fm[i][1]*sp[i][2] - fm[i][2]*sp[i][1]; ty = fm[i][2]*sp[i][0] - fm[i][0]*sp[i][2]; tz = fm[i][0]*sp[i][1] - fm[i][1]*sp[i][0]; - fmsq = tx*tx + ty*ty + tz*tz; - ftotsqone += fmsq; + ftotsqone += tx*tx + ty*ty + tz*tz; } // summing all fmsqtot on this replica @@ -1030,7 +1029,7 @@ double Min::max_torque() double **sp = atom->sp; double **fm = atom->fm; - fmsq = fmaxsqone = fmaxsqall = 0.0; + fmaxsqone = fmaxsqall = 0.0; for (int i = 0; i < nlocal; i++) { tx = fm[i][1]*sp[i][2] - fm[i][2]*sp[i][1]; ty = fm[i][2]*sp[i][0] - fm[i][0]*sp[i][2];