Commit 6226ec88 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

import enum{GEOMETRIC,ARITHMETIC,SIXTHPOWER} from pair.h

parent 12242963
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -39,8 +39,6 @@ using namespace MathSpecial;

#define SMALL 0.00001

enum{GEOMETRIC,ARITHMETIC,SIXTHPOWER};   // same as in pair.h

//#define DEBUG

/* ---------------------------------------------------------------------- */
@@ -116,7 +114,7 @@ void EwaldDisp::init()
  if (!(ptr||cutoff))
    error->all(FLERR,"KSpace style is incompatible with Pair style");
  int ewald_order = ptr ? *((int *) ptr) : 1<<1;
  int ewald_mix = ptr ? *((int *) pair->extract("ewald_mix",tmp)) : GEOMETRIC;
  int ewald_mix = ptr ? *((int *) pair->extract("ewald_mix",tmp)) : Pair::GEOMETRIC;
  memset(function, 0, EWALD_NFUNCS*sizeof(int));
  for (int i=0; i<=EWALD_NORDER; ++i)                        // transcribe order
    if (ewald_order&(1<<i)) {                                // from pair_style
@@ -127,8 +125,8 @@ void EwaldDisp::init()
        case 3:
          k = 3; break;
        case 6:
          if (ewald_mix==GEOMETRIC) { k = 1; break; }
          else if (ewald_mix==ARITHMETIC) { k = 2; break; }
          if (ewald_mix==Pair::GEOMETRIC) { k = 1; break; }
          else if (ewald_mix==Pair::ARITHMETIC) { k = 2; break; }
          error->all(FLERR,
                     "Unsupported mixing rule in kspace_style ewald/disp");
        default:
+3 −4
Original line number Diff line number Diff line
@@ -46,7 +46,6 @@ using namespace MathConst;
#define LARGE 10000.0
#define EPS_HOC 1.0e-7

enum{GEOMETRIC,ARITHMETIC,SIXTHPOWER};
enum{REVERSE_RHO, REVERSE_RHO_G, REVERSE_RHO_A, REVERSE_RHO_NONE};
enum{FORWARD_IK, FORWARD_AD, FORWARD_IK_PERATOM, FORWARD_AD_PERATOM,
     FORWARD_IK_G, FORWARD_AD_G, FORWARD_IK_PERATOM_G, FORWARD_AD_PERATOM_G,
@@ -304,7 +303,7 @@ void PPPMDisp::init()
  // check out which types of potentials will have to be calculated

  int ewald_order = ptr ? *((int *) ptr) : 1<<1;
  int ewald_mix = ptr ? *((int *) pair->extract("ewald_mix",tmp)) : GEOMETRIC;
  int ewald_mix = ptr ? *((int *) pair->extract("ewald_mix",tmp)) : Pair::GEOMETRIC;
  memset(function, 0, EWALD_FUNCS*sizeof(int));
  for (int i=0; i<=EWALD_MAXORDER; ++i)                 // transcribe order
    if (ewald_order&(1<<i)) {                           // from pair_style
@@ -314,9 +313,9 @@ void PPPMDisp::init()
        case 1:
          k = 0; break;
        case 6:
          if ((ewald_mix==GEOMETRIC || ewald_mix==SIXTHPOWER ||
          if ((ewald_mix==Pair::GEOMETRIC || ewald_mix==Pair::SIXTHPOWER ||
               mixflag == 1) && mixflag!= 2) { k = 1; break; }
          else if (ewald_mix==ARITHMETIC && mixflag!=2) { k = 2; break; }
          else if (ewald_mix==Pair::ARITHMETIC && mixflag!=2) { k = 2; break; }
          else if (mixflag == 2) { k = 3; break; }
        default:
          sprintf(str, "Unsupported order in kspace_style "
+2 −2
Original line number Diff line number Diff line
@@ -96,6 +96,8 @@ class Pair : protected Pointers {
                                 //       public so external driver can check
  int compute_flag;              // 0 if skip compute()

  enum{GEOMETRIC,ARITHMETIC,SIXTHPOWER};   // mixing options

  // KOKKOS host/device flag and data masks

  ExecutionSpace execution_space;
@@ -191,8 +193,6 @@ class Pair : protected Pointers {
 protected:
  int instance_me;        // which Pair class instantiation I am

  enum{GEOMETRIC,ARITHMETIC,SIXTHPOWER};   // mixing options

  int special_lj[4];           // copied from force->special_lj for Kokkos

  int suffix_flag;             // suffix compatibility flag