fix some minor bugs write data file writing and remove dead code and silence compiler warnings
This commit is contained in:
@ -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,
|
static void write_group(FILE *fp, int gid, Atom *atom, Group *group, int me,
|
||||||
int np, MPI_Comm world, FILE *screen, FILE *logfile)
|
int np, MPI_Comm world, FILE *screen, FILE *logfile)
|
||||||
{
|
{
|
||||||
char fmt[8];
|
char fmt[16];
|
||||||
tagint *sendlist, *recvlist;
|
tagint *sendlist, *recvlist;
|
||||||
bigint num = group->count(gid);
|
bigint num = group->count(gid);
|
||||||
int lnum, cols;
|
int lnum, cols;
|
||||||
@ -73,7 +73,7 @@ static void write_group(FILE *fp, int gid, Atom *atom, Group *group, int me,
|
|||||||
++i;
|
++i;
|
||||||
j /= 10;
|
j /= 10;
|
||||||
}
|
}
|
||||||
sprintf(fmt,"%%%dd ", i);
|
snprintf(fmt,16,"%%%dd ", i);
|
||||||
cols = 80 / (i+1);
|
cols = 80 / (i+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -758,8 +758,10 @@ void FixRX::pre_force(int /*vflag*/)
|
|||||||
memory->create( diagnosticCounterPerODE[FuncSum], nlocal, "FixRX::diagnosticCounterPerODE");
|
memory->create( diagnosticCounterPerODE[FuncSum], nlocal, "FixRX::diagnosticCounterPerODE");
|
||||||
}
|
}
|
||||||
|
|
||||||
//#pragma omp parallel \
|
#if 0
|
||||||
// reduction(+: nSteps, nIters, nFuncs, nFails )
|
#pragma omp parallel \
|
||||||
|
reduction(+: nSteps, nIters, nFuncs, nFails )
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
double *rwork = new double[8*nspecies];
|
double *rwork = new double[8*nspecies];
|
||||||
|
|
||||||
|
|||||||
@ -451,10 +451,9 @@ void ComputeStressMopProfile::setup_bins()
|
|||||||
int i,n;
|
int i,n;
|
||||||
double lo = 0.0, hi = 0.0;
|
double lo = 0.0, hi = 0.0;
|
||||||
|
|
||||||
double *boxlo,*boxhi,*prd;
|
double *boxlo,*boxhi;
|
||||||
boxlo = domain->boxlo;
|
boxlo = domain->boxlo;
|
||||||
boxhi = domain->boxhi;
|
boxhi = domain->boxhi;
|
||||||
prd = domain->prd;
|
|
||||||
|
|
||||||
if (originflag == LOWER) origin = boxlo[dir];
|
if (originflag == LOWER) origin = boxlo[dir];
|
||||||
else if (originflag == UPPER) origin = boxhi[dir];
|
else if (originflag == UPPER) origin = boxhi[dir];
|
||||||
|
|||||||
@ -429,7 +429,7 @@ void AngleClass2P6::read_restart(FILE *fp)
|
|||||||
void AngleClass2P6::write_data(FILE *fp)
|
void AngleClass2P6::write_data(FILE *fp)
|
||||||
{
|
{
|
||||||
for (int i = 1; i <= atom->nangletypes; i++)
|
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]);
|
i,theta0[i]/MY_PI*180.0,k2[i],k3[i],k4[i],k5[i],k6[i]);
|
||||||
|
|
||||||
fprintf(fp,"\nBondBond Coeffs\n\n");
|
fprintf(fp,"\nBondBond Coeffs\n\n");
|
||||||
|
|||||||
@ -353,7 +353,7 @@ void AngleCosineBuck6d::read_restart(FILE *fp)
|
|||||||
void AngleCosineBuck6d::write_data(FILE *fp)
|
void AngleCosineBuck6d::write_data(FILE *fp)
|
||||||
{
|
{
|
||||||
for (int i = 1; i <= atom->nangletypes; i++) {
|
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]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -241,8 +241,8 @@ void ImproperInversionHarmonic::invang(const int &i1,const int &i2,
|
|||||||
f[i4][2] += f4[2];
|
f[i4][2] += f4[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
double rb3x, rb3y, rb3z;
|
if (evflag) {
|
||||||
if (evflag)
|
double rb3x, rb3y, rb3z;
|
||||||
|
|
||||||
rb3x = vb1x - vb2x;
|
rb3x = vb1x - vb2x;
|
||||||
rb3y = vb1y - vb2y;
|
rb3y = vb1y - vb2y;
|
||||||
@ -252,6 +252,7 @@ void ImproperInversionHarmonic::invang(const int &i1,const int &i2,
|
|||||||
vb3x,vb3y,vb3z,
|
vb3x,vb3y,vb3z,
|
||||||
vb2x,vb2y,vb2z,
|
vb2x,vb2y,vb2z,
|
||||||
rb3x,rb3y,rb3z);
|
rb3x,rb3y,rb3z);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|||||||
@ -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 r,rsq,r2inv,r6inv,r14inv,rexp,forcecoul,forcebuck6d,factor_coul,factor_lj;
|
||||||
double term1,term2,term3,term4,term5;
|
double term1,term2,term3,term4,term5;
|
||||||
double rcu,rqu,sme,smf,ebuck6d;
|
double rcu,rqu,sme,smf,ebuck6d;
|
||||||
double prefactor,erfcc,erfcd,t,arg;
|
double prefactor,erfcc,erfcd,arg;
|
||||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||||
|
|
||||||
evdwl = ecoul = 0.0;
|
evdwl = ecoul = 0.0;
|
||||||
|
|||||||
@ -85,7 +85,7 @@ void PairBuck6dCoulGaussLong::compute(int eflag, int vflag)
|
|||||||
double grij,expm2,erf;
|
double grij,expm2,erf;
|
||||||
double term1,term2,term3,term4,term5;
|
double term1,term2,term3,term4,term5;
|
||||||
double rcu,rqu,sme,smf,ebuck6d,ealpha;
|
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;
|
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||||
|
|
||||||
evdwl = ecoul = 0.0;
|
evdwl = ecoul = 0.0;
|
||||||
|
|||||||
Reference in New Issue
Block a user