diff --git a/src/USER-MISC/fix_ave_correlate_long.cpp b/src/USER-MISC/fix_ave_correlate_long.cpp index 5c9f478a65..dc52d94b14 100644 --- a/src/USER-MISC/fix_ave_correlate_long.cpp +++ b/src/USER-MISC/fix_ave_correlate_long.cpp @@ -307,7 +307,7 @@ FixAveCorrelateLong::FixAveCorrelateLong(LAMMPS * lmp, int narg, char **arg): for (int i=0;i 0) { t[jm] = j; for (int i=0;i0) { t[jm] = j * pow((double)m, k); for (int i=0;i -1e10) { correlation[i][k][j]+= shift[i][k][ind1]*shift[i][k][ind2]; if (i==0) ++ncorrelation[k][j]; @@ -620,7 +620,7 @@ void FixAveCorrelateLong::add(const int i, const double w, const int k){ } } else { int ind2=ind1-dmin; - for (int j=dmin;j -1e10) { correlation[i][k][j]+= shift[i][k][ind1]*shift[i][k][ind2]; @@ -661,7 +661,7 @@ void FixAveCorrelateLong::add(const int i, const double wA, const double wB, unsigned int ind1=insertindex[k]; if (k==0) { int ind2=ind1; - for (int j=0;j -1e10) { correlation[i][k][j]+= shift[i][k][ind1]*shift2[i][k][ind2]; if (i==0) ++ncorrelation[k][j]; @@ -672,7 +672,7 @@ void FixAveCorrelateLong::add(const int i, const double wA, const double wB, } else { int ind2=ind1-dmin; - for (int j=dmin;j -1e10) { correlation[i][k][j]+= shift[i][k][ind1]*shift2[i][k][ind2]; @@ -743,7 +743,7 @@ void FixAveCorrelateLong::write_restart(FILE *fp) { list[n++] = last_accumulated_step; for (int i=0;i (list[n++]); if ((npairin!=npair) || (numcorrelatorsin!=numcorrelators) - || (pin!=p) || (min!=m)) + || (pin!=(int)p) || (min!=(int)m)) error->all(FLERR,"Fix ave/correlate/long: restart and input data are different"); for (int i=0;i(list[n++]); naccumulator[i] = static_cast (list[n++]); insertindex[i] = static_cast (list[n++]); diff --git a/src/USER-MISC/fix_ave_correlate_long.h b/src/USER-MISC/fix_ave_correlate_long.h index 5b38f454ea..548a0e7183 100644 --- a/src/USER-MISC/fix_ave_correlate_long.h +++ b/src/USER-MISC/fix_ave_correlate_long.h @@ -52,7 +52,7 @@ class FixAveCorrelateLong : public Fix { unsigned int *insertindex; int numcorrelators; // Recommended 20 - int p; // Points per correlator (recommended 16) + unsigned int p; // Points per correlator (recommended 16) unsigned int m; // Num points for average (recommended 2; p mod m = 0) unsigned int dmin; // Min distance between ponts for correlators k>0; dmin=p/m