change flag name in pair.h: cntratmstressflag -> centroidstressflag
This commit is contained in:
@ -35,7 +35,7 @@ PairLJClass2::PairLJClass2(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
respa_enable = 1;
|
||||
writedata = 1;
|
||||
cntratmstressflag = 1;
|
||||
centroidstressflag = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -33,7 +33,7 @@ using namespace MathConst;
|
||||
PairLJClass2CoulCut::PairLJClass2CoulCut(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
cntratmstressflag = 1;
|
||||
centroidstressflag = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -40,7 +40,7 @@ PairPython::PairPython(LAMMPS *lmp) : Pair(lmp) {
|
||||
one_coeff = 1;
|
||||
reinitflag = 0;
|
||||
cut_global = 0.0;
|
||||
cntratmstressflag = 1;
|
||||
centroidstressflag = 1;
|
||||
|
||||
py_potential = NULL;
|
||||
skip_types = NULL;
|
||||
|
||||
@ -33,7 +33,7 @@ using namespace LAMMPS_NS;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
PairCoulCutSoft::PairCoulCutSoft(LAMMPS *lmp) : Pair(lmp) {
|
||||
cntratmstressflag = 1;
|
||||
centroidstressflag = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -33,7 +33,7 @@ using namespace MathConst;
|
||||
PairLJClass2CoulCutSoft::PairLJClass2CoulCutSoft(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
cntratmstressflag = 1;
|
||||
centroidstressflag = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -32,7 +32,7 @@ using namespace MathConst;
|
||||
PairLJClass2Soft::PairLJClass2Soft(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
cntratmstressflag = 1;
|
||||
centroidstressflag = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -37,7 +37,7 @@ using namespace MathConst;
|
||||
PairLJCutCoulCutSoft::PairLJCutCoulCutSoft(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
cntratmstressflag = 1;
|
||||
centroidstressflag = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -43,7 +43,7 @@ PairLJCutSoft::PairLJCutSoft(LAMMPS *lmp) : Pair(lmp)
|
||||
respa_enable = 1;
|
||||
writedata = 1;
|
||||
allocated = 0;
|
||||
cntratmstressflag = 1;
|
||||
centroidstressflag = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -82,7 +82,7 @@ void ThrOMP::ev_setup_thr(int eflag, int vflag, int nall, double *eatom,
|
||||
if (nall > 0)
|
||||
memset(&(thr->vatom_pair[0][0]),0,nall*6*sizeof(double));
|
||||
}
|
||||
// check cvatom_pair, because can't access cntratmstressflag
|
||||
// check cvatom_pair, because can't access centroidstressflag
|
||||
if ((vflag & 8) && cvatom) {
|
||||
thr->cvatom_pair = cvatom + tid*nall;
|
||||
if (nall > 0)
|
||||
@ -243,7 +243,7 @@ void ThrOMP::reduce_thr(void *style, const int eflag, const int vflag,
|
||||
if (vflag & 12) {
|
||||
data_reduce_thr(&(pair->vatom[0][0]), nall, nthreads, 6, tid);
|
||||
}
|
||||
// check cvatom_pair, because can't access cntratmstressflag
|
||||
// check cvatom_pair, because can't access centroidstressflag
|
||||
if ((vflag & 8) && thr->cvatom_pair) {
|
||||
data_reduce_thr(&(pair->cvatom[0][0]), nall, nthreads, 9, tid);
|
||||
}
|
||||
@ -394,7 +394,7 @@ void ThrOMP::reduce_thr(void *style, const int eflag, const int vflag,
|
||||
if (vflag & 12) {
|
||||
data_reduce_thr(&(pair->vatom[0][0]), nall, nthreads, 6, tid);
|
||||
}
|
||||
// check cvatom_pair, because can't access cntratmstressflag
|
||||
// check cvatom_pair, because can't access centroidstressflag
|
||||
if ((vflag & 8) && thr->cvatom_pair) {
|
||||
data_reduce_thr(&(pair->cvatom[0][0]), nall, nthreads, 9, tid);
|
||||
}
|
||||
|
||||
@ -126,7 +126,7 @@ void ComputeCentroidStressAtom::init()
|
||||
|
||||
// check if pair styles support centroid atom stress
|
||||
if (pairflag && force->pair)
|
||||
if (force->pair->cntratmstressflag & 4)
|
||||
if (force->pair->centroidstressflag & 4)
|
||||
error->all(FLERR, "Pair style does not support compute centroid/stress/atom");
|
||||
}
|
||||
|
||||
@ -178,7 +178,7 @@ void ComputeCentroidStressAtom::compute_peratom()
|
||||
// per-atom virial and per-atom centroid virial are the same for pairwise
|
||||
// many-body pair styles not yet implemented
|
||||
if (pairflag && force->pair) {
|
||||
if (force->pair->cntratmstressflag & 2) {
|
||||
if (force->pair->centroidstressflag & 2) {
|
||||
double **cvatom = force->pair->cvatom;
|
||||
for (i = 0; i < npair; i++)
|
||||
for (j = 0; j < 9; j++)
|
||||
|
||||
@ -72,7 +72,7 @@ Pair::Pair(LAMMPS *lmp) : Pointers(lmp)
|
||||
|
||||
ewaldflag = pppmflag = msmflag = dispersionflag = tip4pflag = dipoleflag = spinflag = 0;
|
||||
reinitflag = 1;
|
||||
cntratmstressflag = 4;
|
||||
centroidstressflag = 4;
|
||||
|
||||
// pair_modify settings
|
||||
|
||||
@ -786,13 +786,13 @@ void Pair::ev_setup(int eflag, int vflag, int alloc)
|
||||
vflag_atom = vflag & 4;
|
||||
|
||||
if (vflag & 8) {
|
||||
if (cntratmstressflag & 2) {
|
||||
if (centroidstressflag & 2) {
|
||||
cvflag_atom = 1;
|
||||
} else {
|
||||
vflag_atom = 1;
|
||||
}
|
||||
// extra check, because both bits might be set
|
||||
if (cntratmstressflag & 1) vflag_atom = 1;
|
||||
if (centroidstressflag & 1) vflag_atom = 1;
|
||||
}
|
||||
|
||||
vflag_either = vflag_global || vflag_atom;
|
||||
|
||||
@ -66,7 +66,7 @@ class Pair : protected Pointers {
|
||||
int spinflag; // 1 if compatible with spin solver
|
||||
int reinitflag; // 1 if compatible with fix adapt and alike
|
||||
|
||||
int cntratmstressflag; // compatibility with centroid atomic stress
|
||||
int centroidstressflag; // compatibility with centroid atomic stress
|
||||
// 1 if same as pairwise atomic stress
|
||||
// 2 if implemented and different from pairwise
|
||||
// 4 if not compatible/implemented
|
||||
|
||||
@ -33,7 +33,7 @@ using namespace MathSpecial;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
PairBeck::PairBeck(LAMMPS *lmp) : Pair(lmp) {
|
||||
cntratmstressflag = 1;
|
||||
centroidstressflag = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -32,7 +32,7 @@ using namespace MathConst;
|
||||
PairBuck::PairBuck(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
cntratmstressflag = 1;
|
||||
centroidstressflag = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -36,7 +36,7 @@ using namespace MathConst;
|
||||
PairBuckCoulCut::PairBuckCoulCut(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
cntratmstressflag = 1;
|
||||
centroidstressflag = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -29,7 +29,7 @@ using namespace LAMMPS_NS;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
PairCoulCut::PairCoulCut(LAMMPS *lmp) : Pair(lmp) {
|
||||
cntratmstressflag = 1;
|
||||
centroidstressflag = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -44,7 +44,7 @@ using namespace MathConst;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
PairCoulDSF::PairCoulDSF(LAMMPS *lmp) : Pair(lmp) {
|
||||
cntratmstressflag = 1;
|
||||
centroidstressflag = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -36,7 +36,7 @@ using namespace MathConst;
|
||||
PairCoulWolf::PairCoulWolf(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
single_enable = 0; // NOTE: single() method below is not yet correct
|
||||
cntratmstressflag = 1;
|
||||
centroidstressflag = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -43,7 +43,7 @@ PairHybrid::PairHybrid(LAMMPS *lmp) : Pair(lmp),
|
||||
|
||||
// assume pair hybrid always supports centroid atomic stress,
|
||||
// so that cflag_atom gets set when needed
|
||||
cntratmstressflag = 2;
|
||||
centroidstressflag = 2;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -166,7 +166,7 @@ void PairHybrid::compute(int eflag, int vflag)
|
||||
if (cvflag_atom) {
|
||||
n = atom->nlocal;
|
||||
if (force->newton_pair) n += atom->nghost;
|
||||
if (styles[m]->cntratmstressflag & 2) {
|
||||
if (styles[m]->centroidstressflag & 2) {
|
||||
double **cvatom_substyle = styles[m]->cvatom;
|
||||
for (i = 0; i < n; i++)
|
||||
for (j = 0; j < 9; j++)
|
||||
@ -384,7 +384,7 @@ void PairHybrid::flags()
|
||||
if (styles[m]->dispersionflag) dispersionflag = 1;
|
||||
if (styles[m]->tip4pflag) tip4pflag = 1;
|
||||
if (styles[m]->compute_flag) compute_flag = 1;
|
||||
cntratmstressflag |= styles[m]->cntratmstressflag;
|
||||
centroidstressflag |= styles[m]->centroidstressflag;
|
||||
}
|
||||
init_svector();
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ using namespace PairLJCubicConstants;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
PairLJCubic::PairLJCubic(LAMMPS *lmp) : Pair(lmp) {
|
||||
cntratmstressflag = 1;
|
||||
centroidstressflag = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -41,7 +41,7 @@ PairLJCut::PairLJCut(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
respa_enable = 1;
|
||||
writedata = 1;
|
||||
cntratmstressflag = 1;
|
||||
centroidstressflag = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -33,7 +33,7 @@ using namespace MathConst;
|
||||
PairLJCutCoulCut::PairLJCutCoulCut(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
cntratmstressflag = 1;
|
||||
centroidstressflag = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -46,7 +46,7 @@ using namespace MathConst;
|
||||
PairLJCutCoulDSF::PairLJCutCoulDSF(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
single_enable = 0;
|
||||
cntratmstressflag = 1;
|
||||
centroidstressflag = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -37,7 +37,7 @@ PairLJCutCoulWolf::PairLJCutCoulWolf(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
single_enable = 0;
|
||||
writedata = 1;
|
||||
cntratmstressflag = 1;
|
||||
centroidstressflag = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -32,7 +32,7 @@ using namespace MathConst;
|
||||
PairLJExpand::PairLJExpand(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
cntratmstressflag = 1;
|
||||
centroidstressflag = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -34,7 +34,7 @@ using namespace LAMMPS_NS;
|
||||
PairLJGromacsCoulGromacs::PairLJGromacsCoulGromacs(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
cntratmstressflag = 1;
|
||||
centroidstressflag = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -33,7 +33,7 @@ using namespace LAMMPS_NS;
|
||||
PairLJSmooth::PairLJSmooth(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
cntratmstressflag = 1;
|
||||
centroidstressflag = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -32,7 +32,7 @@ using namespace LAMMPS_NS;
|
||||
|
||||
PairLJSmoothLinear::PairLJSmoothLinear(LAMMPS *lmp) : Pair(lmp) {
|
||||
single_hessian_enable = 1;
|
||||
cntratmstressflag = 1;
|
||||
centroidstressflag = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -30,7 +30,7 @@ using namespace LAMMPS_NS;
|
||||
PairMorse::PairMorse(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
cntratmstressflag = 1;
|
||||
centroidstressflag = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -36,7 +36,7 @@ using namespace LAMMPS_NS;
|
||||
PairUFM::PairUFM(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
cntratmstressflag = 1;
|
||||
centroidstressflag = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user