From 958a442bebbe7f9a053db3472dfa0476919ea7b7 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Wed, 12 Feb 2014 01:07:55 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11539 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/BODY/body_nparticle.h | 8 ++++---- src/DIPOLE/atom_vec_dipole.h | 2 +- src/KSPACE/pppm_disp.cpp | 10 ++++++---- src/MISC/fix_efield.h | 1 - src/MISC/fix_orient_fcc.cpp | 2 +- src/PERI/atom_vec_peri.h | 2 +- src/USER-LB/fix_lb_fluid.cpp | 2 +- src/USER-OMP/dihedral_class2_omp.cpp | 4 +++- src/USER-OMP/dihedral_fourier_omp.cpp | 4 +++- src/USER-OMP/dihedral_helix_omp.cpp | 4 +++- src/USER-OMP/dihedral_nharmonic_omp.cpp | 4 +++- src/USER-OMP/dihedral_quadratic_omp.cpp | 4 +++- src/USER-OMP/improper_class2_omp.cpp | 5 +++-- src/USER-OMP/improper_cvff_omp.cpp | 5 ++++- src/USER-OMP/improper_harmonic_omp.cpp | 4 +++- src/USER-REAXC/fix_reaxc_bonds.cpp | 2 +- src/USER-REAXC/fix_reaxc_species.h | 1 - src/fix_nve_limit.h | 2 +- src/fix_property_atom.cpp | 8 ++++---- 19 files changed, 45 insertions(+), 29 deletions(-) diff --git a/src/BODY/body_nparticle.h b/src/BODY/body_nparticle.h index 22f15ee4fa..90897cb2f6 100644 --- a/src/BODY/body_nparticle.h +++ b/src/BODY/body_nparticle.h @@ -29,11 +29,11 @@ class BodyNparticle : public Body { public: BodyNparticle(class LAMMPS *, int, char **); ~BodyNparticle(); - int nsub(class AtomVecBody::Bonus *); - double *coords(class AtomVecBody::Bonus *); + int nsub(struct AtomVecBody::Bonus *); + double *coords(struct AtomVecBody::Bonus *); - int pack_border_body(class AtomVecBody::Bonus *, double *); - int unpack_border_body(class AtomVecBody::Bonus *, double *); + int pack_border_body(struct AtomVecBody::Bonus *, double *); + int unpack_border_body(struct AtomVecBody::Bonus *, double *); void data_body(int, int, int, char **, char **); int noutrow(int); diff --git a/src/DIPOLE/atom_vec_dipole.h b/src/DIPOLE/atom_vec_dipole.h index abe7db9899..a8126a8723 100644 --- a/src/DIPOLE/atom_vec_dipole.h +++ b/src/DIPOLE/atom_vec_dipole.h @@ -63,7 +63,7 @@ class AtomVecDipole : public AtomVec { int *type,*mask; imageint *image; double **x,**v,**f; - double *q,**mu,**omega,**torque; + double *q,**mu; }; } diff --git a/src/KSPACE/pppm_disp.cpp b/src/KSPACE/pppm_disp.cpp index 250f26c3a1..6d8d604f5c 100755 --- a/src/KSPACE/pppm_disp.cpp +++ b/src/KSPACE/pppm_disp.cpp @@ -263,7 +263,7 @@ void PPPMDisp::init() memset(function, 0, EWALD_FUNCS*sizeof(int)); for (int i=0; i<=EWALD_MAXORDER; ++i) // transcribe order if (ewald_order&(1< 1.0e-4) { char str[128]; - sprintf(str,"Error in splitting of dispersion coeffs is estimated %g%",err); + sprintf(str,"Error in splitting of dispersion coeffs is estimated %g",err); error->warning(FLERR, str); } // set B @@ -3986,7 +3986,8 @@ void PPPMDisp::compute_sf_coeff() sf_coeff[2] += sf_precoeff3[n]*greensfn[n]; sf_coeff[3] += sf_precoeff4[n]*greensfn[n]; sf_coeff[4] += sf_precoeff5[n]*greensfn[n]; - sf_coeff[5] += sf_precoeff6[n]*greensfn[n++]; + sf_coeff[5] += sf_precoeff6[n]*greensfn[n]; + ++n; } } } @@ -4042,7 +4043,8 @@ void PPPMDisp::compute_sf_coeff_6() sf_coeff_6[2] += sf_precoeff3_6[n]*greensfn_6[n]; sf_coeff_6[3] += sf_precoeff4_6[n]*greensfn_6[n]; sf_coeff_6[4] += sf_precoeff5_6[n]*greensfn_6[n]; - sf_coeff_6[5] += sf_precoeff6_6[n]*greensfn_6[n++]; + sf_coeff_6[5] += sf_precoeff6_6[n]*greensfn_6[n]; + ++n; } } } diff --git a/src/MISC/fix_efield.h b/src/MISC/fix_efield.h index 66f6074cf1..5bd1863019 100644 --- a/src/MISC/fix_efield.h +++ b/src/MISC/fix_efield.h @@ -47,7 +47,6 @@ class FixEfield : public Fix { int xvar,yvar,zvar,evar,xstyle,ystyle,zstyle,estyle; int nlevels_respa; double qe2f; - double fdotx; int qflag,muflag; int maxatom; diff --git a/src/MISC/fix_orient_fcc.cpp b/src/MISC/fix_orient_fcc.cpp index 722dc04854..bdf5cb4e05 100644 --- a/src/MISC/fix_orient_fcc.cpp +++ b/src/MISC/fix_orient_fcc.cpp @@ -495,7 +495,7 @@ int FixOrientFCC::pack_comm(int n, int *list, double *buf, buf[m++] = nbr[k].duxi; for (j = 0; j < num; j++) { - if (use_xismooth) buf[m++] = nbr[m].xismooth[j]; + if (use_xismooth) buf[m++] = nbr[k].xismooth[j]; buf[m++] = nbr[k].dxi[j][0]; buf[m++] = nbr[k].dxi[j][1]; buf[m++] = nbr[k].dxi[j][2]; diff --git a/src/PERI/atom_vec_peri.h b/src/PERI/atom_vec_peri.h index c3a1252d1a..d33d99d4fb 100755 --- a/src/PERI/atom_vec_peri.h +++ b/src/PERI/atom_vec_peri.h @@ -63,7 +63,7 @@ class AtomVecPeri : public AtomVec { int *type,*mask; imageint *image; double **x,**v,**f; - double *vfrac,*density,*rmass,*s0,**x0; + double *vfrac,*rmass,*s0,**x0; }; } diff --git a/src/USER-LB/fix_lb_fluid.cpp b/src/USER-LB/fix_lb_fluid.cpp index e587c502e4..e5680ccf1e 100755 --- a/src/USER-LB/fix_lb_fluid.cpp +++ b/src/USER-LB/fix_lb_fluid.cpp @@ -1290,7 +1290,7 @@ void FixLbFluid::write_restartfile(void) char *hfile; hfile = new char[32]; - sprintf(hfile,"FluidRestart_%d.dat",update->ntimestep); + sprintf(hfile,"FluidRestart_" BIGINT_FORMAT ".dat",update->ntimestep); MPI_File_open(world,hfile,MPI_MODE_WRONLY | MPI_MODE_CREATE, MPI_INFO_NULL,&fh); diff --git a/src/USER-OMP/dihedral_class2_omp.cpp b/src/USER-OMP/dihedral_class2_omp.cpp index bc559ac36b..701f8720cc 100644 --- a/src/USER-OMP/dihedral_class2_omp.cpp +++ b/src/USER-OMP/dihedral_class2_omp.cpp @@ -184,7 +184,9 @@ void DihedralClass2OMP::eval(int nfrom, int nto, ThrData * const thr) if (screen) { char str[128]; - sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " %d %d %d %d", + sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " " + TAGINT_FORMAT " " TAGINT_FORMAT " " + TAGINT_FORMAT " " TAGINT_FORMAT, me,thr->get_tid(),update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); error->warning(FLERR,str,0); diff --git a/src/USER-OMP/dihedral_fourier_omp.cpp b/src/USER-OMP/dihedral_fourier_omp.cpp index 04b9784942..ef43313856 100644 --- a/src/USER-OMP/dihedral_fourier_omp.cpp +++ b/src/USER-OMP/dihedral_fourier_omp.cpp @@ -156,7 +156,9 @@ void DihedralFourierOMP::eval(int nfrom, int nto, ThrData * const thr) if (screen) { char str[128]; - sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " %d %d %d %d", + sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " " + TAGINT_FORMAT " " TAGINT_FORMAT " " + TAGINT_FORMAT " " TAGINT_FORMAT, me,thr->get_tid(),update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); error->warning(FLERR,str,0); diff --git a/src/USER-OMP/dihedral_helix_omp.cpp b/src/USER-OMP/dihedral_helix_omp.cpp index 2252d577c6..fdffeecdce 100644 --- a/src/USER-OMP/dihedral_helix_omp.cpp +++ b/src/USER-OMP/dihedral_helix_omp.cpp @@ -190,7 +190,9 @@ void DihedralHelixOMP::eval(int nfrom, int nto, ThrData * const thr) if (screen) { char str[128]; - sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " %d %d %d %d", + sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " " + TAGINT_FORMAT " " TAGINT_FORMAT " " + TAGINT_FORMAT " " TAGINT_FORMAT, me,thr->get_tid(),update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); error->warning(FLERR,str,0); diff --git a/src/USER-OMP/dihedral_nharmonic_omp.cpp b/src/USER-OMP/dihedral_nharmonic_omp.cpp index b924673855..51a3f1b752 100644 --- a/src/USER-OMP/dihedral_nharmonic_omp.cpp +++ b/src/USER-OMP/dihedral_nharmonic_omp.cpp @@ -180,7 +180,9 @@ void DihedralNHarmonicOMP::eval(int nfrom, int nto, ThrData * const thr) if (screen) { char str[128]; - sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " %d %d %d %d", + sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " " + TAGINT_FORMAT " " TAGINT_FORMAT " " + TAGINT_FORMAT " " TAGINT_FORMAT, me,thr->get_tid(),update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); error->warning(FLERR,str,0); diff --git a/src/USER-OMP/dihedral_quadratic_omp.cpp b/src/USER-OMP/dihedral_quadratic_omp.cpp index d50a891def..067b7bf4e2 100644 --- a/src/USER-OMP/dihedral_quadratic_omp.cpp +++ b/src/USER-OMP/dihedral_quadratic_omp.cpp @@ -187,7 +187,9 @@ void DihedralQuadraticOMP::eval(int nfrom, int nto, ThrData * const thr) if (screen) { char str[128]; - sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " %d %d %d %d", + sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " " + TAGINT_FORMAT " " TAGINT_FORMAT " " + TAGINT_FORMAT " " TAGINT_FORMAT, me,thr->get_tid(),update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); error->warning(FLERR,str,0); diff --git a/src/USER-OMP/improper_class2_omp.cpp b/src/USER-OMP/improper_class2_omp.cpp index 82f7f841f7..d9e90218c0 100644 --- a/src/USER-OMP/improper_class2_omp.cpp +++ b/src/USER-OMP/improper_class2_omp.cpp @@ -168,8 +168,9 @@ void ImproperClass2OMP::eval(int nfrom, int nto, ThrData * const thr) int me = comm->me; if (screen) { char str[128]; - sprintf(str, - "Improper problem: %d/%d " BIGINT_FORMAT " %d %d %d %d", + sprintf(str,"Improper problem: %d/%d " BIGINT_FORMAT " " + TAGINT_FORMAT " " TAGINT_FORMAT " " + TAGINT_FORMAT " " TAGINT_FORMAT, me, thr->get_tid(),update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); error->warning(FLERR,str,0); diff --git a/src/USER-OMP/improper_cvff_omp.cpp b/src/USER-OMP/improper_cvff_omp.cpp index 25d349c079..a082a0d7bc 100644 --- a/src/USER-OMP/improper_cvff_omp.cpp +++ b/src/USER-OMP/improper_cvff_omp.cpp @@ -177,9 +177,12 @@ void ImproperCvffOMP::eval(int nfrom, int nto, ThrData * const thr) if (screen) { char str[128]; - sprintf(str,"Improper problem: %d/%d " BIGINT_FORMAT " %d %d %d %d", + sprintf(str,"Improper problem: %d/%d " BIGINT_FORMAT " " + TAGINT_FORMAT " " TAGINT_FORMAT " " + TAGINT_FORMAT " " TAGINT_FORMAT, me,thr->get_tid(),update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); + error->warning(FLERR,str,0); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1].x,x[i1].y,x[i1].z); diff --git a/src/USER-OMP/improper_harmonic_omp.cpp b/src/USER-OMP/improper_harmonic_omp.cpp index 047de25c07..3104322ca8 100644 --- a/src/USER-OMP/improper_harmonic_omp.cpp +++ b/src/USER-OMP/improper_harmonic_omp.cpp @@ -150,7 +150,9 @@ void ImproperHarmonicOMP::eval(int nfrom, int nto, ThrData * const thr) if (screen) { char str[128]; - sprintf(str,"Improper problem: %d/%d " BIGINT_FORMAT " %d %d %d %d", + sprintf(str,"Improper problem: %d/%d " BIGINT_FORMAT " " + TAGINT_FORMAT " " TAGINT_FORMAT " " + TAGINT_FORMAT " " TAGINT_FORMAT, me,thr->get_tid(),update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); error->warning(FLERR,str,0); diff --git a/src/USER-REAXC/fix_reaxc_bonds.cpp b/src/USER-REAXC/fix_reaxc_bonds.cpp index 8d8818a49b..4d67378153 100644 --- a/src/USER-REAXC/fix_reaxc_bonds.cpp +++ b/src/USER-REAXC/fix_reaxc_bonds.cpp @@ -294,7 +294,7 @@ void FixReaxCBonds::RecvBuffer(double *buf, int nbuf, int nbuf_local, for (k = 5; k < 5+numbonds; k++) { jtag = static_cast (buf[j+k]); - fprintf(fp," %d",jtag); + fprintf(fp," " TAGINT_FORMAT,jtag); } j += (5+numbonds); diff --git a/src/USER-REAXC/fix_reaxc_species.h b/src/USER-REAXC/fix_reaxc_species.h index 12c0aa98c5..6690f4be83 100644 --- a/src/USER-REAXC/fix_reaxc_species.h +++ b/src/USER-REAXC/fix_reaxc_species.h @@ -48,7 +48,6 @@ class FixReaxCSpecies : public Fix { private: int me, nprocs, nmax, nlocal, ntypes, ntotal; - bigint natoms; int nrepeat, nfreq, posfreq; int Nmoltype, vector_nmole, vector_nspec; int *Name, *MolName, *NMol, *nd, *MolType, *molmap; diff --git a/src/fix_nve_limit.h b/src/fix_nve_limit.h index aea1718f39..0269d49b9d 100644 --- a/src/fix_nve_limit.h +++ b/src/fix_nve_limit.h @@ -39,7 +39,7 @@ class FixNVELimit : public Fix { private: double dtv,dtf; double *step_respa; - int mass_require,ncount; + int ncount; double xlimit,vlimitsq; }; diff --git a/src/fix_property_atom.cpp b/src/fix_property_atom.cpp index 115750e271..0c573fba10 100644 --- a/src/fix_property_atom.cpp +++ b/src/fix_property_atom.cpp @@ -525,8 +525,8 @@ int FixPropertyAtom::pack_restart(int i, double *buf) for (int j = 0; j < nvalue; j++) { if (style[j] == MOLECULE) buf[m++] = ubuf(atom->molecule[i]).d; else if (style[j] == CHARGE) buf[m++] = atom->q[i]; - else if (style[j] == INTEGER) buf[m++] = ubuf(atom->ivector[index[m]][i]).d; - else if (style[j] == DOUBLE) buf[m++] = atom->dvector[index[m]][i]; + else if (style[j] == INTEGER) buf[m++] = ubuf(atom->ivector[index[j]][i]).d; + else if (style[j] == DOUBLE) buf[m++] = atom->dvector[index[j]][i]; } return nvalue+1; @@ -552,9 +552,9 @@ void FixPropertyAtom::unpack_restart(int nlocal, int nth) else if (style[i] == CHARGE) atom->q[nlocal] = extra[nlocal][m++]; else if (style[i] == INTEGER) - atom->ivector[index[m]][nlocal] = (int) ubuf(extra[nlocal][m++]).i; + atom->ivector[index[i]][nlocal] = (int) ubuf(extra[nlocal][m++]).i; else if (style[i] == DOUBLE) - atom->dvector[index[m]][nlocal] = extra[nlocal][m++]; + atom->dvector[index[i]][nlocal] = extra[nlocal][m++]; } }