diff --git a/doc/.gitignore b/doc/.gitignore index 7d30949237..b20157057c 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -1,4 +1,5 @@ /html +/latex /spelling /LAMMPS.epub /LAMMPS.mobi diff --git a/doc/src/Install_windows.txt b/doc/src/Install_windows.txt index 78de4f09f7..7d5aab34f5 100644 --- a/doc/src/Install_windows.txt +++ b/doc/src/Install_windows.txt @@ -12,7 +12,7 @@ Download an executable for Windows :h3 Pre-compiled Windows installers which install LAMMPS executables on a Windows system can be downloaded from this site: -"http://rpm.lammps.org/windows.html"_http://rpm.lammps.org/windows.html +"http://packages.lammps.org/windows.html"_http://packages.lammps.org/windows.html Note that each installer package has a date in its name, which corresponds to the LAMMPS version of the same date. Installers for diff --git a/doc/src/Manual.txt b/doc/src/Manual.txt index b477ce9cf0..f5c6f914c7 100644 --- a/doc/src/Manual.txt +++ b/doc/src/Manual.txt @@ -37,27 +37,21 @@ LAMMPS is an open-source code, distributed freely under the terms of the GNU Public License (GPL). The "LAMMPS website"_lws has a variety of information about the code. -It includes links to an on-line version of this manual, a "mail +It includes links to an on-line version of this manual, a "mailing list"_http://lammps.sandia.gov/mail.html where users can post -questions, and a "GitHub site"https://github.com/lammps/lammps where +questions, and a "GitHub site"_https://github.com/lammps/lammps where all LAMMPS development is coordinated. :line -"PDF file"_Manual.pdf of the entire manual, generated by -"htmldoc"_http://freecode.com/projects/htmldoc - The content for this manual is part of the LAMMPS distribution. You can build a local copy of the Manual as HTML pages or a PDF file, by following the steps on the "Manual build"_Manual_build.html doc page. - There is also a "Developer.pdf"_Developer.pdf document which gives a brief description of the basic code structure of LAMMPS. :line -This manual is organized into the following sections. - Once you are familiar with LAMMPS, you may want to bookmark "this page"_Commands.html since it gives quick access to a doc page for every LAMMPS command. diff --git a/doc/utils/sphinx-config/conf.py b/doc/utils/sphinx-config/conf.py index 3056687ff8..8a8b887a5e 100644 --- a/doc/utils/sphinx-config/conf.py +++ b/doc/utils/sphinx-config/conf.py @@ -219,7 +219,7 @@ latex_elements = { # author, documentclass [howto, manual, or own class]). latex_documents = [ ('Manual', 'LAMMPS.tex', 'LAMMPS Documentation', - 'Steve Plimpton', 'manual'), + 'The LAMMPS Developers', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of diff --git a/src/BODY/fix_wall_body_polygon.cpp b/src/BODY/fix_wall_body_polygon.cpp index 0c9bd3e741..221937461b 100644 --- a/src/BODY/fix_wall_body_polygon.cpp +++ b/src/BODY/fix_wall_body_polygon.cpp @@ -206,7 +206,7 @@ void FixWallBodyPolygon::setup(int vflag) void FixWallBodyPolygon::post_force(int /*vflag*/) { - double vwall[3],dx,dy,dz,del1,del2,delxy,delr,rsq,eradi,rradi,wall_pos; + double vwall[3],dx,dy,dz,del1,del2,delxy,delr,rsq,eradi,wall_pos; int i,ni,npi,ifirst,nei,iefirst,side; double facc[3]; @@ -316,7 +316,6 @@ void FixWallBodyPolygon::post_force(int /*vflag*/) nei = ednum[i]; iefirst = edfirst[i]; eradi = enclosing_radius[i]; - rradi = rounded_radius[i]; // reset vertex and edge forces @@ -332,14 +331,14 @@ void FixWallBodyPolygon::post_force(int /*vflag*/) edge[iefirst+ni][4] = 0; } - int interact, num_contacts, done; + int num_contacts, done; double delta_a, delta_ua, j_a; Contact contact_list[MAX_CONTACTS]; num_contacts = 0; facc[0] = facc[1] = facc[2] = 0; - interact = vertex_against_wall(i, wall_pos, x, f, torque, side, - contact_list, num_contacts, facc); + vertex_against_wall(i, wall_pos, x, f, torque, side, + contact_list, num_contacts, facc); if (num_contacts >= 2) { @@ -475,12 +474,11 @@ int FixWallBodyPolygon::vertex_against_wall(int i, double wall_pos, Contact* contact_list, int &num_contacts, double* /*facc*/) { int ni, npi, ifirst, interact; - double xpi[3], eradi, rradi; + double xpi[3], rradi; double fx, fy, fz; npi = dnum[i]; ifirst = dfirst[i]; - eradi = enclosing_radius[i]; rradi = rounded_radius[i]; interact = 0; diff --git a/src/BODY/fix_wall_body_polyhedron.cpp b/src/BODY/fix_wall_body_polyhedron.cpp index 295608a444..24a9e51dad 100644 --- a/src/BODY/fix_wall_body_polyhedron.cpp +++ b/src/BODY/fix_wall_body_polyhedron.cpp @@ -213,8 +213,8 @@ void FixWallBodyPolyhedron::setup(int vflag) void FixWallBodyPolyhedron::post_force(int /*vflag*/) { - double vwall[3],dx,dy,dz,del1,del2,rsq,eradi,rradi,wall_pos; - int i,ni,npi,ifirst,nei,iefirst,nfi,iffirst,side; + double vwall[3],dx,dy,dz,del1,del2,rsq,wall_pos; + int i,ni,npi,ifirst,nei,iefirst,side; double facc[3]; // set position of wall to initial settings and velocity to 0.0 @@ -330,10 +330,6 @@ void FixWallBodyPolyhedron::post_force(int /*vflag*/) ifirst = dfirst[i]; nei = ednum[i]; iefirst = edfirst[i]; - nfi = facnum[i]; - iffirst = facfirst[i]; - eradi = enclosing_radius[i]; - rradi = rounded_radius[i]; if (npi == 1) { sphere_against_wall(i, wall_pos, side, vwall, x, v, f, angmom, torque); @@ -356,13 +352,13 @@ void FixWallBodyPolyhedron::post_force(int /*vflag*/) edge[iefirst+ni][5] = 0; } - int interact, num_contacts; + int num_contacts; Contact contact_list[MAX_CONTACTS]; num_contacts = 0; facc[0] = facc[1] = facc[2] = 0; - interact = edge_against_wall(i, wall_pos, side, vwall, x, f, torque, - contact_list, num_contacts, facc); + edge_against_wall(i, wall_pos, side, vwall, x, f, torque, + contact_list, num_contacts, facc); } // group bit } @@ -544,7 +540,7 @@ int FixWallBodyPolyhedron::edge_against_wall(int i, double wall_pos, int side, double* vwall, double** x, double** /*f*/, double** /*torque*/, Contact* /*contact_list*/, int &/*num_contacts*/, double* /*facc*/) { - int ni, nei, mode, contact; + int ni, nei, contact; double rradi; nei = ednum[i]; @@ -555,8 +551,7 @@ int FixWallBodyPolyhedron::edge_against_wall(int i, double wall_pos, // loop through body i's edges for (ni = 0; ni < nei; ni++) - mode = compute_distance_to_wall(i, ni, x[i], rradi, wall_pos, side, vwall, - contact); + compute_distance_to_wall(i, ni, x[i], rradi, wall_pos, side, vwall, contact); return contact; } diff --git a/src/GPU/pair_born_coul_long_cs_gpu.cpp b/src/GPU/pair_born_coul_long_cs_gpu.cpp index 13cf5f643a..587c7b5215 100644 --- a/src/GPU/pair_born_coul_long_cs_gpu.cpp +++ b/src/GPU/pair_born_coul_long_cs_gpu.cpp @@ -212,8 +212,8 @@ double PairBornCoulLongCSGPU::memory_usage() /* ---------------------------------------------------------------------- */ void PairBornCoulLongCSGPU::cpu_compute(int start, int inum, int eflag, - int vflag, int *ilist, int *numneigh, - int **firstneigh) + int /* vflag */, int *ilist, + int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itable,itype,jtype; double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair; diff --git a/src/GPU/pair_born_coul_long_gpu.cpp b/src/GPU/pair_born_coul_long_gpu.cpp index c3c3fee40c..1549ed79af 100644 --- a/src/GPU/pair_born_coul_long_gpu.cpp +++ b/src/GPU/pair_born_coul_long_gpu.cpp @@ -207,8 +207,8 @@ double PairBornCoulLongGPU::memory_usage() /* ---------------------------------------------------------------------- */ void PairBornCoulLongGPU::cpu_compute(int start, int inum, int eflag, - int vflag, int *ilist, int *numneigh, - int **firstneigh) + int /* vflag */, int *ilist, + int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype; double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair; diff --git a/src/GPU/pair_born_coul_wolf_cs_gpu.cpp b/src/GPU/pair_born_coul_wolf_cs_gpu.cpp index 90ddf825a9..bf23007bca 100644 --- a/src/GPU/pair_born_coul_wolf_cs_gpu.cpp +++ b/src/GPU/pair_born_coul_wolf_cs_gpu.cpp @@ -193,9 +193,9 @@ double PairBornCoulWolfCSGPU::memory_usage() /* ---------------------------------------------------------------------- */ -void PairBornCoulWolfCSGPU::cpu_compute(int start, int inum, int eflag, int vflag, - int *ilist, int *numneigh, - int **firstneigh) { +void PairBornCoulWolfCSGPU::cpu_compute(int start, int inum, int eflag, + int /* vflag */, int *ilist, + int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype; double xtmp,ytmp,ztmp,qtmp,delx,dely,delz,evdwl,ecoul,fpair; double rsq,r2inv,r6inv,forcecoul,forceborn,factor_coul,factor_lj; diff --git a/src/GPU/pair_buck_coul_long_gpu.cpp b/src/GPU/pair_buck_coul_long_gpu.cpp index 73821cee8a..a2d14ea25f 100644 --- a/src/GPU/pair_buck_coul_long_gpu.cpp +++ b/src/GPU/pair_buck_coul_long_gpu.cpp @@ -201,8 +201,8 @@ double PairBuckCoulLongGPU::memory_usage() /* ---------------------------------------------------------------------- */ void PairBuckCoulLongGPU::cpu_compute(int start, int inum, int eflag, - int vflag, int *ilist, int *numneigh, - int **firstneigh) + int /* vflag */, int *ilist, + int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype; double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair; diff --git a/src/GPU/pair_colloid_gpu.cpp b/src/GPU/pair_colloid_gpu.cpp index 7bbac32ed3..03e5aac5d5 100644 --- a/src/GPU/pair_colloid_gpu.cpp +++ b/src/GPU/pair_colloid_gpu.cpp @@ -184,8 +184,9 @@ double PairColloidGPU::memory_usage() /* ---------------------------------------------------------------------- */ -void PairColloidGPU::cpu_compute(int start, int inum, int eflag, int vflag, - int *ilist, int *numneigh, int **firstneigh) +void PairColloidGPU::cpu_compute(int start, int inum, int eflag, + int /* vflag */, int *ilist, + int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; diff --git a/src/GPU/pair_coul_long_cs_gpu.cpp b/src/GPU/pair_coul_long_cs_gpu.cpp index cbb9c73ceb..be2a090786 100644 --- a/src/GPU/pair_coul_long_cs_gpu.cpp +++ b/src/GPU/pair_coul_long_cs_gpu.cpp @@ -153,7 +153,7 @@ void PairCoulLongCSGPU::init_style() for (int i = 1; i <= atom->ntypes; i++) { for (int j = i; j <= atom->ntypes; j++) { if (setflag[i][j] != 0 || (setflag[i][i] != 0 && setflag[j][j] != 0)) { - double cut = init_one(i,j); + init_one(i,j); } } } @@ -208,8 +208,8 @@ double PairCoulLongCSGPU::memory_usage() /* ---------------------------------------------------------------------- */ void PairCoulLongCSGPU::cpu_compute(int start, int inum, int eflag, - int vflag, int *ilist, int *numneigh, - int **firstneigh) + int /* vflag */, int *ilist, + int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itable,itype,jtype; double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,ecoul,fpair; diff --git a/src/GPU/pair_coul_long_gpu.cpp b/src/GPU/pair_coul_long_gpu.cpp index 2f12e41b0c..684b0049c0 100644 --- a/src/GPU/pair_coul_long_gpu.cpp +++ b/src/GPU/pair_coul_long_gpu.cpp @@ -148,7 +148,7 @@ void PairCoulLongGPU::init_style() for (int i = 1; i <= atom->ntypes; i++) { for (int j = i; j <= atom->ntypes; j++) { if (setflag[i][j] != 0 || (setflag[i][i] != 0 && setflag[j][j] != 0)) { - double cut = init_one(i,j); + init_one(i,j); } } } @@ -203,8 +203,8 @@ double PairCoulLongGPU::memory_usage() /* ---------------------------------------------------------------------- */ void PairCoulLongGPU::cpu_compute(int start, int inum, int eflag, - int vflag, int *ilist, int *numneigh, - int **firstneigh) + int /* vflag */, int *ilist, + int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itable; double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,ecoul,fpair; diff --git a/src/GPU/pair_eam_alloy_gpu.cpp b/src/GPU/pair_eam_alloy_gpu.cpp index 11af562f15..20bf6dc50d 100644 --- a/src/GPU/pair_eam_alloy_gpu.cpp +++ b/src/GPU/pair_eam_alloy_gpu.cpp @@ -192,8 +192,8 @@ void PairEAMAlloyGPU::init_style() /* ---------------------------------------------------------------------- */ double PairEAMAlloyGPU::single(int i, int j, int itype, int jtype, - double rsq, double factor_coul, double factor_lj, - double &fforce) + double rsq, double /* factor_coul */, + double /* factor_lj */, double &fforce) { int m; double r,p,rhoip,rhojp,z2,z2p,recip,phi,phip,psip; @@ -235,7 +235,7 @@ double PairEAMAlloyGPU::single(int i, int j, int itype, int jtype, /* ---------------------------------------------------------------------- */ int PairEAMAlloyGPU::pack_forward_comm(int n, int *list, double *buf, - int pbc_flag,int *pbc) + int /* pbc_flag */, int * /* pbc */) { int i,j,m; diff --git a/src/GPU/pair_eam_fs_gpu.cpp b/src/GPU/pair_eam_fs_gpu.cpp index ef8dd09e23..821bb1af1c 100644 --- a/src/GPU/pair_eam_fs_gpu.cpp +++ b/src/GPU/pair_eam_fs_gpu.cpp @@ -192,8 +192,8 @@ void PairEAMFSGPU::init_style() /* ---------------------------------------------------------------------- */ double PairEAMFSGPU::single(int i, int j, int itype, int jtype, - double rsq, double factor_coul, double factor_lj, - double &fforce) + double rsq, double /* factor_coul */, + double /* factor_lj */, double &fforce) { int m; double r,p,rhoip,rhojp,z2,z2p,recip,phi,phip,psip; @@ -235,7 +235,7 @@ double PairEAMFSGPU::single(int i, int j, int itype, int jtype, /* ---------------------------------------------------------------------- */ int PairEAMFSGPU::pack_forward_comm(int n, int *list, double *buf, - int pbc_flag,int *pbc) + int /* pbc_flag */, int * /* pbc */) { int i,j,m; diff --git a/src/GPU/pair_eam_gpu.cpp b/src/GPU/pair_eam_gpu.cpp index e2eb9daced..515a349ad2 100644 --- a/src/GPU/pair_eam_gpu.cpp +++ b/src/GPU/pair_eam_gpu.cpp @@ -195,8 +195,8 @@ void PairEAMGPU::init_style() /* ---------------------------------------------------------------------- */ double PairEAMGPU::single(int i, int j, int itype, int jtype, - double rsq, double factor_coul, double factor_lj, - double &fforce) + double rsq, double /* factor_coul */, + double /* factor_lj */, double &fforce) { int m; double r,p,rhoip,rhojp,z2,z2p,recip,phi,phip,psip; @@ -238,7 +238,7 @@ double PairEAMGPU::single(int i, int j, int itype, int jtype, /* ---------------------------------------------------------------------- */ int PairEAMGPU::pack_forward_comm(int n, int *list, double *buf, - int pbc_flag,int *pbc) + int /* pbc_flag */, int * /* pbc */) { int i,j,m; diff --git a/src/GPU/pair_gayberne_gpu.cpp b/src/GPU/pair_gayberne_gpu.cpp index 8bd5eb073f..32b8b979cd 100644 --- a/src/GPU/pair_gayberne_gpu.cpp +++ b/src/GPU/pair_gayberne_gpu.cpp @@ -221,8 +221,9 @@ double PairGayBerneGPU::memory_usage() /* ---------------------------------------------------------------------- */ -void PairGayBerneGPU::cpu_compute(int start, int inum, int eflag, int vflag, - int *ilist, int *numneigh, int **firstneigh) +void PairGayBerneGPU::cpu_compute(int start, int inum, int eflag, + int /* vflag */, int *ilist, + int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype; double evdwl,one_eng,rsq,r2inv,r6inv,forcelj,factor_lj; diff --git a/src/GPU/pair_lj_charmm_coul_long_gpu.cpp b/src/GPU/pair_lj_charmm_coul_long_gpu.cpp index 8c806053d4..ebc9f88943 100644 --- a/src/GPU/pair_lj_charmm_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_charmm_coul_long_gpu.cpp @@ -151,11 +151,10 @@ void PairLJCharmmCoulLongGPU::init_style() // Repeat cutsq calculation because done after call to init_style - double cut; for (int i = 1; i <= atom->ntypes; i++) { for (int j = i; j <= atom->ntypes; j++) { if (setflag[i][j] != 0 || (setflag[i][i] != 0 && setflag[j][j] != 0)) - cut = init_one(i,j); + init_one(i,j); } } @@ -219,7 +218,7 @@ double PairLJCharmmCoulLongGPU::memory_usage() /* ---------------------------------------------------------------------- */ void PairLJCharmmCoulLongGPU::cpu_compute(int start, int inum, int eflag, - int vflag, int *ilist, + int /* vflag */, int *ilist, int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype,itable; diff --git a/src/GPU/pair_lj_class2_coul_long_gpu.cpp b/src/GPU/pair_lj_class2_coul_long_gpu.cpp index 214ff306db..797680c032 100644 --- a/src/GPU/pair_lj_class2_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_class2_coul_long_gpu.cpp @@ -197,8 +197,8 @@ double PairLJClass2CoulLongGPU::memory_usage() /* ---------------------------------------------------------------------- */ void PairLJClass2CoulLongGPU::cpu_compute(int start, int inum, int eflag, - int vflag, int *ilist, int *numneigh, - int **firstneigh) + int /* vflag */, int *ilist, + int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype; double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair; diff --git a/src/GPU/pair_lj_cut_coul_long_gpu.cpp b/src/GPU/pair_lj_cut_coul_long_gpu.cpp index 3cccb898cc..943d12b0fe 100644 --- a/src/GPU/pair_lj_cut_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_long_gpu.cpp @@ -215,8 +215,8 @@ double PairLJCutCoulLongGPU::memory_usage() /* ---------------------------------------------------------------------- */ void PairLJCutCoulLongGPU::cpu_compute(int start, int inum, int eflag, - int vflag, int *ilist, int *numneigh, - int **firstneigh) + int /* vflag */, int *ilist, + int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype,itable; double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair; diff --git a/src/GPU/pair_lj_cut_coul_msm_gpu.cpp b/src/GPU/pair_lj_cut_coul_msm_gpu.cpp index 04ffe245b2..46cf6f19bc 100644 --- a/src/GPU/pair_lj_cut_coul_msm_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_msm_gpu.cpp @@ -192,8 +192,9 @@ double PairLJCutCoulMSMGPU::memory_usage() /* ---------------------------------------------------------------------- */ -void PairLJCutCoulMSMGPU::cpu_compute(int start, int inum, int eflag, int vflag, - int *ilist, int *numneigh, int **firstneigh) { +void PairLJCutCoulMSMGPU::cpu_compute(int start, int inum, int eflag, + int /* vflag */, int *ilist, + int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype,itable; double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair; double fraction,table; diff --git a/src/GPU/pair_lj_cut_dipole_long_gpu.cpp b/src/GPU/pair_lj_cut_dipole_long_gpu.cpp index 870dc8ba6d..b209fa0ee7 100644 --- a/src/GPU/pair_lj_cut_dipole_long_gpu.cpp +++ b/src/GPU/pair_lj_cut_dipole_long_gpu.cpp @@ -216,7 +216,7 @@ void PairLJCutDipoleLongGPU::cpu_compute(int start, int inum, int eflag, int vfl double qtmp,xtmp,ytmp,ztmp,delx,dely,delz; double rsq,r,rinv,r2inv,r6inv; double forcecoulx,forcecouly,forcecoulz,fforce; - double tixcoul,tiycoul,tizcoul,tjxcoul,tjycoul,tjzcoul; + double tixcoul,tiycoul,tizcoul; double fx,fy,fz,fdx,fdy,fdz,fax,fay,faz; double pdotp,pidotr,pjdotr,pre1,pre2,pre3; double grij,expm2,t,erfc; @@ -378,14 +378,9 @@ void PairLJCutDipoleLongGPU::cpu_compute(int start, int inum, int eflag, int vfl tixcoul = mu[i][1]*(zdiz + zaiz) - mu[i][2]*(zdiy + zaiy); tiycoul = mu[i][2]*(zdix + zaix) - mu[i][0]*(zdiz + zaiz); tizcoul = mu[i][0]*(zdiy + zaiy) - mu[i][1]*(zdix + zaix); - tjxcoul = mu[j][1]*(zdjz + zajz) - mu[j][2]*(zdjy + zajy); - tjycoul = mu[j][2]*(zdjx + zajx) - mu[j][0]*(zdjz + zajz); - tjzcoul = mu[j][0]*(zdjy + zajy) - mu[j][1]*(zdjx + zajx); - } else { forcecoulx = forcecouly = forcecoulz = 0.0; tixcoul = tiycoul = tizcoul = 0.0; - tjxcoul = tjycoul = tjzcoul = 0.0; } // LJ interaction diff --git a/src/GPU/pair_lj_expand_coul_long_gpu.cpp b/src/GPU/pair_lj_expand_coul_long_gpu.cpp index 49e8be5879..4161155980 100644 --- a/src/GPU/pair_lj_expand_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_expand_coul_long_gpu.cpp @@ -215,8 +215,8 @@ double PairLJExpandCoulLongGPU::memory_usage() /* ---------------------------------------------------------------------- */ void PairLJExpandCoulLongGPU::cpu_compute(int start, int inum, int eflag, - int vflag, int *ilist, int *numneigh, - int **firstneigh) + int /* vflag */, int *ilist, + int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype,itable; double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair; diff --git a/src/GPU/pair_mie_cut_gpu.cpp b/src/GPU/pair_mie_cut_gpu.cpp index 5919b05466..e52577ee4c 100644 --- a/src/GPU/pair_mie_cut_gpu.cpp +++ b/src/GPU/pair_mie_cut_gpu.cpp @@ -172,8 +172,8 @@ double PairMIECutGPU::memory_usage() /* ---------------------------------------------------------------------- */ -void PairMIECutGPU::cpu_compute(int start, int inum, int eflag, int vflag, - int *ilist, int *numneigh, int **firstneigh) { +void PairMIECutGPU::cpu_compute(int start, int inum, int eflag, int /* vflag */, + int *ilist, int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; double rsq,r2inv,rgamR,rgamA,forcemie,factor_mie; diff --git a/src/GPU/pair_morse_gpu.cpp b/src/GPU/pair_morse_gpu.cpp index 81ea7c818a..7abf78ff30 100644 --- a/src/GPU/pair_morse_gpu.cpp +++ b/src/GPU/pair_morse_gpu.cpp @@ -168,7 +168,7 @@ double PairMorseGPU::memory_usage() /* ---------------------------------------------------------------------- */ -void PairMorseGPU::cpu_compute(int start, int inum, int eflag, int vflag, +void PairMorseGPU::cpu_compute(int start, int inum, int eflag, int /* vflag */, int *ilist, int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype; diff --git a/src/GPU/pair_resquared_gpu.cpp b/src/GPU/pair_resquared_gpu.cpp index 34bd0ec22f..b6fada0897 100644 --- a/src/GPU/pair_resquared_gpu.cpp +++ b/src/GPU/pair_resquared_gpu.cpp @@ -219,8 +219,9 @@ double PairRESquaredGPU::memory_usage() /* ---------------------------------------------------------------------- */ -void PairRESquaredGPU::cpu_compute(int start, int inum, int eflag, int vflag, - int *ilist, int *numneigh, int **firstneigh) +void PairRESquaredGPU::cpu_compute(int start, int inum, int eflag, + int /* vflag */, int *ilist, + int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype; double evdwl,one_eng,rsq,r2inv,r6inv,forcelj,factor_lj; diff --git a/src/GPU/pair_soft_gpu.cpp b/src/GPU/pair_soft_gpu.cpp index cc0ea72633..eed1bd5db3 100644 --- a/src/GPU/pair_soft_gpu.cpp +++ b/src/GPU/pair_soft_gpu.cpp @@ -182,8 +182,8 @@ double PairSoftGPU::memory_usage() /* ---------------------------------------------------------------------- */ -void PairSoftGPU::cpu_compute(int start, int inum, int eflag, int vflag, - int *ilist, int *numneigh, int **firstneigh) { +void PairSoftGPU::cpu_compute(int start, int inum, int eflag, int /* vflag */, + int *ilist, int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; double r,rsq,arg,factor_lj; diff --git a/src/GPU/pair_table_gpu.cpp b/src/GPU/pair_table_gpu.cpp index c5aef996db..d0185b85e8 100644 --- a/src/GPU/pair_table_gpu.cpp +++ b/src/GPU/pair_table_gpu.cpp @@ -246,7 +246,7 @@ double PairTableGPU::memory_usage() /* ---------------------------------------------------------------------- */ -void PairTableGPU::cpu_compute(int start, int inum, int eflag, int vflag, +void PairTableGPU::cpu_compute(int start, int inum, int eflag, int /* vflag */, int *ilist, int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype,itable; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; diff --git a/src/GPU/pair_ufm_gpu.cpp b/src/GPU/pair_ufm_gpu.cpp index 40e8df3323..688e3ef4dc 100644 --- a/src/GPU/pair_ufm_gpu.cpp +++ b/src/GPU/pair_ufm_gpu.cpp @@ -186,8 +186,8 @@ double PairUFMGPU::memory_usage() /* ---------------------------------------------------------------------- */ -void PairUFMGPU::cpu_compute(int start, int inum, int eflag, int vflag, - int *ilist, int *numneigh, int **firstneigh) { +void PairUFMGPU::cpu_compute(int start, int inum, int eflag, int /* vflag */, + int *ilist, int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; double rsq,expuf,factor_lj; diff --git a/src/GPU/pair_vashishta_gpu.cpp b/src/GPU/pair_vashishta_gpu.cpp index 00dbac5f1e..84936f2c26 100644 --- a/src/GPU/pair_vashishta_gpu.cpp +++ b/src/GPU/pair_vashishta_gpu.cpp @@ -151,7 +151,7 @@ void PairVashishtaGPU::init_style() if (force->newton_pair != 0) error->all(FLERR,"Pair style vashishta/gpu requires newton pair off"); - double *cutsq, *r0, *r0eps, *gamma, *eta; + double *cutsq, *r0, *gamma, *eta; double *lam1inv, *lam4inv, *zizj, *mbigd; double *dvrc, *big6w, *heta, *bigh; double *bigw, *c0, *costheta, *bigb; diff --git a/src/GPU/pair_yukawa_colloid_gpu.cpp b/src/GPU/pair_yukawa_colloid_gpu.cpp index 0332e5f755..556dece7f8 100644 --- a/src/GPU/pair_yukawa_colloid_gpu.cpp +++ b/src/GPU/pair_yukawa_colloid_gpu.cpp @@ -179,8 +179,8 @@ double PairYukawaColloidGPU::memory_usage() /* ---------------------------------------------------------------------- */ void PairYukawaColloidGPU::cpu_compute(int start, int inum, int eflag, - int vflag, int *ilist, int *numneigh, - int **firstneigh) { + int /* vflag */, int *ilist, + int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair,radi,radj; double r,rsq,rinv,screening,forceyukawa,factor; diff --git a/src/GPU/pair_yukawa_gpu.cpp b/src/GPU/pair_yukawa_gpu.cpp index dda4250f07..9d3ea6f5a7 100644 --- a/src/GPU/pair_yukawa_gpu.cpp +++ b/src/GPU/pair_yukawa_gpu.cpp @@ -170,8 +170,8 @@ double PairYukawaGPU::memory_usage() /* ---------------------------------------------------------------------- */ -void PairYukawaGPU::cpu_compute(int start, int inum, int eflag, int vflag, - int *ilist, int *numneigh, int **firstneigh) { +void PairYukawaGPU::cpu_compute(int start, int inum, int eflag, int /* vflag */, + int *ilist, int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; double rsq,r2inv,r,rinv,screening,forceyukawa,factor; diff --git a/src/GPU/pair_zbl_gpu.cpp b/src/GPU/pair_zbl_gpu.cpp index daca79c8e3..c9b8dd75a1 100644 --- a/src/GPU/pair_zbl_gpu.cpp +++ b/src/GPU/pair_zbl_gpu.cpp @@ -177,7 +177,7 @@ double PairZBLGPU::memory_usage() /* ---------------------------------------------------------------------- */ -void PairZBLGPU::cpu_compute(int start, int inum, int eflag, int vflag, +void PairZBLGPU::cpu_compute(int start, int inum, int eflag, int /* vflag */, int *ilist, int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; diff --git a/src/MANYBODY/pair_bop.cpp b/src/MANYBODY/pair_bop.cpp index ca0f229068..6540dedf98 100644 --- a/src/MANYBODY/pair_bop.cpp +++ b/src/MANYBODY/pair_bop.cpp @@ -4988,7 +4988,7 @@ void PairBOP::read_table(char *filename) fgets(s,MAXLINE,fp); nws=0; ws=1; - for(j=0;jpair_match("reax/c",0); - if (reaxc) { - s_hist = t_hist = NULL; - grow_arrays(atom->nmax); - atom->add_callback(0); - for (int i = 0; i < atom->nmax; i++) - for (int j = 0; j < nprev; ++j) - s_hist[i][j] = t_hist[i][j] = 0; - } + s_hist = t_hist = NULL; + grow_arrays(atom->nmax); + atom->add_callback(0); + for (int i = 0; i < atom->nmax; i++) + for (int j = 0; j < nprev; ++j) + s_hist[i][j] = t_hist[i][j] = 0; } /* ---------------------------------------------------------------------- */ @@ -557,17 +555,11 @@ void FixQEqReax::init_matvec() b_s[i] = -chi[ atom->type[i] ]; b_t[i] = -1.0; - /* linear extrapolation for s & t from previous solutions */ - //s[i] = 2 * s_hist[i][0] - s_hist[i][1]; - //t[i] = 2 * t_hist[i][0] - t_hist[i][1]; - /* quadratic extrapolation for s & t from previous solutions */ - //s[i] = s_hist[i][2] + 3 * ( s_hist[i][0] - s_hist[i][1] ); t[i] = t_hist[i][2] + 3 * ( t_hist[i][0] - t_hist[i][1]); /* cubic extrapolation for s & t from previous solutions */ s[i] = 4*(s_hist[i][0]+s_hist[i][2])-(6*s_hist[i][1]+s_hist[i][3]); - //t[i] = 4*(t_hist[i][0]+t_hist[i][2])-(6*t_hist[i][1]+t_hist[i][3]); } } @@ -615,6 +607,7 @@ void FixQEqReax::compute_H() for (jj = 0; jj < jnum; jj++) { j = jlist[jj]; + j &= NEIGHMASK; dx = x[j][0] - x[i][0]; dy = x[j][1] - x[i][1]; diff --git a/src/atom.cpp b/src/atom.cpp index 9958fefc88..be4d12d52e 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -2290,7 +2290,7 @@ int Atom::memcheck(const char *str) return 0; } - if (strlen(memstr) + n >= memlength) { + if ((int)strlen(memstr) + n >= memlength) { memlength += DELTA_MEMSTR; memory->grow(memstr,memlength,"atom:memstr"); } diff --git a/src/compute_reduce_region.cpp b/src/compute_reduce_region.cpp index 3dd671ce2b..8e91a299e8 100644 --- a/src/compute_reduce_region.cpp +++ b/src/compute_reduce_region.cpp @@ -78,7 +78,6 @@ double ComputeReduceRegion::compute_one(int m, int flag) n = value2index[m]; } - int aidx = argindex[m]; int j = argindex[m]; double one = 0.0; diff --git a/src/create_atoms.cpp b/src/create_atoms.cpp index 83175b9afb..ba04de026d 100644 --- a/src/create_atoms.cpp +++ b/src/create_atoms.cpp @@ -727,26 +727,6 @@ void CreateAtoms::add_lattice() domain->lattice->bbox(1,bboxhi[0],bboxhi[1],bboxhi[2], xmin,ymin,zmin,xmax,ymax,zmax); - // narrow down min/max further by extent of the region, if possible - - if ((style == REGION) && domain->regions[nregion]->bboxflag) { - double rxmin = domain->regions[nregion]->extent_xlo; - double rxmax = domain->regions[nregion]->extent_xhi; - double rymin = domain->regions[nregion]->extent_ylo; - double rymax = domain->regions[nregion]->extent_yhi; - double rzmin = domain->regions[nregion]->extent_zlo; - double rzmax = domain->regions[nregion]->extent_zhi; - domain->lattice->box2lattice(rxmin,rymin,rzmin); - domain->lattice->box2lattice(rxmax,rymax,rzmax); - - if (rxmin > xmin) xmin = (rxmin > xmax) ? xmax : rxmin; - if (rxmax < xmax) xmax = (rxmax < xmin) ? xmin : rxmax; - if (rymin > ymin) ymin = (rymin > ymax) ? ymax : rymin; - if (rymax < ymax) ymax = (rymax < ymin) ? ymin : rymax; - if (rzmin > zmin) zmin = (rzmin > zmax) ? zmax : rzmin; - if (rzmax < zmax) zmax = (rzmax < zmin) ? zmin : rzmax; - } - // ilo:ihi,jlo:jhi,klo:khi = loop bounds for lattice overlap of my subbox // overlap = any part of a unit cell (face,edge,pt) in common with my subbox // in lattice space, subbox is a tilted box diff --git a/src/lmpwindows.h b/src/lmpwindows.h index ae2a545717..546fa62535 100644 --- a/src/lmpwindows.h +++ b/src/lmpwindows.h @@ -4,6 +4,7 @@ #endif #include #include +#include // LAMMPS uses usleep with 100 ms arguments, no microsecond precision needed #if !defined(__MINGW32__) #include "sleep.h" @@ -15,6 +16,7 @@ #define ATOBIGINT _atoi64 #define pclose _pclose +#define strdup _strdup // the following functions ared defined to get rid of // 'ambiguous call to overloaded function' error in VSS for mismathched type arguments diff --git a/src/pair.cpp b/src/pair.cpp index cc066713c9..62d8f6049c 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -151,13 +151,13 @@ void Pair::modify_params(int narg, char **arg) } else if (strcmp(arg[iarg],"table") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal pair_modify command"); ncoultablebits = force->inumeric(FLERR,arg[iarg+1]); - if (ncoultablebits > sizeof(float)*CHAR_BIT) + if (ncoultablebits > (int)sizeof(float)*CHAR_BIT) error->all(FLERR,"Too many total bits for bitmapped lookup table"); iarg += 2; } else if (strcmp(arg[iarg],"table/disp") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal pair_modify command"); ndisptablebits = force->inumeric(FLERR,arg[iarg+1]); - if (ndisptablebits > sizeof(float)*CHAR_BIT) + if (ndisptablebits > (int)sizeof(float)*CHAR_BIT) error->all(FLERR,"Too many total bits for bitmapped lookup table"); iarg += 2; } else if (strcmp(arg[iarg],"tabinner") == 0) { @@ -1695,7 +1695,7 @@ void Pair::init_bitmap(double inner, double outer, int ntablebits, if (sizeof(int) != sizeof(float)) error->all(FLERR,"Bitmapped lookup tables require int/float be same size"); - if (ntablebits > sizeof(float)*CHAR_BIT) + if (ntablebits > (int)sizeof(float)*CHAR_BIT) error->all(FLERR,"Too many total bits for bitmapped lookup table"); if (inner >= outer) @@ -1719,7 +1719,7 @@ void Pair::init_bitmap(double inner, double outer, int ntablebits, int nmantbits = ntablebits - nexpbits; - if (nexpbits > sizeof(float)*CHAR_BIT - FLT_MANT_DIG) + if (nexpbits > (int)sizeof(float)*CHAR_BIT - FLT_MANT_DIG) error->all(FLERR,"Too many exponent bits for lookup table"); if (nmantbits+1 > FLT_MANT_DIG) error->all(FLERR,"Too many mantissa bits for lookup table"); diff --git a/src/read_data.cpp b/src/read_data.cpp index 373ba30151..4d7c855065 100644 --- a/src/read_data.cpp +++ b/src/read_data.cpp @@ -1963,7 +1963,7 @@ void ReadData::parse_keyword(int first) } while (eof == 0 && done == 0) { int blank = strspn(line," \t\n\r"); - if ((blank == strlen(line)) || (line[blank] == '#')) { + if ((blank == (int)strlen(line)) || (line[blank] == '#')) { if (fgets(line,MAXLINE,fp) == NULL) eof = 1; } else done = 1; } diff --git a/src/read_restart.cpp b/src/read_restart.cpp index 82028d8316..73dc37f4cb 100644 --- a/src/read_restart.cpp +++ b/src/read_restart.cpp @@ -627,7 +627,7 @@ void ReadRestart::file_search(char *infile, char *outfile) if ((ptr = strstr(&ep->d_name[nbegin],end)) == NULL) continue; if (strlen(end) == 0) ptr = ep->d_name + strlen(ep->d_name); *ptr = '\0'; - if (strlen(&ep->d_name[nbegin]) < n) { + if ((int)strlen(&ep->d_name[nbegin]) < n) { strcpy(middle,&ep->d_name[nbegin]); if (ATOBIGINT(middle) > maxnum) maxnum = ATOBIGINT(middle); }