refactor constant vs define in edip pair styles

This commit is contained in:
Axel Kohlmeyer
2020-12-18 22:55:15 -05:00
parent 2022dc0aa9
commit 151110f07f
4 changed files with 15 additions and 20 deletions

View File

@ -46,7 +46,7 @@ using namespace LAMMPS_NS;
// max number of interaction per atom for f(Z) environment potential
#define leadDimInteractionList 64
static constexpr int leadDimInteractionList = 64;
/* ---------------------------------------------------------------------- */

View File

@ -32,13 +32,11 @@
#include "error.h"
#include "citeme.h"
using namespace LAMMPS_NS;
#define MAXLINE 1024
#define DELTA 4
static const char cite_pair_edip[] =
"@article{cjiang2012\n"
" author = {Jian, Chao and Morgan, Dane, and Szlufarska, Izabella},\n"
@ -56,7 +54,9 @@ static const char cite_pair_edip[] =
" year = {2010},\n"
"}\n\n";
// max number of interaction per atom for f(Z) environment potential
static constexpr int leadDimInteractionList = 64;
/* ---------------------------------------------------------------------- */
@ -94,7 +94,6 @@ PairEDIPMulti::~PairEDIPMulti()
memory->destroy(cutsq);
delete [] map;
//XXX deallocateGrids();
deallocatePreLoops();
}
}

View File

@ -36,17 +36,17 @@ class PairEDIPMulti : public Pair {
protected:
struct Param {
double A, B;//coefficients for pair interaction I-J
double cutoffA;//cut-off distance for pair interaction I-J
double cutoffC;//lower cut-off distance for calculating Z_I
double alpha;//coefficient for calculating Z_I
double beta;//attractive term for pair I-J
double sigma;//cut-off coefficient for pair I-J
double rho;//pair I-J
double gamma;//coefficient for three-body interaction I-J-K
double eta, lambda;//coefficients for function h(l,Z)
double mu, Q0;//coefficients for function Q(Z)
double u1, u2, u3, u4;//coefficients for function tau(Z)
double A, B; // coefficients for pair interaction I-J
double cutoffA; // cut-off distance for pair interaction I-J
double cutoffC; // lower cut-off distance for calculating Z_I
double alpha; // coefficient for calculating Z_I
double beta; // attractive term for pair I-J
double sigma; // cut-off coefficient for pair I-J
double rho; // pair I-J
double gamma; // coefficient for three-body interaction I-J-K
double eta, lambda; // coefficients for function h(l,Z)
double mu, Q0; // coefficients for function Q(Z)
double u1, u2, u3, u4; // coefficients for function tau(Z)
double cutsq;
int ielement,jelement,kelement;
};
@ -62,10 +62,6 @@ class PairEDIPMulti : public Pair {
int maxparam; // max # of parameter sets
Param *params; // parameter set for an I-J-K interaction
// max number of interaction per atom for f(Z) environment potential
static const int leadDimInteractionList = 64;
void allocate();
void allocatePreLoops(void);
void deallocatePreLoops(void);

View File

@ -28,7 +28,7 @@ using namespace LAMMPS_NS;
// max number of interaction per atom for f(Z) environment potential
#define leadDimInteractionList 64
static constexpr int leadDimInteractionList = 64;
/* ---------------------------------------------------------------------- */