diff --git a/src/USER-MANIFOLD/fix_manifoldforce.cpp b/src/USER-MANIFOLD/fix_manifoldforce.cpp index 00293bfec7..74a9a1833f 100644 --- a/src/USER-MANIFOLD/fix_manifoldforce.cpp +++ b/src/USER-MANIFOLD/fix_manifoldforce.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include "fix_manifoldforce.h" // For stuff +#include #include -#include #include "atom.h" #include "update.h" #include "respa.h" @@ -21,7 +21,6 @@ #include "force.h" #include "manifold.h" -#include "fix_manifoldforce.h" // For stuff #include "manifold_factory.h" // For constructing manifold diff --git a/src/USER-MANIFOLD/fix_manifoldforce.h b/src/USER-MANIFOLD/fix_manifoldforce.h index 527bee3f86..1d5afc7afc 100644 --- a/src/USER-MANIFOLD/fix_manifoldforce.h +++ b/src/USER-MANIFOLD/fix_manifoldforce.h @@ -43,9 +43,9 @@ FixStyle(manifoldforce,FixManifoldForce) #define LMP_FIX_MANIFOLDFORCE_H #include "fix.h" -#include "manifold.h" namespace LAMMPS_NS { +namespace user_manifold { class manifold; } class FixManifoldForce : public Fix { public: diff --git a/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp b/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp index de134e32ed..7f8d9d5675 100644 --- a/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp +++ b/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp @@ -32,24 +32,18 @@ ------------------------------------------------------------------------- */ -#include -#include +#include "fix_nve_manifold_rattle.h" +#include #include #include "atom.h" #include "force.h" #include "update.h" -#include "respa.h" #include "error.h" -#include "group.h" -#include #include "input.h" #include "variable.h" #include "citeme.h" -#include "memory.h" #include "comm.h" - -#include "fix_nve_manifold_rattle.h" #include "manifold_factory.h" #include "manifold.h" diff --git a/src/USER-MANIFOLD/fix_nve_manifold_rattle.h b/src/USER-MANIFOLD/fix_nve_manifold_rattle.h index 2bc821ab04..581ecf36d3 100644 --- a/src/USER-MANIFOLD/fix_nve_manifold_rattle.h +++ b/src/USER-MANIFOLD/fix_nve_manifold_rattle.h @@ -42,12 +42,10 @@ FixStyle(nve/manifold/rattle,FixNVEManifoldRattle) #define LMP_FIX_NVE_MANIFOLD_RATTLE_H #include "fix.h" -#include "manifold.h" - namespace LAMMPS_NS { -// namespace user_manifold { +namespace user_manifold { class manifold; } class FixNVEManifoldRattle : public Fix { public: @@ -98,9 +96,7 @@ namespace LAMMPS_NS { user_manifold::manifold *ptr_m; - void print_stats( const char * ); - int was_var( const char * ); virtual void update_var_params(); diff --git a/src/USER-MANIFOLD/fix_nvt_manifold_rattle.cpp b/src/USER-MANIFOLD/fix_nvt_manifold_rattle.cpp index a4eed66336..2789f8738a 100644 --- a/src/USER-MANIFOLD/fix_nvt_manifold_rattle.cpp +++ b/src/USER-MANIFOLD/fix_nvt_manifold_rattle.cpp @@ -32,25 +32,18 @@ ------------------------------------------------------------------------- */ -#include -#include +#include "fix_nvt_manifold_rattle.h" #include #include #include "atom.h" #include "force.h" #include "update.h" -#include "respa.h" #include "error.h" #include "group.h" -#include "input.h" -#include "variable.h" #include "citeme.h" -#include "memory.h" -#include "comm.h" #include "modify.h" #include "compute.h" -#include "fix_nvt_manifold_rattle.h" #include "manifold.h" diff --git a/src/USER-MANIFOLD/manifold_factory.h b/src/USER-MANIFOLD/manifold_factory.h index cc3e1245bf..ac2aee8a26 100644 --- a/src/USER-MANIFOLD/manifold_factory.h +++ b/src/USER-MANIFOLD/manifold_factory.h @@ -35,8 +35,7 @@ #ifndef LMP_MANIFOLD_FACTORY_H #define LMP_MANIFOLD_FACTORY_H - -#include "manifold.h" +#include #include /* @@ -79,14 +78,16 @@ static FILE *screen = fopen("/dev/stdout","w"); #define FLERR __FILE__,__LINE__ // Equivalent to definition in pointers.h #endif // USE_PHONY_LAMMPS - - /* Here the actual implementation of LAMMPS-related functions begins. */ namespace LAMMPS_NS { +class LAMMPS; namespace user_manifold { +// forward declaration +class manifold; + // Templated, so needs to be in header. template void make_manifold_if( manifold **man_ptr, const char *name, @@ -103,8 +104,6 @@ namespace user_manifold { int , char ** ); } // namespace user_manifold - } // namespace LAMMPS_NS - #endif // LMP_MANIFOLD_FACTORY_H diff --git a/src/USER-MANIFOLD/manifold_thylakoid.cpp b/src/USER-MANIFOLD/manifold_thylakoid.cpp index 530e0a876d..e4ef039832 100644 --- a/src/USER-MANIFOLD/manifold_thylakoid.cpp +++ b/src/USER-MANIFOLD/manifold_thylakoid.cpp @@ -1,6 +1,6 @@ #include "manifold_thylakoid.h" #include - +#include "manifold_thylakoid_shared.h" #include "comm.h" #include "domain.h" // For some checks regarding the simulation box. #include "error.h" diff --git a/src/USER-MANIFOLD/manifold_thylakoid.h b/src/USER-MANIFOLD/manifold_thylakoid.h index d8ebe2e94f..35ad4dfd9c 100644 --- a/src/USER-MANIFOLD/manifold_thylakoid.h +++ b/src/USER-MANIFOLD/manifold_thylakoid.h @@ -4,12 +4,10 @@ #include "manifold.h" #include -#include "manifold_thylakoid_shared.h" - namespace LAMMPS_NS { namespace user_manifold { - + struct thyla_part; class manifold_thylakoid : public manifold { public: diff --git a/src/USER-MEAMC/meam.h b/src/USER-MEAMC/meam.h index 74b1eb0e54..da55805790 100644 --- a/src/USER-MEAMC/meam.h +++ b/src/USER-MEAMC/meam.h @@ -1,12 +1,12 @@ #ifndef LMP_MEAM_H #define LMP_MEAM_H -#include "memory.h" #include #define maxelt 5 namespace LAMMPS_NS { +class Memory; typedef enum { FCC, BCC, HCP, DIM, DIA, B1, C11, L12, B2 } lattice_t; diff --git a/src/USER-MEAMC/meam_dens_final.cpp b/src/USER-MEAMC/meam_dens_final.cpp index c55b1b45c4..867106df88 100644 --- a/src/USER-MEAMC/meam_dens_final.cpp +++ b/src/USER-MEAMC/meam_dens_final.cpp @@ -1,5 +1,4 @@ #include "meam.h" -#include "math_special.h" using namespace LAMMPS_NS; diff --git a/src/USER-MEAMC/meam_dens_init.cpp b/src/USER-MEAMC/meam_dens_init.cpp index 3bb9328142..155941422c 100644 --- a/src/USER-MEAMC/meam_dens_init.cpp +++ b/src/USER-MEAMC/meam_dens_init.cpp @@ -1,4 +1,6 @@ #include "meam.h" +#include +#include "memory.h" #include "math_special.h" using namespace LAMMPS_NS; diff --git a/src/USER-MEAMC/meam_force.cpp b/src/USER-MEAMC/meam_force.cpp index 06fbb57adb..09aad90111 100644 --- a/src/USER-MEAMC/meam_force.cpp +++ b/src/USER-MEAMC/meam_force.cpp @@ -1,6 +1,7 @@ #include "meam.h" -#include "math_special.h" +#include #include +#include "math_special.h" using namespace LAMMPS_NS; diff --git a/src/USER-MEAMC/meam_impl.cpp b/src/USER-MEAMC/meam_impl.cpp index b099ead8d5..3b40a2b612 100644 --- a/src/USER-MEAMC/meam_impl.cpp +++ b/src/USER-MEAMC/meam_impl.cpp @@ -16,6 +16,7 @@ ------------------------------------------------------------------------- */ #include "meam.h" +#include #include "memory.h" using namespace LAMMPS_NS; diff --git a/src/USER-MEAMC/meam_setup_done.cpp b/src/USER-MEAMC/meam_setup_done.cpp index 2a762d1204..7000eac6ae 100644 --- a/src/USER-MEAMC/meam_setup_done.cpp +++ b/src/USER-MEAMC/meam_setup_done.cpp @@ -1,6 +1,10 @@ #include "meam.h" -#include "math_special.h" +#include +#include #include +#include "math_special.h" +#include "memory.h" + using namespace LAMMPS_NS; void diff --git a/src/USER-MEAMC/pair_meamc.cpp b/src/USER-MEAMC/pair_meamc.cpp index 7c96fadb44..a9034a1af3 100644 --- a/src/USER-MEAMC/pair_meamc.cpp +++ b/src/USER-MEAMC/pair_meamc.cpp @@ -15,16 +15,14 @@ Contributing author: Greg Wagner (SNL) ------------------------------------------------------------------------- */ -#include -#include +#include "pair_meamc.h" +#include #include #include #include "meam.h" -#include "pair_meamc.h" #include "atom.h" #include "force.h" #include "comm.h" -#include "memory.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" diff --git a/src/USER-MEAMC/pair_meamc.h b/src/USER-MEAMC/pair_meamc.h index a006e70bdb..31dd8ba022 100644 --- a/src/USER-MEAMC/pair_meamc.h +++ b/src/USER-MEAMC/pair_meamc.h @@ -24,7 +24,6 @@ PairStyle(meam,PairMEAMC) #include "pair.h" namespace LAMMPS_NS { -class MEAM; class PairMEAMC : public Pair { public: diff --git a/src/USER-MGPT/mgpt_linalg.cpp b/src/USER-MGPT/mgpt_linalg.cpp index 68701037f4..bc15873739 100644 --- a/src/USER-MGPT/mgpt_linalg.cpp +++ b/src/USER-MGPT/mgpt_linalg.cpp @@ -20,8 +20,6 @@ #include #include -#include -#include #define restrict __restrict__ diff --git a/src/USER-MGPT/mgpt_readpot.h b/src/USER-MGPT/mgpt_readpot.h index 62f66883b6..8f46592e8a 100644 --- a/src/USER-MGPT/mgpt_readpot.h +++ b/src/USER-MGPT/mgpt_readpot.h @@ -19,7 +19,9 @@ #ifndef READPOT__ #define READPOT__ - +#include +#include +#include #include "mgpt_splinetab.h" struct potdata { diff --git a/src/USER-MGPT/pair_mgpt.cpp b/src/USER-MGPT/pair_mgpt.cpp index 91c624eec5..0634872c70 100644 --- a/src/USER-MGPT/pair_mgpt.cpp +++ b/src/USER-MGPT/pair_mgpt.cpp @@ -21,17 +21,16 @@ (2011). See LLNL copyright notice at bottom of this file. ------------------------------------------------------------------------- */ +#include "pair_mgpt.h" +#include #include -#include #include #include #include -#include "pair_mgpt.h" #include "atom.h" #include "force.h" #include "comm.h" -#include "memory.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" diff --git a/src/USER-MGPT/pair_mgpt.h b/src/USER-MGPT/pair_mgpt.h index 70b36364b1..3e861a0198 100644 --- a/src/USER-MGPT/pair_mgpt.h +++ b/src/USER-MGPT/pair_mgpt.h @@ -32,6 +32,7 @@ PairStyle(mgpt,PairMGPT) #include #include +#include #include #include "pair.h" @@ -77,29 +78,29 @@ public: Link(const K &k,Link *n) : next(n),key(k),hits(1) {} static void *operator new(std::size_t sz) { - const size_t align = 32; - size_t x = (size_t) (void *) ::operator new(sz+align); - size_t y = (x + align) - ((x+align)&(align-1)); - assert(sizeof(void *) <= align); - assert((x & (sizeof(void *)-1)) == 0); - ((void **) y)[-1] = (void *) x; - return (void *) y; + const size_t align = 32; + size_t x = (size_t) (void *) ::operator new(sz+align); + size_t y = (x + align) - ((x+align)&(align-1)); + assert(sizeof(void *) <= align); + assert((x & (sizeof(void *)-1)) == 0); + ((void **) y)[-1] = (void *) x; + return (void *) y; } static void operator delete(void *ptr) { - ::operator delete(((void **) ptr)[-1]); + ::operator delete(((void **) ptr)[-1]); } }; int isprime(int x) { if(x%2 == 0) - return 0; + return 0; else { - int k = 3; - while(k*k <= x) { - if(x%k == 0) return 0; - k = k+2; - } - return 1; + int k = 3; + while(k*k <= x) { + if(x%k == 0) return 0; + k = k+2; + } + return 1; } } @@ -117,25 +118,25 @@ public: Iterator(Hash &HH) : H(HH),idx(-1),p(0) { next(); } Iterator(Hash &HH,int iidx,Link *pp) : H(HH),idx(iidx),p(pp) {} void next() { - if(idx >= H.Size()) return; - if(p != 0) p = p->next; - if(p == 0) { - do { - idx = idx+1; - if(idx >= H.Size()) return; - p = H.table[idx]; - } while(p == 0); - } + if(idx >= H.Size()) return; + if(p != 0) p = p->next; + if(p == 0) { + do { + idx = idx+1; + if(idx >= H.Size()) return; + p = H.table[idx]; + } while(p == 0); + } } K *key() { return &p->key; } T *data() { return &p->data; } Link *link() { return p; } int operator==(const Iterator &a) { - return idx==a.idx && p==a.p; + return idx==a.idx && p==a.p; } int operator!=(const Iterator &a) { - return !(*this == a); + return !(*this == a); } }; @@ -147,7 +148,7 @@ public: table = new Link *[size]; for(int i = 0; inext; - delete p; - p = q; - } + Link *p = table[i]; + while(p != 0) { + Link *q = p->next; + delete p; + p = q; + } } delete[] table; } @@ -179,24 +180,24 @@ public: int idx = key.hash() % size; if(idx < 0) idx = idx + size; if(idx >= size || idx < 0) { - printf("(1) Damn... key = %d, idx = %d, size = %d\n",key.hash(),idx,size); - exit(1); + printf("(1) Damn... key = %d, idx = %d, size = %d\n",key.hash(),idx,size); + exit(1); } used = used + 1; if(1) { - table[idx] = new Link(key,table[idx]); - return &table[idx]->data; + table[idx] = new Link(key,table[idx]); + return &table[idx]->data; } else { /* This is for threading... and incomplete */ - typedef Link *LinkPtr; - LinkPtr ptr = table[idx],last = 0,dataptr = new Link(key,0); + typedef Link *LinkPtr; + LinkPtr ptr = table[idx],last = 0,dataptr = new Link(key,0); - while(ptr != 0) { - last = ptr; - ptr = ptr->next; - } - *((volatile LinkPtr *) &(last->next)) = dataptr; - return &(dataptr->data); + while(ptr != 0) { + last = ptr; + ptr = ptr->next; + } + *((volatile LinkPtr *) &(last->next)) = dataptr; + return &(dataptr->data); } } void Remove(const K &key) { @@ -205,28 +206,28 @@ public: int count = 1; if(idx < 0) idx = idx + size; if(idx >= size || idx < 0) { - printf("(2) Damn... key = %d, idx = %d, size = %d\n",key.hash(),idx,size); - exit(1); + printf("(2) Damn... key = %d, idx = %d, size = %d\n",key.hash(),idx,size); + exit(1); } p = table[idx]; while(p != 0 && !(p->key == key)) { - last = p; - p = p->next; - count = count + 1; + last = p; + p = p->next; + count = count + 1; } if(p != 0) { - used = used - 1; - if(last == 0) - table[idx] = p->next; - else - last->next = p->next; - delete p; + used = used - 1; + if(last == 0) + table[idx] = p->next; + else + last->next = p->next; + delete p; } if(count > maxlength) - maxlength = count; + maxlength = count; nsearch = nsearch + 1; nstep = nstep + count; } @@ -236,19 +237,19 @@ public: int count = 1; if(idx < 0) idx = idx + size; if(idx >= size || idx < 0) { - printf("(3) Damn... key = %d, idx = %d, size = %d\n",key.hash(),idx,size); - exit(1); + printf("(3) Damn... key = %d, idx = %d, size = %d\n",key.hash(),idx,size); + exit(1); } p = table[idx]; while(p != 0 && !(p->key == key)) { - p = p->next; - count = count + 1; + p = p->next; + count = count + 1; } if(count > maxlength) - maxlength = count; + maxlength = count; nsearch = nsearch + 1; nstep = nstep + count; @@ -283,46 +284,46 @@ public: } void zero() { for(int i = 0; i<8; i++) - for(int j = 0; j<8; j++) - m[i][j] = 0.0; + for(int j = 0; j<8; j++) + m[i][j] = 0.0; } void operator=(const Matrix &A) { for(int i = 1; i<=sz; i++) - for(int j = 1; j<=sz; j++) - m[i][j] = A.m[i][j]; + for(int j = 1; j<=sz; j++) + m[i][j] = A.m[i][j]; } void operator=(double x) { for(int i = 1; i<=sz; i++) - for(int j = 1; j<=sz; j++) - m[i][j] = x; + for(int j = 1; j<=sz; j++) + m[i][j] = x; } Matrix operator+(const Matrix &B) const { Matrix s; for(int i = 1; i<=sz; i++) - for(int j = 1; j<=sz; j++) - s.m[i][j] = m[i][j] + B.m[i][j]; + for(int j = 1; j<=sz; j++) + s.m[i][j] = m[i][j] + B.m[i][j]; return s; } Matrix operator-(const Matrix &B) const { Matrix s; for(int i = 1; i<=sz; i++) - for(int j = 1; j<=sz; j++) - s.m[i][j] = m[i][j] - B.m[i][j]; + for(int j = 1; j<=sz; j++) + s.m[i][j] = m[i][j] - B.m[i][j]; return s; } Matrix operator-() const { Matrix s; for(int i = 1; i<=sz; i++) - for(int j = 1; j<=sz; j++) - s.m[i][j] = -m[i][j]; + for(int j = 1; j<=sz; j++) + s.m[i][j] = -m[i][j]; return s; } Matrix operator*(double x) const { Matrix P; for(int i = 1; i<=sz; i++) - for(int j = 0; j<=sz; j++) - P.m[i][j] = m[i][j] * x; + for(int j = 0; j<=sz; j++) + P.m[i][j] = m[i][j] * x; return P; } Matrix operator/(double x) const { @@ -331,8 +332,8 @@ public: Matrix transpose() const { Matrix T; for(int i = 1; i<=sz; i++) - for(int j = 1; j<=sz; j++) - T.m[j][i] = m[i][j]; + for(int j = 1; j<=sz; j++) + T.m[j][i] = m[i][j]; return T; } }; @@ -374,13 +375,13 @@ public: int align_check() { return - (H1H2.align_check() << 0) | - (H1xH2.align_check() << 1) | - (H1yH2.align_check() << 2) | - (H1zH2.align_check() << 3) | - (H1H2x.align_check() << 4) | - (H1H2y.align_check() << 5) | - (H1H2z.align_check() << 6) ; + (H1H2.align_check() << 0) | + (H1xH2.align_check() << 1) | + (H1yH2.align_check() << 2) | + (H1zH2.align_check() << 3) | + (H1H2x.align_check() << 4) | + (H1H2y.align_check() << 5) | + (H1H2z.align_check() << 6) ; } void zero() { @@ -396,18 +397,18 @@ public: void make_bond(const double xx[][3],int i,int j,bond_data *bptr); void make_triplet(bond_data *ij_bond,bond_data *ik_bond,triplet_data *triptr); triplet_data *get_triplet(const double xx[][3],int i,int j,int k, - Hash *bhash,triplet_data *twork, - double *dvir_ij_p,double *dvir_ik_p); + Hash *bhash,triplet_data *twork, + double *dvir_ij_p,double *dvir_ik_p); int c1_outside(const double a[3], - int triclinic,const double alpha[3]) { + int triclinic,const double alpha[3]) { const double stol = 1e-5; if(triclinic) { for(int p = 0; p<3; p++) { - double cog = a[p]; - if(cog < domain->sublo_lamda[p]-0.5*rmax*alpha[p]-stol) return 1; - if(cog > domain->subhi_lamda[p]+0.5*rmax*alpha[p]+stol) return 1; + double cog = a[p]; + if(cog < domain->sublo_lamda[p]-0.5*rmax*alpha[p]-stol) return 1; + if(cog > domain->subhi_lamda[p]+0.5*rmax*alpha[p]+stol) return 1; } } else { @@ -415,63 +416,63 @@ public: for(int p = 0; p<3; p++) { - double cog = a[p]; - if(cog < domain->sublo[p]-0.5*rmax-stol) return 1; - if(cog > domain->subhi[p]+0.5*rmax+stol) return 1; + double cog = a[p]; + if(cog < domain->sublo[p]-0.5*rmax-stol) return 1; + if(cog > domain->subhi[p]+0.5*rmax+stol) return 1; - if(cog < domain->sublo[p]-stol) { - double t = cog - (domain->sublo[p]-stol); - rout = rout + t*t; - } else if(cog > domain->subhi[p]+stol) { - double t = cog - (domain->subhi[p]+stol); - rout = rout + t*t; - } + if(cog < domain->sublo[p]-stol) { + double t = cog - (domain->sublo[p]-stol); + rout = rout + t*t; + } else if(cog > domain->subhi[p]+stol) { + double t = cog - (domain->subhi[p]+stol); + rout = rout + t*t; + } } if(rout > 0.25*rmax*rmax) - return 1; + return 1; } return 0; } int c2_outside(const double a[3],const double b[3], - int triclinic,const double alpha[3]) { + int triclinic,const double alpha[3]) { const double stol = 1e-5; if(triclinic) { for(int p = 0; p<3; p++) { - double cog = 0.5*(a[p] + b[p]); - if(cog < domain->sublo_lamda[p]-0.5*rcrit*alpha[p]-stol) return 1; - if(cog > domain->subhi_lamda[p]+0.5*rcrit*alpha[p]+stol) return 1; + double cog = 0.5*(a[p] + b[p]); + if(cog < domain->sublo_lamda[p]-0.5*rcrit*alpha[p]-stol) return 1; + if(cog > domain->subhi_lamda[p]+0.5*rcrit*alpha[p]+stol) return 1; } } else { double rout = 0.0; for(int p = 0; p<3; p++) { - double cog = 0.5*(a[p] + b[p]); - if(cog < domain->sublo[p]-0.5*rcrit-stol) return 1; - if(cog > domain->subhi[p]+0.5*rcrit+stol) return 1; + double cog = 0.5*(a[p] + b[p]); + if(cog < domain->sublo[p]-0.5*rcrit-stol) return 1; + if(cog > domain->subhi[p]+0.5*rcrit+stol) return 1; - if(cog < domain->sublo[p]-stol) { - double t = cog - (domain->sublo[p]-stol); - rout = rout + t*t; - } else if(cog > domain->subhi[p]+stol) { - double t = cog - (domain->subhi[p]+stol); - rout = rout + t*t; - } + if(cog < domain->sublo[p]-stol) { + double t = cog - (domain->sublo[p]-stol); + rout = rout + t*t; + } else if(cog > domain->subhi[p]+stol) { + double t = cog - (domain->subhi[p]+stol); + rout = rout + t*t; + } } if(rout > 0.25*rcrit*rcrit) - return 1; + return 1; } return 0; } double get_weight(const int triclinic, - const double a[3] = 0,const double b[3] = 0, - const double c[3] = 0,const double d[3] = 0) { + const double a[3] = 0,const double b[3] = 0, + const double c[3] = 0,const double d[3] = 0) { const double *s0 = triclinic ? domain->sublo_lamda : domain->sublo, *s1 = triclinic ? domain->subhi_lamda : domain->subhi; @@ -498,46 +499,46 @@ public: } void force_debug_3t(double xx[][3], - int i0,int j0,int k0, - int i ,int j ,int k , - double dfix,double dfiy,double dfiz, - double dfjx,double dfjy,double dfjz, - double dfkx,double dfky,double dfkz); + int i0,int j0,int k0, + int i ,int j ,int k , + double dfix,double dfiy,double dfiz, + double dfjx,double dfjy,double dfjz, + double dfkx,double dfky,double dfkz); void force_debug_3v(double xx[][3], - int i0,int j0,int k0, - int i ,int j ,int k , - double dfix,double dfiy,double dfiz, - double dfjx,double dfjy,double dfjz, - double dfkx,double dfky,double dfkz); + int i0,int j0,int k0, + int i ,int j ,int k , + double dfix,double dfiy,double dfiz, + double dfjx,double dfjy,double dfjz, + double dfkx,double dfky,double dfkz); void force_debug_4(double xx[][3], - int i0,int j0,int k0,int m0, - int i ,int j ,int k ,int m , - double dfix,double dfiy,double dfiz, - double dfjx,double dfjy,double dfjz, - double dfkx,double dfky,double dfkz, - double dfmx,double dfmy,double dfmz); + int i0,int j0,int k0,int m0, + int i ,int j ,int k ,int m , + double dfix,double dfiy,double dfiz, + double dfjx,double dfjy,double dfjz, + double dfkx,double dfky,double dfkz, + double dfmx,double dfmy,double dfmz); double numderiv3t(double xx[][3],int i,int j,int k,int p); double numderiv3v(double xx[][3],int i,int j,int k,int p,int ipert); double numderiv4(double xx[][3],int i,int j,int k,int m,int p); void compute_x(const int *nnei,const int * const *nlist, - double *e_s,double *e_p,double *e_t,double *e_q, - int evflag,int newton_pair); + double *e_s,double *e_p,double *e_t,double *e_q, + int evflag,int newton_pair); /* Reimplementation of bond matrix computation */ void fl_deriv_new(double r,double ri,double xhat,double yhat,double zhat, - double &fl_0,double &fl_x,double &fl_y,double &fl_z, - double &fl_rp,double &fl_p1,double &fl_r0,double &fl_al); + double &fl_0,double &fl_x,double &fl_y,double &fl_z, + double &fl_rp,double &fl_p1,double &fl_r0,double &fl_al); void hamltn_5_raw(const double xin,const double yin,const double zin, - double M [8][8],double Mx[8][8], - double My[8][8],double Mz[8][8], - double *fl_deriv_sum_p); + double M [8][8],double Mx[8][8], + double My[8][8],double Mz[8][8], + double *fl_deriv_sum_p); void hamltn_7_raw(const double xin,const double yin,const double zin, - double M [8][8],double Mx[8][8], - double My[8][8],double Mz[8][8], - double *fl_deriv_sum_p); + double M [8][8],double Mx[8][8], + double My[8][8],double Mz[8][8], + double *fl_deriv_sum_p); /* * */ // Old matrix routines, only used in force debug routines. @@ -546,9 +547,9 @@ public: Matrix h; for(int l = 1; l <= lmax; l++) { for(int n = 1; n <= lmax; n++) { - h.m[l][n] = 0.0; - for(int m = 1; m <= lmax; m++) - h.m[l][n] += ha.m[l][m] * hb.m[m][n]; + h.m[l][n] = 0.0; + for(int m = 1; m <= lmax; m++) + h.m[l][n] += ha.m[l][m] * hb.m[m][n]; } } return h; @@ -560,7 +561,7 @@ public: for(int n = 1; n <= lmax; n++) { double cquan = 0.0; for(int m = 1; m <= lmax; m++) - cquan += ha.m[n][m] * hb.m[m][n]; + cquan += ha.m[n][m] * hb.m[m][n]; zquan += cquan; } return zquan; @@ -572,32 +573,32 @@ public: int i,j,k; if(lmax == 5) { - const int n = 5; - for(i = 1; i<=n; i++) - for(j = 1; j<=n; j++) { - double s = 0.0; - for(k = 1; k<=n; k++) - s = s + a.m[i][k]*b.m[j][k]; - c.m[i][j] = s; - } + const int n = 5; + for(i = 1; i<=n; i++) + for(j = 1; j<=n; j++) { + double s = 0.0; + for(k = 1; k<=n; k++) + s = s + a.m[i][k]*b.m[j][k]; + c.m[i][j] = s; + } } else if(lmax == 7) { - const int n = 7; - for(i = 1; i<=n; i++) - for(j = 1; j<=n; j++) { - double s = 0.0; - for(k = 1; k<=n; k++) - s = s + a.m[i][k]*b.m[j][k]; - c.m[i][j] = s; - } + const int n = 7; + for(i = 1; i<=n; i++) + for(j = 1; j<=n; j++) { + double s = 0.0; + for(k = 1; k<=n; k++) + s = s + a.m[i][k]*b.m[j][k]; + c.m[i][j] = s; + } } else { - const int n = lmax; - for(i = 1; i<=n; i++) - for(j = 1; j<=n; j++) { - double s = 0.0; - for(k = 1; k<=n; k++) - s = s + a.m[i][k]*b.m[j][k]; - c.m[i][j] = s; - } + const int n = lmax; + for(i = 1; i<=n; i++) + for(j = 1; j<=n; j++) { + double s = 0.0; + for(k = 1; k<=n; k++) + s = s + a.m[i][k]*b.m[j][k]; + c.m[i][j] = s; + } } } @@ -608,7 +609,7 @@ public: for(i = 0; i -#include #include "angle_cosine_shift.h" +#include +#include #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/USER-MISC/angle_cosine_shift_exp.cpp b/src/USER-MISC/angle_cosine_shift_exp.cpp index 8c6282de20..79cb0fea7c 100644 --- a/src/USER-MISC/angle_cosine_shift_exp.cpp +++ b/src/USER-MISC/angle_cosine_shift_exp.cpp @@ -15,9 +15,9 @@ Contributing author: Carsten Svaneborg, science@zqex.dk ------------------------------------------------------------------------- */ -#include -#include #include "angle_cosine_shift_exp.h" +#include +#include #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/USER-MISC/angle_dipole.cpp b/src/USER-MISC/angle_dipole.cpp index 781da46869..0956ba3b8f 100644 --- a/src/USER-MISC/angle_dipole.cpp +++ b/src/USER-MISC/angle_dipole.cpp @@ -15,9 +15,9 @@ Contributing authors: Mario Orsi & Wei Ding (QMUL), m.orsi@qmul.ac.uk ------------------------------------------------------------------------- */ -#include -#include #include "angle_dipole.h" +#include +#include #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/USER-MISC/angle_fourier.cpp b/src/USER-MISC/angle_fourier.cpp index 8f5074ff5d..dcf5080431 100644 --- a/src/USER-MISC/angle_fourier.cpp +++ b/src/USER-MISC/angle_fourier.cpp @@ -16,9 +16,9 @@ [ based on angle_cosine_squared.cpp Naveen Michaud-Agrawal (Johns Hopkins U)] ------------------------------------------------------------------------- */ -#include -#include #include "angle_fourier.h" +#include +#include #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/USER-MISC/angle_fourier_simple.cpp b/src/USER-MISC/angle_fourier_simple.cpp index 615556bbe7..bbe3f8520b 100644 --- a/src/USER-MISC/angle_fourier_simple.cpp +++ b/src/USER-MISC/angle_fourier_simple.cpp @@ -16,9 +16,9 @@ [ based on angle_cosine_squared.cpp Naveen Michaud-Agrawal (Johns Hopkins U)] ------------------------------------------------------------------------- */ -#include -#include #include "angle_fourier_simple.h" +#include +#include #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/USER-MISC/angle_quartic.cpp b/src/USER-MISC/angle_quartic.cpp index 21a96100aa..5c5f3411e4 100644 --- a/src/USER-MISC/angle_quartic.cpp +++ b/src/USER-MISC/angle_quartic.cpp @@ -16,9 +16,9 @@ [ based on angle_harmonic.cpp] ------------------------------------------------------------------------- */ -#include -#include #include "angle_quartic.h" +#include +#include #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/USER-MISC/bond_harmonic_shift.cpp b/src/USER-MISC/bond_harmonic_shift.cpp index c7e4444cce..fdd3111783 100644 --- a/src/USER-MISC/bond_harmonic_shift.cpp +++ b/src/USER-MISC/bond_harmonic_shift.cpp @@ -15,12 +15,11 @@ Contributing author: Carsten Svaneborg, science@zqex.dk ------------------------------------------------------------------------- */ -#include -#include #include "bond_harmonic_shift.h" +#include +#include #include "atom.h" #include "neighbor.h" -#include "domain.h" #include "comm.h" #include "force.h" #include "memory.h" diff --git a/src/USER-MISC/bond_harmonic_shift_cut.cpp b/src/USER-MISC/bond_harmonic_shift_cut.cpp index 5b396f5d72..0688cb428a 100644 --- a/src/USER-MISC/bond_harmonic_shift_cut.cpp +++ b/src/USER-MISC/bond_harmonic_shift_cut.cpp @@ -15,12 +15,11 @@ Contributing author: Carsten Svaneborg, science@zqex.dk ------------------------------------------------------------------------- */ -#include -#include #include "bond_harmonic_shift_cut.h" +#include +#include #include "atom.h" #include "neighbor.h" -#include "domain.h" #include "comm.h" #include "force.h" #include "memory.h" diff --git a/src/USER-MISC/compute_cnp_atom.cpp b/src/USER-MISC/compute_cnp_atom.cpp index 6fa16f1a9a..ba97be25d4 100644 --- a/src/USER-MISC/compute_cnp_atom.cpp +++ b/src/USER-MISC/compute_cnp_atom.cpp @@ -21,11 +21,10 @@ branicio@usc.edu ------------------------------------------------------------------------- */ -#include -#include -#include - #include "compute_cnp_atom.h" +#include +#include +#include #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/USER-MISC/compute_entropy_atom.cpp b/src/USER-MISC/compute_entropy_atom.cpp index 0367d7fe6d..00f7e6dc8b 100644 --- a/src/USER-MISC/compute_entropy_atom.cpp +++ b/src/USER-MISC/compute_entropy_atom.cpp @@ -15,10 +15,9 @@ Contributing author: Pablo Piaggi (EPFL Lausanne) ------------------------------------------------------------------------- */ +#include "compute_entropy_atom.h" #include #include -#include -#include "compute_entropy_atom.h" #include "atom.h" #include "update.h" #include "modify.h" @@ -28,13 +27,11 @@ #include "force.h" #include "pair.h" #include "comm.h" -#include "math_extra.h" #include "math_const.h" #include "memory.h" #include "error.h" #include "domain.h" - using namespace LAMMPS_NS; using namespace MathConst; diff --git a/src/USER-MISC/compute_pressure_cylinder.cpp b/src/USER-MISC/compute_pressure_cylinder.cpp index c250eaf677..6d2509d685 100644 --- a/src/USER-MISC/compute_pressure_cylinder.cpp +++ b/src/USER-MISC/compute_pressure_cylinder.cpp @@ -11,10 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include #include "compute_pressure_cylinder.h" +#include +#include #include "atom.h" #include "update.h" #include "force.h" @@ -22,7 +21,6 @@ #include "neighbor.h" #include "neigh_request.h" #include "neigh_list.h" -#include "group.h" #include "memory.h" #include "error.h" #include "citeme.h" diff --git a/src/USER-MISC/compute_pressure_grem.cpp b/src/USER-MISC/compute_pressure_grem.cpp index 087c01bd8e..ba949727b0 100644 --- a/src/USER-MISC/compute_pressure_grem.cpp +++ b/src/USER-MISC/compute_pressure_grem.cpp @@ -11,17 +11,13 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include #include "compute_pressure_grem.h" -#include "atom.h" +#include #include "update.h" #include "domain.h" #include "modify.h" #include "fix.h" #include "force.h" -#include "pair.h" #include "kspace.h" #include "error.h" diff --git a/src/USER-MISC/compute_stress_mop.cpp b/src/USER-MISC/compute_stress_mop.cpp index cb2a0b9713..2f932321e1 100644 --- a/src/USER-MISC/compute_stress_mop.cpp +++ b/src/USER-MISC/compute_stress_mop.cpp @@ -15,18 +15,14 @@ Contributing Authors : Romain Vermorel (LFCR), Laurent Joly (ULyon) --------------------------------------------------------------------------*/ +#include "compute_stress_mop.h" #include #include #include -#include -#include "compute_stress_mop.h" #include "atom.h" #include "update.h" #include "domain.h" -#include "group.h" -#include "modify.h" -#include "fix.h" #include "neighbor.h" #include "force.h" #include "pair.h" diff --git a/src/USER-MISC/compute_stress_mop_profile.cpp b/src/USER-MISC/compute_stress_mop_profile.cpp index 5499a37a46..5f6d0a36b2 100644 --- a/src/USER-MISC/compute_stress_mop_profile.cpp +++ b/src/USER-MISC/compute_stress_mop_profile.cpp @@ -15,18 +15,14 @@ Contributing Authors : Romain Vermorel (LFCR), Laurent Joly (ULyon) --------------------------------------------------------------------------*/ +#include "compute_stress_mop_profile.h" #include #include #include -#include -#include "compute_stress_mop_profile.h" #include "atom.h" #include "update.h" #include "domain.h" -#include "group.h" -#include "modify.h" -#include "fix.h" #include "neighbor.h" #include "force.h" #include "pair.h" diff --git a/src/USER-MISC/compute_temp_rotate.cpp b/src/USER-MISC/compute_temp_rotate.cpp index 36093bd1e1..94c6115186 100644 --- a/src/USER-MISC/compute_temp_rotate.cpp +++ b/src/USER-MISC/compute_temp_rotate.cpp @@ -15,16 +15,13 @@ Contributing author: Laurent Joly (U Lyon, France), ljoly.ulyon@gmail.com ------------------------------------------------------------------------- */ -#include -#include -#include #include "compute_temp_rotate.h" +#include #include "atom.h" #include "update.h" #include "force.h" #include "group.h" #include "domain.h" -#include "lattice.h" #include "error.h" #include "memory.h" diff --git a/src/USER-MISC/dihedral_cosine_shift_exp.cpp b/src/USER-MISC/dihedral_cosine_shift_exp.cpp index c411ea8150..820dfabdeb 100644 --- a/src/USER-MISC/dihedral_cosine_shift_exp.cpp +++ b/src/USER-MISC/dihedral_cosine_shift_exp.cpp @@ -15,14 +15,12 @@ Contributing author: Carsten Svaneborg, science@zqex.dk ------------------------------------------------------------------------- */ +#include "dihedral_cosine_shift_exp.h" #include #include -#include -#include "dihedral_cosine_shift_exp.h" #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" #include "force.h" #include "update.h" #include "memory.h" diff --git a/src/USER-MISC/dihedral_fourier.cpp b/src/USER-MISC/dihedral_fourier.cpp index af86259c01..7cc250b1a8 100644 --- a/src/USER-MISC/dihedral_fourier.cpp +++ b/src/USER-MISC/dihedral_fourier.cpp @@ -16,16 +16,13 @@ [ based on dihedral_charmm.cpp Paul Crozier (SNL) ] ------------------------------------------------------------------------- */ +#include "dihedral_fourier.h" #include #include -#include -#include "dihedral_fourier.h" #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" #include "force.h" -#include "pair.h" #include "update.h" #include "math_const.h" #include "memory.h" diff --git a/src/USER-MISC/dihedral_nharmonic.cpp b/src/USER-MISC/dihedral_nharmonic.cpp index ea2b76f415..f1e0018689 100644 --- a/src/USER-MISC/dihedral_nharmonic.cpp +++ b/src/USER-MISC/dihedral_nharmonic.cpp @@ -16,12 +16,11 @@ [ based on dihedral_multi_harmonic.cpp Mathias Puetz (SNL) and friends ] ------------------------------------------------------------------------- */ -#include -#include #include "dihedral_nharmonic.h" +#include +#include #include "atom.h" #include "neighbor.h" -#include "domain.h" #include "comm.h" #include "force.h" #include "update.h" diff --git a/src/USER-MISC/dihedral_quadratic.cpp b/src/USER-MISC/dihedral_quadratic.cpp index 8436e73c5c..02effc2f4f 100644 --- a/src/USER-MISC/dihedral_quadratic.cpp +++ b/src/USER-MISC/dihedral_quadratic.cpp @@ -16,12 +16,11 @@ [ based on dihedral_helix.cpp Paul Crozier (SNL) ] ------------------------------------------------------------------------- */ -#include -#include #include "dihedral_quadratic.h" +#include +#include #include "atom.h" #include "neighbor.h" -#include "domain.h" #include "comm.h" #include "force.h" #include "update.h" diff --git a/src/USER-MISC/dihedral_spherical.cpp b/src/USER-MISC/dihedral_spherical.cpp index 3b30121551..78d45f923d 100644 --- a/src/USER-MISC/dihedral_spherical.cpp +++ b/src/USER-MISC/dihedral_spherical.cpp @@ -17,22 +17,19 @@ and Paul Crozier (SNL) ] ------------------------------------------------------------------------- */ +#include "dihedral_spherical.h" #include #include -#include #include #include "atom.h" #include "comm.h" #include "neighbor.h" #include "domain.h" #include "force.h" -#include "pair.h" -#include "update.h" #include "math_const.h" #include "math_extra.h" #include "memory.h" #include "error.h" -#include "dihedral_spherical.h" using namespace std; using namespace LAMMPS_NS; diff --git a/src/USER-MISC/dihedral_table.cpp b/src/USER-MISC/dihedral_table.cpp index a97ae3649f..7fa871d3be 100644 --- a/src/USER-MISC/dihedral_table.cpp +++ b/src/USER-MISC/dihedral_table.cpp @@ -17,21 +17,20 @@ the "tridiag.c" written by Gerard Jungman for GSL ------------------------------------------------------------------------- */ +#include +#include #include #include #include -#include #include -#include -#include -#include +#include // IWYU pragma: keep +#include // IWYU pragma: keep #include "atom.h" #include "comm.h" #include "neighbor.h" #include "domain.h" #include "force.h" -#include "update.h" #include "memory.h" #include "error.h" #include "dihedral_table.h" diff --git a/src/USER-MISC/dihedral_table_cut.cpp b/src/USER-MISC/dihedral_table_cut.cpp index 18a645cd75..71f9ea0df1 100644 --- a/src/USER-MISC/dihedral_table_cut.cpp +++ b/src/USER-MISC/dihedral_table_cut.cpp @@ -16,25 +16,23 @@ Based on tabulated dihedral (dihedral_table.cpp) by Andrew Jewett ------------------------------------------------------------------------- */ +#include "dihedral_table_cut.h" +#include +#include #include #include #include -#include #include -#include -#include -#include +#include // IWYU pragma: keep +#include // IWYU pragma: keep -#include "dihedral_table_cut.h" #include "atom.h" #include "neighbor.h" #include "update.h" -#include "domain.h" #include "comm.h" #include "force.h" #include "citeme.h" #include "math_const.h" -#include "math_extra.h" #include "memory.h" #include "error.h" #include "utils.h" @@ -42,8 +40,6 @@ using namespace LAMMPS_NS; using namespace MathConst; using namespace std; -using namespace MathExtra; - static const char cite_dihedral_tablecut[] = "dihedral_style table/cut command:\n\n" diff --git a/src/USER-MISC/fix_addtorque.cpp b/src/USER-MISC/fix_addtorque.cpp index 2cd1ac7527..665f1d4a60 100644 --- a/src/USER-MISC/fix_addtorque.cpp +++ b/src/USER-MISC/fix_addtorque.cpp @@ -15,9 +15,9 @@ Contributing author: Laurent Joly (U Lyon, France), ljoly.ulyon@gmail.com ------------------------------------------------------------------------- */ -#include -#include #include "fix_addtorque.h" +#include +#include #include "atom.h" #include "update.h" #include "modify.h" @@ -25,7 +25,6 @@ #include "respa.h" #include "input.h" #include "variable.h" -#include "memory.h" #include "error.h" #include "group.h" #include "force.h" diff --git a/src/USER-MISC/fix_ave_correlate_long.cpp b/src/USER-MISC/fix_ave_correlate_long.cpp index dc52d94b14..b1bcc07fa7 100644 --- a/src/USER-MISC/fix_ave_correlate_long.cpp +++ b/src/USER-MISC/fix_ave_correlate_long.cpp @@ -21,11 +21,12 @@ see J. Chem. Phys. 133, 154103 (2010) ------------------------------------------------------------------------- */ +#include "fix_ave_correlate_long.h" +#include #include #include #include #include -#include "fix_ave_correlate_long.h" #include "update.h" #include "modify.h" #include "compute.h" diff --git a/src/USER-MISC/fix_bond_react.cpp b/src/USER-MISC/fix_bond_react.cpp index c641912db6..ef23f98d64 100644 --- a/src/USER-MISC/fix_bond_react.cpp +++ b/src/USER-MISC/fix_bond_react.cpp @@ -15,11 +15,10 @@ See the README file in the top-level LAMMPS directory. Contributing Author: Jacob Gissinger (jacob.gissinger@colorado.edu) ------------------------------------------------------------------------- */ +#include "fix_bond_react.h" #include #include #include -#include -#include "fix_bond_react.h" #include "update.h" #include "modify.h" #include "respa.h" diff --git a/src/USER-MISC/fix_electron_stopping.cpp b/src/USER-MISC/fix_electron_stopping.cpp index 0831ebcf89..2130f07420 100644 --- a/src/USER-MISC/fix_electron_stopping.cpp +++ b/src/USER-MISC/fix_electron_stopping.cpp @@ -16,16 +16,14 @@ Information: k.avchachov@gmail.com ------------------------------------------------------------------------- */ -#include -#include -#include #include "fix_electron_stopping.h" +#include +#include #include "mpi.h" #include "atom.h" #include "update.h" #include "domain.h" #include "region.h" -#include "group.h" #include "force.h" #include "fix.h" #include "memory.h" diff --git a/src/USER-MISC/fix_ffl.cpp b/src/USER-MISC/fix_ffl.cpp index 9ab113aeaa..a245b6b4e5 100644 --- a/src/USER-MISC/fix_ffl.cpp +++ b/src/USER-MISC/fix_ffl.cpp @@ -18,31 +18,21 @@ /* ---------------------------------------------------------------------- Contributing authors: Lionel Constantin (EPFL), David M. Wilkins (EPFL), - Michele Ceriotti (EPFL) + Michele Ceriotti (EPFL) ------------------------------------------------------------------------- */ +#include "fix_ffl.h" #include #include #include -#include -#include "fix_ffl.h" -#include "math_extra.h" #include "atom.h" -#include "atom_vec_ellipsoid.h" #include "force.h" #include "update.h" -#include "modify.h" -#include "compute.h" -#include "domain.h" -#include "region.h" #include "respa.h" #include "comm.h" -#include "input.h" -#include "variable.h" #include "random_mars.h" #include "memory.h" #include "error.h" -#include "group.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-MISC/fix_filter_corotate.cpp b/src/USER-MISC/fix_filter_corotate.cpp index f6cc1c435f..bfc5f58f93 100644 --- a/src/USER-MISC/fix_filter_corotate.cpp +++ b/src/USER-MISC/fix_filter_corotate.cpp @@ -16,30 +16,25 @@ some subroutines are from fix_shake.cpp ------------------------------------------------------------------------- */ +#include "fix_filter_corotate.h" #include +#include +#include #include #include -#include "fix_filter_corotate.h" #include "atom.h" #include "atom_vec.h" -#include "molecule.h" -#include "bond.h" +#include "comm.h" +#include "domain.h" #include "angle.h" +#include "bond.h" #include "math_const.h" #include "update.h" #include "modify.h" -#include "domain.h" -#include "region.h" #include "memory.h" #include "error.h" #include "force.h" -#include "comm.h" -#include "error.h" -#include "memory.h" -#include "domain.h" -#include "integrate.h" #include "respa.h" -#include "neighbor.h" #include "citeme.h" using namespace LAMMPS_NS; diff --git a/src/USER-MISC/fix_flow_gauss.cpp b/src/USER-MISC/fix_flow_gauss.cpp index b6366ec509..70be1f1e45 100644 --- a/src/USER-MISC/fix_flow_gauss.cpp +++ b/src/USER-MISC/fix_flow_gauss.cpp @@ -16,13 +16,12 @@ Joel.Eaves@Colorado.edu ------------------------------------------------------------------------- */ -#include -#include #include "fix_flow_gauss.h" +#include +#include #include "atom.h" #include "force.h" #include "group.h" -#include "comm.h" #include "update.h" #include "domain.h" #include "error.h" diff --git a/src/USER-MISC/fix_gle.cpp b/src/USER-MISC/fix_gle.cpp index 01da7f87cf..b8bdc66d08 100644 --- a/src/USER-MISC/fix_gle.cpp +++ b/src/USER-MISC/fix_gle.cpp @@ -16,28 +16,19 @@ Axel Kohylmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "fix_gle.h" #include #include #include #include -#include "fix_gle.h" -#include "math_extra.h" #include "atom.h" -#include "atom_vec_ellipsoid.h" #include "force.h" #include "update.h" -#include "modify.h" -#include "compute.h" -#include "domain.h" -#include "region.h" #include "respa.h" #include "comm.h" -#include "input.h" -#include "variable.h" #include "random_mars.h" #include "memory.h" #include "error.h" -#include "group.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-MISC/fix_grem.cpp b/src/USER-MISC/fix_grem.cpp index 635acf705c..4272740068 100644 --- a/src/USER-MISC/fix_grem.cpp +++ b/src/USER-MISC/fix_grem.cpp @@ -22,19 +22,14 @@ Tom Keyes (Boston University) ------------------------------------------------------------------------- */ -#include -#include -#include -#include "comm.h" #include "fix_grem.h" +#include #include "atom.h" #include "force.h" #include "update.h" #include "modify.h" #include "domain.h" -#include "input.h" #include "compute.h" -#include "memory.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/USER-MISC/fix_ipi.cpp b/src/USER-MISC/fix_ipi.cpp index 32892d87a8..08b39ee89b 100644 --- a/src/USER-MISC/fix_ipi.cpp +++ b/src/USER-MISC/fix_ipi.cpp @@ -15,15 +15,12 @@ Contributing author: Michele Ceriotti (EPFL), Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include -#include -#include -#include #include "fix_ipi.h" +#include +#include #include "atom.h" #include "force.h" #include "update.h" -#include "respa.h" #include "error.h" #include "kspace.h" #include "modify.h" @@ -32,8 +29,6 @@ #include "neighbor.h" #include "irregular.h" #include "domain.h" -#include "compute_pressure.h" -#include using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-MISC/fix_nvk.cpp b/src/USER-MISC/fix_nvk.cpp index 2ac2a7c9fc..410a269f8c 100644 --- a/src/USER-MISC/fix_nvk.cpp +++ b/src/USER-MISC/fix_nvk.cpp @@ -15,18 +15,16 @@ Contributing author: Efrem Braun (UC Berkeley) ------------------------------------------------------------------------- */ -#include -#include -#include #include "fix_nvk.h" +#include +#include +#include #include "atom.h" #include "force.h" #include "update.h" #include "respa.h" #include "error.h" -#include "compute.h" #include "math_extra.h" -#include "domain.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-MISC/fix_pimd.cpp b/src/USER-MISC/fix_pimd.cpp index 3929d47d6b..8f790f0a59 100644 --- a/src/USER-MISC/fix_pimd.cpp +++ b/src/USER-MISC/fix_pimd.cpp @@ -21,10 +21,11 @@ Version 1.0 ------------------------------------------------------------------------- */ +#include "fix_pimd.h" +#include #include #include #include -#include "fix_pimd.h" #include "universe.h" #include "comm.h" #include "force.h" diff --git a/src/USER-MISC/fix_rhok.cpp b/src/USER-MISC/fix_rhok.cpp index 6a6e71ebaa..c638adf6a4 100644 --- a/src/USER-MISC/fix_rhok.cpp +++ b/src/USER-MISC/fix_rhok.cpp @@ -13,12 +13,11 @@ Contributing author: Ulf R. Pedersen, ulf@urp.dk ------------------------------------------------------------------------- */ -#include -#include +#include "fix_rhok.h" +#include #include #include -#include "fix_rhok.h" #include "atom.h" #include "domain.h" #include "error.h" diff --git a/src/USER-MISC/fix_smd.cpp b/src/USER-MISC/fix_smd.cpp index cbebdebdbf..32c040c2b4 100644 --- a/src/USER-MISC/fix_smd.cpp +++ b/src/USER-MISC/fix_smd.cpp @@ -16,10 +16,10 @@ based on fix spring by: Paul Crozier (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include #include "fix_smd.h" +#include +#include +#include #include "atom.h" #include "comm.h" #include "update.h" diff --git a/src/USER-MISC/fix_srp.cpp b/src/USER-MISC/fix_srp.cpp index ebc161ff99..c0db252db4 100644 --- a/src/USER-MISC/fix_srp.cpp +++ b/src/USER-MISC/fix_srp.cpp @@ -15,9 +15,10 @@ Contributing authors: Timothy Sirk (ARL), Pieter in't Veld (BASF) ------------------------------------------------------------------------- */ -#include -#include #include "fix_srp.h" +#include +#include +#include #include "atom.h" #include "force.h" #include "domain.h" @@ -635,11 +636,11 @@ void FixSRP::restart(char *buf) int FixSRP::modify_param(int /*narg*/, char **arg) { if (strcmp(arg[0],"btype") == 0) { - btype = atoi(arg[1]); + btype = force->inumeric(FLERR,arg[1]); return 2; } if (strcmp(arg[0],"bptype") == 0) { - bptype = atoi(arg[1]); + bptype = force->inumeric(FLERR,arg[1]); return 2; } return 0; diff --git a/src/USER-MISC/fix_ti_spring.cpp b/src/USER-MISC/fix_ti_spring.cpp index 305e29e033..8481b34a6b 100644 --- a/src/USER-MISC/fix_ti_spring.cpp +++ b/src/USER-MISC/fix_ti_spring.cpp @@ -18,9 +18,9 @@ Maurice de Koning (Unicamp/Brazil) - dekoning@ifi.unicamp.br ------------------------------------------------------------------------- */ -#include -#include #include "fix_ti_spring.h" +#include +#include #include "atom.h" #include "update.h" #include "domain.h" diff --git a/src/USER-MISC/fix_ttm_mod.cpp b/src/USER-MISC/fix_ttm_mod.cpp index a34c2eb42f..55526a9149 100644 --- a/src/USER-MISC/fix_ttm_mod.cpp +++ b/src/USER-MISC/fix_ttm_mod.cpp @@ -17,17 +17,14 @@ Vasily Pisarev (Joint Institute for High Temperatures of RAS) ------------------------------------------------------------------------- */ -#include "lmptype.h" +#include "fix_ttm_mod.h" #include #include #include -#include -#include "fix_ttm_mod.h" #include "atom.h" #include "force.h" #include "update.h" #include "domain.h" -#include "region.h" #include "respa.h" #include "comm.h" #include "random_mars.h" diff --git a/src/USER-MISC/fix_wall_ees.cpp b/src/USER-MISC/fix_wall_ees.cpp index 5ca16ebdad..bd7e230472 100644 --- a/src/USER-MISC/fix_wall_ees.cpp +++ b/src/USER-MISC/fix_wall_ees.cpp @@ -15,21 +15,13 @@ Contributing author: Abdoreza Ershadinia, a.ershadinia at gmail.com ------------------------------------------------------------------------- */ +#include "fix_wall_ees.h" #include #include "math_extra.h" -#include "fix_wall_ees.h" #include "atom.h" #include "atom_vec.h" #include "atom_vec_ellipsoid.h" -#include "domain.h" -#include "region.h" -#include "force.h" -#include "lattice.h" -#include "update.h" -#include "output.h" -#include "respa.h" #include "error.h" -#include "math_extra.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-MISC/fix_wall_region_ees.cpp b/src/USER-MISC/fix_wall_region_ees.cpp index 33bf636e64..5c6bb1874b 100644 --- a/src/USER-MISC/fix_wall_region_ees.cpp +++ b/src/USER-MISC/fix_wall_region_ees.cpp @@ -15,19 +15,16 @@ Contributing author: Abdoreza Ershadinia, a.ershadinia at gmail.com ------------------------------------------------------------------------- */ -#include -#include -#include #include "fix_wall_region_ees.h" +#include +#include +#include #include "atom.h" -#include "atom_vec.h" #include "atom_vec_ellipsoid.h" #include "domain.h" #include "region.h" #include "force.h" -#include "lattice.h" #include "update.h" -#include "output.h" #include "respa.h" #include "error.h" #include "math_extra.h"