remove dead code and silence compiler warnings

This commit is contained in:
Axel Kohlmeyer
2018-11-15 16:31:04 -05:00
parent eae9d27f6d
commit 1fc3b4618c
29 changed files with 51 additions and 96 deletions

View File

@ -107,7 +107,7 @@ void PairBodyRoundedPolygon::compute(int eflag, int vflag)
int nei,nej,iefirst,jefirst; int nei,nej,iefirst,jefirst;
double xtmp,ytmp,ztmp,delx,dely,delz,evdwl; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl;
double rsq,rsqinv,r,radi,radj,eradi,eradj,rradi,rradj,k_nij,k_naij; double rsq,rsqinv,r,radi,radj,eradi,eradj,rradi,rradj,k_nij,k_naij;
double xi[3],xj[3],facc[3]; double facc[3];
int *ilist,*jlist,*numneigh,**firstneigh; int *ilist,*jlist,*numneigh,**firstneigh;
evdwl = 0.0; evdwl = 0.0;

View File

@ -274,14 +274,6 @@ double PairNMCut::init_one(int i, int j)
} }
MPI_Allreduce(count,all,2,MPI_DOUBLE,MPI_SUM,world); MPI_Allreduce(count,all,2,MPI_DOUBLE,MPI_SUM,world);
double rr1 = mm[i][j]*(nn[i][j]-1)*pow(r0[i][j],nn[i][j]);
double rr2 = nn[i][j]*(mm[i][j]-1)*pow(r0[i][j],mm[i][j]);
double p1 = 1-nn[i][j];
double p2 = 1-mm[i][j];
double rrr1 = pow(r0[i][j],nn[i][j])*(1-nn[i][j]);
double rrr2 = pow(r0[i][j],mm[i][j])*(1-mm[i][j]);
double cut3 = cut[i][j]*cut[i][j]*cut[i][j]; double cut3 = cut[i][j]*cut[i][j]*cut[i][j];
ptail_ij = 2.*MY_PI/3.*all[0]*all[1]*e0nm[i][j]*nm[i][j]*cut3 * ptail_ij = 2.*MY_PI/3.*all[0]*all[1]*e0nm[i][j]*nm[i][j]*cut3 *
(pow(r0[i][j]/cut[i][j],nn[i][j])/(nn[i][j]-3) - pow(r0[i][j]/cut[i][j],mm[i][j])/(mm[i][j]-3)); (pow(r0[i][j]/cut[i][j],nn[i][j])/(nn[i][j]-3) - pow(r0[i][j]/cut[i][j],mm[i][j])/(mm[i][j]-3));

View File

@ -324,14 +324,6 @@ double PairNMCutCoulCut::init_one(int i, int j)
} }
MPI_Allreduce(count,all,2,MPI_DOUBLE,MPI_SUM,world); MPI_Allreduce(count,all,2,MPI_DOUBLE,MPI_SUM,world);
double rr1 = mm[i][j]*(nn[i][j]-1)*pow(r0[i][j],nn[i][j]);
double rr2 = nn[i][j]*(mm[i][j]-1)*pow(r0[i][j],mm[i][j]);
double p1 = 1-nn[i][j];
double p2 = 1-mm[i][j];
double rrr1 = pow(r0[i][j],nn[i][j])*(1-nn[i][j]);
double rrr2 = pow(r0[i][j],mm[i][j])*(1-mm[i][j]);
double cut_lj3 = cut_lj[i][j]*cut_lj[i][j]*cut_lj[i][j]; double cut_lj3 = cut_lj[i][j]*cut_lj[i][j]*cut_lj[i][j];
ptail_ij = 2.*MY_PI/3.*all[0]*all[1]*e0nm[i][j]*nm[i][j]*cut_lj3 * ptail_ij = 2.*MY_PI/3.*all[0]*all[1]*e0nm[i][j]*nm[i][j]*cut_lj3 *
(pow(r0[i][j]/cut_lj[i][j],nn[i][j])/(nn[i][j]-3) - pow(r0[i][j]/cut_lj[i][j],mm[i][j])/(mm[i][j]-3)); (pow(r0[i][j]/cut_lj[i][j],nn[i][j])/(nn[i][j]-3) - pow(r0[i][j]/cut_lj[i][j],mm[i][j])/(mm[i][j]-3));

View File

@ -371,14 +371,6 @@ double PairNMCutCoulLong::init_one(int i, int j)
} }
MPI_Allreduce(count,all,2,MPI_DOUBLE,MPI_SUM,world); MPI_Allreduce(count,all,2,MPI_DOUBLE,MPI_SUM,world);
double rr1 = mm[i][j]*(nn[i][j]-1)*pow(r0[i][j],nn[i][j]);
double rr2 = nn[i][j]*(mm[i][j]-1)*pow(r0[i][j],mm[i][j]);
double p1 = 1-nn[i][j];
double p2 = 1-mm[i][j];
double rrr1 = pow(r0[i][j],nn[i][j])*(1-nn[i][j]);
double rrr2 = pow(r0[i][j],mm[i][j])*(1-mm[i][j]);
double cut_lj3 = cut_lj[i][j]*cut_lj[i][j]*cut_lj[i][j]; double cut_lj3 = cut_lj[i][j]*cut_lj[i][j]*cut_lj[i][j];
ptail_ij = 2.*MY_PI/3.*all[0]*all[1]*e0nm[i][j]*nm[i][j]*cut_lj3 * ptail_ij = 2.*MY_PI/3.*all[0]*all[1]*e0nm[i][j]*nm[i][j]*cut_lj3 *
(pow(r0[i][j]/cut_lj[i][j],nn[i][j])/(nn[i][j]-3) - pow(r0[i][j]/cut_lj[i][j],mm[i][j])/(mm[i][j]-3)); (pow(r0[i][j]/cut_lj[i][j],nn[i][j])/(nn[i][j]-3) - pow(r0[i][j]/cut_lj[i][j],mm[i][j])/(mm[i][j]-3));

View File

@ -943,7 +943,7 @@ double FixCMAP::dihedral_angle_atan2(double fx, double fy, double fz,
{ {
// calculate the dihedral angle // calculate the dihedral angle
double angle, arg1, arg2; double angle = 0.0, arg1, arg2;
arg1 = absg*(fx*bx+fy*by+fz*bz); arg1 = absg*(fx*bx+fy*by+fz*bz);
arg2 = ax*bx+ay*by+az*bz; arg2 = ax*bx+ay*by+az*bz;

View File

@ -748,19 +748,9 @@ void FixPOEMS::initial_integrate(int vflag)
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
void FixPOEMS::post_force(int vflag) void FixPOEMS::post_force(int /* vflag */)
{ {
if (earlyflag) compute_forces_and_torques(); if (earlyflag) compute_forces_and_torques();
/*
for (int ibody = 0; ibody < nbody; ibody++) {
if (ibody == 0) {
printf("PFF %d %g %g %g\n",ibody,fcm[ibody][0],fcm[ibody][1],fcm[ibody][2]);
printf("PFT %d %g %g %g\n",ibody,
torque[ibody][0],torque[ibody][1],torque[ibody][2]);
}
}
*/
} }
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
@ -850,7 +840,7 @@ void FixPOEMS::final_integrate()
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
void FixPOEMS::initial_integrate_respa(int vflag, int ilevel, int iloop) void FixPOEMS::initial_integrate_respa(int vflag, int ilevel, int /* iloop */)
{ {
dtv = step_respa[ilevel]; dtv = step_respa[ilevel];
dtf = 0.5 * step_respa[ilevel] * force->ftm2v; dtf = 0.5 * step_respa[ilevel] * force->ftm2v;
@ -862,14 +852,14 @@ void FixPOEMS::initial_integrate_respa(int vflag, int ilevel, int iloop)
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
void FixPOEMS::post_force_respa(int vflag, int ilevel, int iloop) void FixPOEMS::post_force_respa(int vflag, int ilevel, int /* iloop */)
{ {
if (ilevel == nlevels_respa-1) post_force(vflag); if (ilevel == nlevels_respa-1) post_force(vflag);
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
void FixPOEMS::final_integrate_respa(int ilevel, int iloop) void FixPOEMS::final_integrate_respa(int ilevel, int /* iloop */)
{ {
dtf = 0.5 * step_respa[ilevel] * force->ftm2v; dtf = 0.5 * step_respa[ilevel] * force->ftm2v;
final_integrate(); final_integrate();
@ -949,7 +939,7 @@ int FixPOEMS::dof(int igroup)
thus this routine does nothing for now thus this routine does nothing for now
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
void FixPOEMS::deform(int flag) {} void FixPOEMS::deform(int /* flag */) {}
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
@ -1607,7 +1597,7 @@ void FixPOEMS::grow_arrays(int nmax)
copy values within local atom-based arrays copy values within local atom-based arrays
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
void FixPOEMS::copy_arrays(int i, int j, int delflag) void FixPOEMS::copy_arrays(int i, int j, int /* delflag */)
{ {
natom2body[j] = natom2body[i]; natom2body[j] = natom2body[i];
for (int k = 0; k < natom2body[j]; k++) atom2body[j][k] = atom2body[i][k]; for (int k = 0; k < natom2body[j]; k++) atom2body[j][k] = atom2body[i][k];

View File

@ -716,7 +716,7 @@ void FixHyperLocal::pre_reverse(int /* eflag */, int /* vflag */)
if (update->ntimestep % histo_print == 0) { if (update->ntimestep % histo_print == 0) {
MPI_Allreduce(histo,allhisto,histo_count+2,MPI_LMP_BIGINT,MPI_SUM,world); MPI_Allreduce(histo,allhisto,histo_count+2,MPI_LMP_BIGINT,MPI_SUM,world);
bigint total; bigint total = 0;
for (i = 0; i < histo_count+2; i++) total += allhisto[i]; for (i = 0; i < histo_count+2; i++) total += allhisto[i];
if (me == 0) { if (me == 0) {

View File

@ -87,7 +87,7 @@ class FixHyperLocal : public FixHyper {
int nevent; // # of events that trigger bond rebuild int nevent; // # of events that trigger bond rebuild
int nevent_atom; // # of atoms that experienced an event int nevent_atom; // # of atoms that experienced an event
double cutbondsq,dcutsq; double cutbondsq,dcutsq;
double beta,t_hyper,invqfactorsq; double beta,invqfactorsq;
double mybias; double mybias;
double maxbondlen; // cummulative max length of any bond double maxbondlen; // cummulative max length of any bond
double maxdriftsq; // max distance any atom drifts from original pos double maxdriftsq; // max distance any atom drifts from original pos
@ -147,7 +147,7 @@ class FixHyperLocal : public FixHyper {
// histogramming of bond boost cooeficients // histogramming of bond boost cooeficients
int histo_flag,histo_every,histo_count,histo_print,histo_steps; int histo_every,histo_count,histo_print,histo_steps;
double histo_delta,invhisto_delta,histo_lo; double histo_delta,invhisto_delta,histo_lo;
bigint *histo,*allhisto; bigint *histo,*allhisto;
}; };

View File

@ -323,7 +323,7 @@ void PairSpinExchange::compute_single_pair(int ii, double fmi[3])
double **x = atom->x; double **x = atom->x;
double **sp = atom->sp; double **sp = atom->sp;
double local_cut2; double local_cut2;
double xi[3], rij[3]; double xi[3];
double delx,dely,delz; double delx,dely,delz;
double spj[3]; double spj[3];

View File

@ -103,9 +103,9 @@ PairOxdna2Coaxstk::~PairOxdna2Coaxstk()
void PairOxdna2Coaxstk::compute(int eflag, int vflag) void PairOxdna2Coaxstk::compute(int eflag, int vflag)
{ {
double delf[3],delt[3],delta[3],deltb[3]; // force, torque increment; double delf[3],delta[3],deltb[3]; // force, torque increment;
double evdwl,fpair,finc,tpair,factor_lj; double evdwl,fpair,finc,tpair,factor_lj;
double v1tmp[3],v2tmp[3],v3tmp[3]; double v1tmp[3];
double delr_ss[3],delr_ss_norm[3],rsq_ss,r_ss,rinv_ss; double delr_ss[3],delr_ss_norm[3],rsq_ss,r_ss,rinv_ss;
double delr_st[3],delr_st_norm[3],rsq_st,r_st,rinv_st; double delr_st[3],delr_st_norm[3],rsq_st,r_st,rinv_st;
double theta1,theta1p,t1dir[3],cost1; double theta1,theta1p,t1dir[3],cost1;
@ -114,12 +114,6 @@ void PairOxdna2Coaxstk::compute(int eflag, int vflag)
double theta6,theta6p,t6dir[3],cost6; double theta6,theta6p,t6dir[3],cost6;
double cosphi3; double cosphi3;
double gamma,gammacub,rinv_ss_cub,fac;
double aybx,azbx,rax,ray,raz,rbx;
double dcdr,dcdrbx;
double dcdaxbx,dcdaybx,dcdazbx;
double dcdrax,dcdray,dcdraz;
// distances COM-backbone site, COM-stacking site // distances COM-backbone site, COM-stacking site
double d_cs=-0.4, d_cst=+0.34; double d_cs=-0.4, d_cst=+0.34;
// vectors COM-backbone site, COM-stacking site in lab frame // vectors COM-backbone site, COM-stacking site in lab frame

View File

@ -210,7 +210,7 @@ void ComputeStressMop::init()
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
void ComputeStressMop::init_list(int id, NeighList *ptr) void ComputeStressMop::init_list(int /* id */, NeighList *ptr)
{ {
list = ptr; list = ptr;
} }
@ -246,9 +246,9 @@ void ComputeStressMop::compute_vector()
void ComputeStressMop::compute_pairs() void ComputeStressMop::compute_pairs()
{ {
int i,j,m,n,ii,jj,inum,jnum,itype,jtype; int i,j,m,ii,jj,inum,jnum,itype,jtype;
double delx,dely,delz; double delx,dely,delz;
double rsq,eng,fpair,factor_coul,factor_lj; double rsq,fpair,factor_coul,factor_lj;
int *ilist,*jlist,*numneigh,**firstneigh; int *ilist,*jlist,*numneigh,**firstneigh;
double *mass = atom->mass; double *mass = atom->mass;
@ -363,8 +363,7 @@ void ComputeStressMop::compute_pairs()
// counts local particles transfers across the plane // counts local particles transfers across the plane
if (which[m] == KIN || which[m] == TOTAL){ if (which[m] == KIN || which[m] == TOTAL){
double vcm[3]; double sgn;
double masstotal,sgn;
for (int i = 0; i < nlocal; i++){ for (int i = 0; i < nlocal; i++){

View File

@ -211,7 +211,7 @@ void ComputeStressMopProfile::init()
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
void ComputeStressMopProfile::init_list(int id, NeighList *ptr) void ComputeStressMopProfile::init_list(int /* id */, NeighList *ptr)
{ {
list = ptr; list = ptr;
} }
@ -253,11 +253,11 @@ void ComputeStressMopProfile::compute_array()
void ComputeStressMopProfile::compute_pairs() void ComputeStressMopProfile::compute_pairs()
{ {
int i,j,m,n,ii,jj,inum,jnum,itype,jtype,ibin; int i,j,m,ii,jj,inum,jnum,itype,jtype,ibin;
double delx,dely,delz; double delx,dely,delz;
double rsq,eng,fpair,factor_coul,factor_lj; double rsq,fpair,factor_coul,factor_lj;
int *ilist,*jlist,*numneigh,**firstneigh; int *ilist,*jlist,*numneigh,**firstneigh;
double pos,pos1,pos_temp; double pos,pos1;
double *mass = atom->mass; double *mass = atom->mass;
int *type = atom->type; int *type = atom->type;
@ -385,8 +385,7 @@ void ComputeStressMopProfile::compute_pairs()
if (which[m] == KIN || which[m] == TOTAL){ if (which[m] == KIN || which[m] == TOTAL){
double vcm[3]; double sgn;
double masstotal,sgn;
for (int i = 0; i < nlocal; i++){ for (int i = 0; i < nlocal; i++){
@ -449,8 +448,8 @@ void ComputeStressMopProfile::compute_pairs()
void ComputeStressMopProfile::setup_bins() void ComputeStressMopProfile::setup_bins()
{ {
int i,j,k,m,n; int i,n;
double lo,hi,coord1,coord2; double lo = 0.0, hi = 0.0;
double *boxlo,*boxhi,*prd; double *boxlo,*boxhi,*prd;
boxlo = domain->boxlo; boxlo = domain->boxlo;

View File

@ -50,7 +50,6 @@ namespace LAMMPS_NS {
double **coord,**coordp; double **coord,**coordp;
double **values_local,**values_global; double **values_local,**values_global;
int ndim;
double dt,nktv2p,ftm2v; double dt,nktv2p,ftm2v;
double area; double area;
class NeighList *list; class NeighList *list;

View File

@ -108,8 +108,6 @@ FixFFL::FixFFL(LAMMPS *lmp, int narg, char **arg) :
} }
t_target=t_start; t_target=t_start;
const double kT = t_target * force->boltz / force->mvv2e;
// initialize Marsaglia RNG with processor-unique seed // initialize Marsaglia RNG with processor-unique seed
// NB: this means runs will not be the same with different numbers of processors // NB: this means runs will not be the same with different numbers of processors
@ -298,7 +296,7 @@ void FixFFL::ffl_integrate() {
} }
void FixFFL::initial_integrate(int vflag) { void FixFFL::initial_integrate(int /* vflag */) {
double dtfm; double dtfm;
// update v and x of atoms in group // update v and x of atoms in group
@ -391,7 +389,7 @@ void FixFFL::final_integrate() {
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
void FixFFL::initial_integrate_respa(int vflag, int ilevel, int iloop) { void FixFFL::initial_integrate_respa(int vflag, int ilevel, int /* iloop */) {
dtv = step_respa[ilevel]; dtv = step_respa[ilevel];
dtf = 0.5 * step_respa[ilevel] * force->ftm2v; dtf = 0.5 * step_respa[ilevel] * force->ftm2v;
@ -406,7 +404,7 @@ void FixFFL::initial_integrate_respa(int vflag, int ilevel, int iloop) {
} }
} }
void FixFFL::final_integrate_respa(int ilevel, int iloop) { void FixFFL::final_integrate_respa(int ilevel, int /* iloop */) {
dtv = step_respa[ilevel]; dtv = step_respa[ilevel];
dtf = 0.5 * step_respa[ilevel] * force->ftm2v; dtf = 0.5 * step_respa[ilevel] * force->ftm2v;

View File

@ -592,14 +592,13 @@ void FixFilterCorotate::pre_neighbor()
double c = (del2[0])*(del3[1]) - (del2[1])*(del3[0]); double c = (del2[0])*(del3[1]) - (del2[1])*(del3[0]);
int signum = sgn(a*(del1[0]) + b*(del1[1]) + c*(del1[2])); int signum = sgn(a*(del1[0]) + b*(del1[1]) + c*(del1[2]));
if (fabs(signum)!= 1) if (abs(signum) != 1)
error->all(FLERR,"Wrong orientation in cluster of size 4" error->all(FLERR,"Wrong orientation in cluster of size 4"
"in fix filter/corotate!"); "in fix filter/corotate!");
clist_q0[i][8] *= signum; clist_q0[i][8] *= signum;
clist_q0[i][11] *= signum; clist_q0[i][11] *= signum;
} else if (N == 5) } else if (N == 5) {
{
oxy = atom->map(shake_atom[m][0]); oxy = atom->map(shake_atom[m][0]);
atom1 = atom->map(shake_atom[m][1]); atom1 = atom->map(shake_atom[m][1]);
atom2 = atom->map(shake_atom[m][2]); atom2 = atom->map(shake_atom[m][2]);
@ -666,14 +665,12 @@ void FixFilterCorotate::pre_neighbor()
double c = (del2[0])*(del3[1]) - (del2[1])*(del3[0]); double c = (del2[0])*(del3[1]) - (del2[1])*(del3[0]);
int signum = sgn(a*(del1[0]) + b*(del1[1]) + c*(del1[2])); int signum = sgn(a*(del1[0]) + b*(del1[1]) + c*(del1[2]));
if (fabs(signum)!= 1) if (abs(signum)!= 1)
error->all(FLERR,"Wrong orientation in cluster of size 5" error->all(FLERR,"Wrong orientation in cluster of size 5"
"in fix filter/corotate!"); "in fix filter/corotate!");
clist_q0[i][8] *= signum; clist_q0[i][8] *= signum;
clist_q0[i][11] *= signum; clist_q0[i][11] *= signum;
} } else {
else
{
error->all(FLERR,"Fix filter/corotate cluster with size > 5" error->all(FLERR,"Fix filter/corotate cluster with size > 5"
"not yet configured..."); "not yet configured...");
} }

View File

@ -80,7 +80,9 @@ FixOMP::FixOMP(LAMMPS *lmp, int narg, char **arg)
if (nthreads < 1) if (nthreads < 1)
error->all(FLERR,"Illegal number of OpenMP threads requested"); error->all(FLERR,"Illegal number of OpenMP threads requested");
#if defined(_OPENMP)
int reset_thr = 0; int reset_thr = 0;
#endif
if (nthreads != comm->nthreads) { if (nthreads != comm->nthreads) {
#if defined(_OPENMP) #if defined(_OPENMP)
reset_thr = 1; reset_thr = 1;

View File

@ -185,6 +185,7 @@ static inline void loop_setup_thr(int &ifrom, int &ito, int &tid,
tid = 0; tid = 0;
ifrom = 0; ifrom = 0;
ito = inum; ito = inum;
nthreads = 1;
#endif #endif
} }

View File

@ -66,7 +66,7 @@ ComputeChunkAtom::ComputeChunkAtom(LAMMPS *lmp, int narg, char **arg) :
// chunk style and its args // chunk style and its args
int iarg; int iarg = 0;
binflag = 0; binflag = 0;
ncoord = 0; ncoord = 0;
@ -248,7 +248,7 @@ ComputeChunkAtom::ComputeChunkAtom(LAMMPS *lmp, int narg, char **arg) :
iarg += 2; iarg += 2;
} else if (strcmp(arg[iarg],"bound") == 0) { } else if (strcmp(arg[iarg],"bound") == 0) {
if (iarg+4 > narg) error->all(FLERR,"Illegal compute chunk/atom command"); if (iarg+4 > narg) error->all(FLERR,"Illegal compute chunk/atom command");
int idim; int idim = 0;
if (strcmp(arg[iarg+1],"x") == 0) idim = 0; if (strcmp(arg[iarg+1],"x") == 0) idim = 0;
else if (strcmp(arg[iarg+1],"y") == 0) idim = 1; else if (strcmp(arg[iarg+1],"y") == 0) idim = 1;
else if (strcmp(arg[iarg+1],"z") == 0) idim = 2; else if (strcmp(arg[iarg+1],"z") == 0) idim = 2;

View File

@ -33,7 +33,7 @@ class ComputeDihedralLocal : public Compute {
double memory_usage(); double memory_usage();
private: private:
int nvalues,nvar,ncount,setflag,tflag; int nvalues,nvar,ncount,setflag;
int pvar; int pvar;
int *bstyle,*vvar; int *bstyle,*vvar;

View File

@ -54,7 +54,7 @@ void CreateBonds::command(int narg, char **arg)
int style; int style;
int iarg; int iarg = 0;
if (strcmp(arg[0],"many") == 0) { if (strcmp(arg[0],"many") == 0) {
style = MANY; style = MANY;
if (narg != 6) error->all(FLERR,"Illegal create_bonds command"); if (narg != 6) error->all(FLERR,"Illegal create_bonds command");

View File

@ -118,7 +118,7 @@ void DisplaceAtoms::command(int narg, char **arg)
if (style == RAMP) { if (style == RAMP) {
int d_dim; int d_dim = 0;
if (strcmp(arg[2],"x") == 0) d_dim = 0; if (strcmp(arg[2],"x") == 0) d_dim = 0;
else if (strcmp(arg[2],"y") == 0) d_dim = 1; else if (strcmp(arg[2],"y") == 0) d_dim = 1;
else if (strcmp(arg[2],"z") == 0) d_dim = 2; else if (strcmp(arg[2],"z") == 0) d_dim = 2;
@ -136,7 +136,7 @@ void DisplaceAtoms::command(int narg, char **arg)
d_hi = zscale*force->numeric(FLERR,arg[4]); d_hi = zscale*force->numeric(FLERR,arg[4]);
} }
int coord_dim; int coord_dim = 0;
if (strcmp(arg[5],"x") == 0) coord_dim = 0; if (strcmp(arg[5],"x") == 0) coord_dim = 0;
else if (strcmp(arg[5],"y") == 0) coord_dim = 1; else if (strcmp(arg[5],"y") == 0) coord_dim = 1;
else if (strcmp(arg[5],"z") == 0) coord_dim = 2; else if (strcmp(arg[5],"z") == 0) coord_dim = 2;

View File

@ -1290,7 +1290,7 @@ int DumpImage::modify_param(int narg, char **arg)
if (strcmp(arg[0],"amap") == 0) { if (strcmp(arg[0],"amap") == 0) {
if (narg < 6) error->all(FLERR,"Illegal dump_modify command"); if (narg < 6) error->all(FLERR,"Illegal dump_modify command");
if (strlen(arg[3]) != 2) error->all(FLERR,"Illegal dump_modify command"); if (strlen(arg[3]) != 2) error->all(FLERR,"Illegal dump_modify command");
int factor; int factor = 0;
if (arg[3][0] == 's') factor = 1; if (arg[3][0] == 's') factor = 1;
else if (arg[3][0] == 'c') factor = 2; else if (arg[3][0] == 'c') factor = 2;
else if (arg[3][0] == 'd') factor = 3; else if (arg[3][0] == 'd') factor = 3;

View File

@ -802,7 +802,7 @@ void FixDeform::end_of_step()
// tilt_target can be large positive or large negative value // tilt_target can be large positive or large negative value
// add/subtract box lengths until tilt_target is closest to current value // add/subtract box lengths until tilt_target is closest to current value
int idenom; int idenom = 0;
if (i == 5) idenom = 0; if (i == 5) idenom = 0;
else if (i == 4) idenom = 0; else if (i == 4) idenom = 0;
else if (i == 3) idenom = 1; else if (i == 3) idenom = 1;

View File

@ -68,7 +68,7 @@ FixMove::FixMove(LAMMPS *lmp, int narg, char **arg) :
// parse args // parse args
int iarg; int iarg = 0;
if (strcmp(arg[3],"linear") == 0) { if (strcmp(arg[3],"linear") == 0) {
if (narg < 7) error->all(FLERR,"Illegal fix move command"); if (narg < 7) error->all(FLERR,"Illegal fix move command");

View File

@ -1138,7 +1138,7 @@ void Input::partition()
{ {
if (narg < 3) error->all(FLERR,"Illegal partition command"); if (narg < 3) error->all(FLERR,"Illegal partition command");
int yesflag; int yesflag = 0;
if (strcmp(arg[0],"yes") == 0) yesflag = 1; if (strcmp(arg[0],"yes") == 0) yesflag = 1;
else if (strcmp(arg[0],"no") == 0) yesflag = 0; else if (strcmp(arg[0],"no") == 0) yesflag = 0;
else error->all(FLERR,"Illegal partition command"); else error->all(FLERR,"Illegal partition command");

View File

@ -890,7 +890,7 @@ void Set::set(int keyword)
// enforce quat rotation vector in z dir for 2d systems // enforce quat rotation vector in z dir for 2d systems
else if (keyword == QUAT) { else if (keyword == QUAT) {
double *quat; double *quat = NULL;
if (avec_ellipsoid && atom->ellipsoid[i] >= 0) if (avec_ellipsoid && atom->ellipsoid[i] >= 0)
quat = avec_ellipsoid->bonus[atom->ellipsoid[i]].quat; quat = avec_ellipsoid->bonus[atom->ellipsoid[i]].quat;
else if (avec_tri && atom->tri[i] >= 0) else if (avec_tri && atom->tri[i] >= 0)

View File

@ -182,7 +182,7 @@ void Variable::set(int narg, char **arg)
if (find(arg[0]) >= 0) return; if (find(arg[0]) >= 0) return;
if (nvar == maxvar) grow(); if (nvar == maxvar) grow();
style[nvar] = LOOP; style[nvar] = LOOP;
int nfirst,nlast; int nfirst = 0,nlast = 0;
if (narg == 3 || (narg == 4 && strcmp(arg[3],"pad") == 0)) { if (narg == 3 || (narg == 4 && strcmp(arg[3],"pad") == 0)) {
nfirst = 1; nfirst = 1;
nlast = force->inumeric(FLERR,arg[2]); nlast = force->inumeric(FLERR,arg[2]);
@ -3983,7 +3983,7 @@ int Variable::special_function(char *word, char *contents, Tree **tree,
strcmp(word,"max") == 0 || strcmp(word,"ave") == 0 || strcmp(word,"max") == 0 || strcmp(word,"ave") == 0 ||
strcmp(word,"trap") == 0 || strcmp(word,"slope") == 0) { strcmp(word,"trap") == 0 || strcmp(word,"slope") == 0) {
int method; int method = 0;
if (strcmp(word,"sum") == 0) method = SUM; if (strcmp(word,"sum") == 0) method = SUM;
else if (strcmp(word,"min") == 0) method = XMIN; else if (strcmp(word,"min") == 0) method = XMIN;
else if (strcmp(word,"max") == 0) method = XMAX; else if (strcmp(word,"max") == 0) method = XMAX;

View File

@ -641,7 +641,7 @@ void Velocity::ramp(int /*narg*/, char **arg)
// parse args // parse args
int v_dim; int v_dim = 0;
if (strcmp(arg[0],"vx") == 0) v_dim = 0; if (strcmp(arg[0],"vx") == 0) v_dim = 0;
else if (strcmp(arg[0],"vy") == 0) v_dim = 1; else if (strcmp(arg[0],"vy") == 0) v_dim = 1;
else if (strcmp(arg[0],"vz") == 0) v_dim = 2; else if (strcmp(arg[0],"vz") == 0) v_dim = 2;
@ -662,7 +662,7 @@ void Velocity::ramp(int /*narg*/, char **arg)
v_hi = zscale*force->numeric(FLERR,arg[2]); v_hi = zscale*force->numeric(FLERR,arg[2]);
} }
int coord_dim; int coord_dim = 0;
if (strcmp(arg[3],"x") == 0) coord_dim = 0; if (strcmp(arg[3],"x") == 0) coord_dim = 0;
else if (strcmp(arg[3],"y") == 0) coord_dim = 1; else if (strcmp(arg[3],"y") == 0) coord_dim = 1;
else if (strcmp(arg[3],"z") == 0) coord_dim = 2; else if (strcmp(arg[3],"z") == 0) coord_dim = 2;

View File

@ -45,7 +45,7 @@ void WriteDump::command(int narg, char **arg)
// create the Dump instance // create the Dump instance
// create dump command line with extra required args // create dump command line with extra required args
Dump *dump; Dump *dump = NULL;
char **dumpargs = new char*[modindex+2]; char **dumpargs = new char*[modindex+2];
dumpargs[0] = (char *) "WRITE_DUMP"; // dump id dumpargs[0] = (char *) "WRITE_DUMP"; // dump id