refactor constant vs define in edip pair styles
This commit is contained in:
@ -46,7 +46,7 @@ using namespace LAMMPS_NS;
|
|||||||
|
|
||||||
// max number of interaction per atom for f(Z) environment potential
|
// max number of interaction per atom for f(Z) environment potential
|
||||||
|
|
||||||
#define leadDimInteractionList 64
|
static constexpr int leadDimInteractionList = 64;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
|||||||
@ -32,13 +32,11 @@
|
|||||||
#include "error.h"
|
#include "error.h"
|
||||||
#include "citeme.h"
|
#include "citeme.h"
|
||||||
|
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
#define MAXLINE 1024
|
#define MAXLINE 1024
|
||||||
#define DELTA 4
|
#define DELTA 4
|
||||||
|
|
||||||
|
|
||||||
static const char cite_pair_edip[] =
|
static const char cite_pair_edip[] =
|
||||||
"@article{cjiang2012\n"
|
"@article{cjiang2012\n"
|
||||||
" author = {Jian, Chao and Morgan, Dane, and Szlufarska, Izabella},\n"
|
" author = {Jian, Chao and Morgan, Dane, and Szlufarska, Izabella},\n"
|
||||||
@ -56,7 +54,9 @@ static const char cite_pair_edip[] =
|
|||||||
" year = {2010},\n"
|
" year = {2010},\n"
|
||||||
"}\n\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);
|
memory->destroy(cutsq);
|
||||||
delete [] map;
|
delete [] map;
|
||||||
|
|
||||||
//XXX deallocateGrids();
|
|
||||||
deallocatePreLoops();
|
deallocatePreLoops();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,17 +36,17 @@ class PairEDIPMulti : public Pair {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
struct Param {
|
struct Param {
|
||||||
double A, B;//coefficients for pair interaction I-J
|
double A, B; // coefficients for pair interaction I-J
|
||||||
double cutoffA;//cut-off distance 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 cutoffC; // lower cut-off distance for calculating Z_I
|
||||||
double alpha;//coefficient for calculating Z_I
|
double alpha; // coefficient for calculating Z_I
|
||||||
double beta;//attractive term for pair I-J
|
double beta; // attractive term for pair I-J
|
||||||
double sigma;//cut-off coefficient for pair I-J
|
double sigma; // cut-off coefficient for pair I-J
|
||||||
double rho;//pair I-J
|
double rho; // pair I-J
|
||||||
double gamma;//coefficient for three-body interaction I-J-K
|
double gamma; // coefficient for three-body interaction I-J-K
|
||||||
double eta, lambda;//coefficients for function h(l,Z)
|
double eta, lambda; // coefficients for function h(l,Z)
|
||||||
double mu, Q0;//coefficients for function Q(Z)
|
double mu, Q0; // coefficients for function Q(Z)
|
||||||
double u1, u2, u3, u4;//coefficients for function tau(Z)
|
double u1, u2, u3, u4; // coefficients for function tau(Z)
|
||||||
double cutsq;
|
double cutsq;
|
||||||
int ielement,jelement,kelement;
|
int ielement,jelement,kelement;
|
||||||
};
|
};
|
||||||
@ -62,10 +62,6 @@ class PairEDIPMulti : public Pair {
|
|||||||
int maxparam; // max # of parameter sets
|
int maxparam; // max # of parameter sets
|
||||||
Param *params; // parameter set for an I-J-K interaction
|
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 allocate();
|
||||||
void allocatePreLoops(void);
|
void allocatePreLoops(void);
|
||||||
void deallocatePreLoops(void);
|
void deallocatePreLoops(void);
|
||||||
|
|||||||
@ -28,7 +28,7 @@ using namespace LAMMPS_NS;
|
|||||||
|
|
||||||
// max number of interaction per atom for f(Z) environment potential
|
// max number of interaction per atom for f(Z) environment potential
|
||||||
|
|
||||||
#define leadDimInteractionList 64
|
static constexpr int leadDimInteractionList = 64;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user