diff --git a/src/COLLOID/pair_colloid.h b/src/COLLOID/pair_colloid.h index 78fc7444ad..a9b720330a 100644 --- a/src/COLLOID/pair_colloid.h +++ b/src/COLLOID/pair_colloid.h @@ -38,9 +38,9 @@ class PairColloid : public Pair { void read_restart_settings(FILE *); double single(int, int, int, int, double, double, double, double &); + protected: enum {SMALL_SMALL,SMALL_LARGE,LARGE_LARGE}; - protected: double cut_global; double **cut; double **a12,**d1,**d2,**diameter,**a1,**a2,**offset; diff --git a/src/lattice.h b/src/lattice.h index c539856655..a293d835a0 100644 --- a/src/lattice.h +++ b/src/lattice.h @@ -20,7 +20,7 @@ namespace LAMMPS_NS { class Lattice : protected Pointers { public: - int style; // enum list of NONE,SC,FCC,etc + int style; // NONE,SC,FCC,etc double xlattice,ylattice,zlattice; // lattice scale factors in 3 dims double a1[3],a2[3],a3[3]; // edge vectors of unit cell int nbasis; // # of basis atoms in unit cell diff --git a/src/pair.cpp b/src/pair.cpp index 6d4a4099d8..2587dd7c7c 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -38,7 +38,7 @@ using namespace LAMMPS_NS; enum{GEOMETRIC,ARITHMETIC,SIXTHPOWER}; -enum{R,RSQ,BMP}; +enum{RLINEAR,RSQ,BMP}; /* ---------------------------------------------------------------------- */ @@ -1031,7 +1031,7 @@ void Pair::write_file(int narg, char **arg) int n = atoi(arg[2]); int style; - if (strcmp(arg[3],"r") == 0) style = R; + if (strcmp(arg[3],"r") == 0) style = RLINEAR; else if (strcmp(arg[3],"rsq") == 0) style = RSQ; else if (strcmp(arg[3],"bitmap") == 0) style = BMP; else error->all(FLERR,"Invalid style in pair_write command"); @@ -1052,7 +1052,7 @@ void Pair::write_file(int narg, char **arg) if (fp == NULL) error->one(FLERR,"Cannot open pair_write file"); fprintf(fp,"# Pair potential %s for atom types %d %d: i,r,energy,force\n", force->pair_style,itype,jtype); - if (style == R) + if (style == RLINEAR) fprintf(fp,"\n%s\nN %d R %g %g\n\n",arg[7],n,inner,outer); if (style == RSQ) fprintf(fp,"\n%s\nN %d RSQ %g %g\n\n",arg[7],n,inner,outer); @@ -1102,7 +1102,7 @@ void Pair::write_file(int narg, char **arg) union_int_float_t rsq_lookup; for (int i = 0; i < n; i++) { - if (style == R) { + if (style == RLINEAR) { r = inner + (outer-inner) * i/(n-1); rsq = r*r; } else if (style == RSQ) { @@ -1148,7 +1148,8 @@ void Pair::init_bitmap(double inner, double outer, int ntablebits, if (ntablebits > sizeof(float)*CHAR_BIT) error->all(FLERR,"Too many total bits for bitmapped lookup table"); - if (inner >= outer) error->warning(FLERR,"Table inner cutoff >= outer cutoff"); + if (inner >= outer) + error->warning(FLERR,"Table inner cutoff >= outer cutoff"); int nlowermin = 1; while (!((pow(double(2),nlowermin) <= inner*inner) && diff --git a/src/pair_table.cpp b/src/pair_table.cpp index a2465a594a..3624f2190f 100644 --- a/src/pair_table.cpp +++ b/src/pair_table.cpp @@ -29,11 +29,6 @@ using namespace LAMMPS_NS; -#define LOOKUP 0 -#define LINEAR 1 -#define SPLINE 2 -#define BITMAP 3 - #define R 1 #define RSQ 2 #define BMP 3 diff --git a/src/pair_table.h b/src/pair_table.h index 11ffa4d758..ac5d28ec6c 100644 --- a/src/pair_table.h +++ b/src/pair_table.h @@ -41,8 +41,9 @@ class PairTable : public Pair { void *extract(const char *, int &); protected: + enum{LOOKUP,LINEAR,SPLINE,BITMAP}; + int tabstyle,tablength; - enum {LOOKUP=0, LINEAR=1, SPLINE=2, BITMAP=3}; struct Table { int ninput,rflag,fpflag,match,ntablebits; int nshiftbits,nmask;