fix some minor bugs write data file writing and remove dead code and silence compiler warnings

This commit is contained in:
Axel Kohlmeyer 2018-11-15 16:48:38 -05:00
parent 1fc3b4618c
commit 6e225d90fc
8 changed files with 14 additions and 12 deletions

View File

@ -50,7 +50,7 @@ static int cmptagint(const void *p1, const void *p2)
static void write_group(FILE *fp, int gid, Atom *atom, Group *group, int me,
int np, MPI_Comm world, FILE *screen, FILE *logfile)
{
char fmt[8];
char fmt[16];
tagint *sendlist, *recvlist;
bigint num = group->count(gid);
int lnum, cols;
@ -73,7 +73,7 @@ static void write_group(FILE *fp, int gid, Atom *atom, Group *group, int me,
++i;
j /= 10;
}
sprintf(fmt,"%%%dd ", i);
snprintf(fmt,16,"%%%dd ", i);
cols = 80 / (i+1);
}

View File

@ -758,8 +758,10 @@ void FixRX::pre_force(int /*vflag*/)
memory->create( diagnosticCounterPerODE[FuncSum], nlocal, "FixRX::diagnosticCounterPerODE");
}
//#pragma omp parallel \
// reduction(+: nSteps, nIters, nFuncs, nFails )
#if 0
#pragma omp parallel \
reduction(+: nSteps, nIters, nFuncs, nFails )
#endif
{
double *rwork = new double[8*nspecies];

View File

@ -451,10 +451,9 @@ void ComputeStressMopProfile::setup_bins()
int i,n;
double lo = 0.0, hi = 0.0;
double *boxlo,*boxhi,*prd;
double *boxlo,*boxhi;
boxlo = domain->boxlo;
boxhi = domain->boxhi;
prd = domain->prd;
if (originflag == LOWER) origin = boxlo[dir];
else if (originflag == UPPER) origin = boxhi[dir];

View File

@ -429,7 +429,7 @@ void AngleClass2P6::read_restart(FILE *fp)
void AngleClass2P6::write_data(FILE *fp)
{
for (int i = 1; i <= atom->nangletypes; i++)
fprintf(fp,"%d %g %g %g %g\n",
fprintf(fp,"%d %g %g %g %g %g %g\n",
i,theta0[i]/MY_PI*180.0,k2[i],k3[i],k4[i],k5[i],k6[i]);
fprintf(fp,"\nBondBond Coeffs\n\n");

View File

@ -353,7 +353,7 @@ void AngleCosineBuck6d::read_restart(FILE *fp)
void AngleCosineBuck6d::write_data(FILE *fp)
{
for (int i = 1; i <= atom->nangletypes; i++) {
fprintf(fp,"%d %g %d %d\n",i,k[i],multiplicity[i],th0[i]);
fprintf(fp,"%d %g %d %g\n",i,k[i],multiplicity[i],th0[i]);
}
}

View File

@ -241,8 +241,8 @@ void ImproperInversionHarmonic::invang(const int &i1,const int &i2,
f[i4][2] += f4[2];
}
double rb3x, rb3y, rb3z;
if (evflag)
if (evflag) {
double rb3x, rb3y, rb3z;
rb3x = vb1x - vb2x;
rb3y = vb1y - vb2y;
@ -252,6 +252,7 @@ void ImproperInversionHarmonic::invang(const int &i1,const int &i2,
vb3x,vb3y,vb3z,
vb2x,vb2y,vb2z,
rb3x,rb3y,rb3z);
}
}
/* ---------------------------------------------------------------------- */

View File

@ -83,7 +83,7 @@ void PairBuck6dCoulGaussDSF::compute(int eflag, int vflag)
double r,rsq,r2inv,r6inv,r14inv,rexp,forcecoul,forcebuck6d,factor_coul,factor_lj;
double term1,term2,term3,term4,term5;
double rcu,rqu,sme,smf,ebuck6d;
double prefactor,erfcc,erfcd,t,arg;
double prefactor,erfcc,erfcd,arg;
int *ilist,*jlist,*numneigh,**firstneigh;
evdwl = ecoul = 0.0;

View File

@ -85,7 +85,7 @@ void PairBuck6dCoulGaussLong::compute(int eflag, int vflag)
double grij,expm2,erf;
double term1,term2,term3,term4,term5;
double rcu,rqu,sme,smf,ebuck6d,ealpha;
double prefactor,erfa,expa,t,arg,falpha;
double prefactor,erfa,expa,arg,falpha;
int *ilist,*jlist,*numneigh,**firstneigh;
evdwl = ecoul = 0.0;