git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8195 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2012-05-30 14:08:36 +00:00
parent 59fa5d6cd1
commit a0f5ea214a
5 changed files with 10 additions and 13 deletions

View File

@ -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;

View File

@ -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

View File

@ -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) &&

View File

@ -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

View File

@ -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;