Apply CENTROID_* constants
This commit is contained in:
@ -35,7 +35,7 @@ PairLJClass2::PairLJClass2(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
respa_enable = 1;
|
||||
writedata = 1;
|
||||
centroidstressflag = 1;
|
||||
centroidstressflag = CENTROID_SAME;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -33,7 +33,7 @@ using namespace MathConst;
|
||||
PairLJClass2CoulCut::PairLJClass2CoulCut(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
centroidstressflag = 1;
|
||||
centroidstressflag = CENTROID_SAME;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -41,7 +41,7 @@ PairPython::PairPython(LAMMPS *lmp) : Pair(lmp) {
|
||||
one_coeff = 1;
|
||||
reinitflag = 0;
|
||||
cut_global = 0.0;
|
||||
centroidstressflag = 1;
|
||||
centroidstressflag = CENTROID_SAME;
|
||||
|
||||
py_potential = nullptr;
|
||||
skip_types = nullptr;
|
||||
|
||||
@ -33,7 +33,7 @@ using namespace LAMMPS_NS;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
PairCoulCutSoft::PairCoulCutSoft(LAMMPS *lmp) : Pair(lmp) {
|
||||
centroidstressflag = 1;
|
||||
centroidstressflag = CENTROID_SAME;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -33,7 +33,7 @@ using namespace MathConst;
|
||||
PairLJClass2CoulCutSoft::PairLJClass2CoulCutSoft(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
centroidstressflag = 1;
|
||||
centroidstressflag = CENTROID_SAME;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -32,7 +32,7 @@ using namespace MathConst;
|
||||
PairLJClass2Soft::PairLJClass2Soft(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
centroidstressflag = 1;
|
||||
centroidstressflag = CENTROID_SAME;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -37,7 +37,7 @@ using namespace MathConst;
|
||||
PairLJCutCoulCutSoft::PairLJCutCoulCutSoft(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
centroidstressflag = 1;
|
||||
centroidstressflag = CENTROID_SAME;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -43,7 +43,7 @@ PairLJCutSoft::PairLJCutSoft(LAMMPS *lmp) : Pair(lmp)
|
||||
respa_enable = 1;
|
||||
writedata = 1;
|
||||
allocated = 0;
|
||||
centroidstressflag = 1;
|
||||
centroidstressflag = CENTROID_SAME;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -812,13 +812,13 @@ void Pair::ev_setup(int eflag, int vflag, int alloc)
|
||||
cvflag_atom = 0;
|
||||
|
||||
if (vflag & VIRIAL_CENTROID) {
|
||||
if (centroidstressflag & 2) {
|
||||
if (centroidstressflag & CENTROID_AVAIL) {
|
||||
cvflag_atom = 1;
|
||||
} else {
|
||||
vflag_atom = 1;
|
||||
}
|
||||
// extra check, because both bits might be set
|
||||
if (centroidstressflag & 1) vflag_atom = 1;
|
||||
if (centroidstressflag & CENTROID_SAME) vflag_atom = 1;
|
||||
}
|
||||
|
||||
vflag_either = vflag_global || vflag_atom;
|
||||
|
||||
@ -33,7 +33,7 @@ using namespace MathSpecial;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
PairBeck::PairBeck(LAMMPS *lmp) : Pair(lmp) {
|
||||
centroidstressflag = 1;
|
||||
centroidstressflag = CENTROID_SAME;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -32,7 +32,7 @@ using namespace MathConst;
|
||||
PairBuck::PairBuck(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
centroidstressflag = 1;
|
||||
centroidstressflag = CENTROID_SAME;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -36,7 +36,7 @@ using namespace MathConst;
|
||||
PairBuckCoulCut::PairBuckCoulCut(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
centroidstressflag = 1;
|
||||
centroidstressflag = CENTROID_SAME;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -29,7 +29,7 @@ using namespace LAMMPS_NS;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
PairCoulCut::PairCoulCut(LAMMPS *lmp) : Pair(lmp) {
|
||||
centroidstressflag = 1;
|
||||
centroidstressflag = CENTROID_SAME;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -44,7 +44,7 @@ using namespace MathConst;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
PairCoulDSF::PairCoulDSF(LAMMPS *lmp) : Pair(lmp) {
|
||||
centroidstressflag = 1;
|
||||
centroidstressflag = CENTROID_SAME;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -36,7 +36,7 @@ using namespace MathConst;
|
||||
PairCoulWolf::PairCoulWolf(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
single_enable = 0; // NOTE: single() method below is not yet correct
|
||||
centroidstressflag = 1;
|
||||
centroidstressflag = CENTROID_SAME;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -45,7 +45,7 @@ PairHybrid::PairHybrid(LAMMPS *lmp) : Pair(lmp),
|
||||
|
||||
// assume pair hybrid always supports centroid atomic stress,
|
||||
// so that cflag_atom gets set when needed
|
||||
centroidstressflag = 2;
|
||||
centroidstressflag = CENTROID_AVAIL;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -168,7 +168,7 @@ void PairHybrid::compute(int eflag, int vflag)
|
||||
if (cvflag_atom) {
|
||||
n = atom->nlocal;
|
||||
if (force->newton_pair) n += atom->nghost;
|
||||
if (styles[m]->centroidstressflag & 2) {
|
||||
if (styles[m]->centroidstressflag & CENTROID_AVAIL) {
|
||||
double **cvatom_substyle = styles[m]->cvatom;
|
||||
for (i = 0; i < n; i++)
|
||||
for (j = 0; j < 9; j++)
|
||||
@ -401,7 +401,7 @@ void PairHybrid::flags()
|
||||
if (styles[m]->dispersionflag) dispersionflag = 1;
|
||||
if (styles[m]->tip4pflag) tip4pflag = 1;
|
||||
if (styles[m]->compute_flag) compute_flag = 1;
|
||||
if (styles[m]->centroidstressflag & 4) centroidstressflag |= 4;
|
||||
if (styles[m]->centroidstressflag & CENTROID_NOTAVAIL) centroidstressflag |= CENTROID_NOTAVAIL;
|
||||
}
|
||||
single_enable = (single_enable == nstyles) ? 1 : 0;
|
||||
respa_enable = (respa_enable == nstyles) ? 1 : 0;
|
||||
|
||||
@ -33,7 +33,7 @@ using namespace PairLJCubicConstants;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
PairLJCubic::PairLJCubic(LAMMPS *lmp) : Pair(lmp) {
|
||||
centroidstressflag = 1;
|
||||
centroidstressflag = CENTROID_SAME;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -41,7 +41,7 @@ PairLJCut::PairLJCut(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
respa_enable = 1;
|
||||
writedata = 1;
|
||||
centroidstressflag = 1;
|
||||
centroidstressflag = CENTROID_SAME;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -33,7 +33,7 @@ using namespace MathConst;
|
||||
PairLJCutCoulCut::PairLJCutCoulCut(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
centroidstressflag = 1;
|
||||
centroidstressflag = CENTROID_SAME;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -46,7 +46,7 @@ using namespace MathConst;
|
||||
PairLJCutCoulDSF::PairLJCutCoulDSF(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
single_enable = 0;
|
||||
centroidstressflag = 1;
|
||||
centroidstressflag = CENTROID_SAME;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -37,7 +37,7 @@ PairLJCutCoulWolf::PairLJCutCoulWolf(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
single_enable = 0;
|
||||
writedata = 1;
|
||||
centroidstressflag = 1;
|
||||
centroidstressflag = CENTROID_SAME;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -32,7 +32,7 @@ using namespace MathConst;
|
||||
PairLJExpand::PairLJExpand(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
centroidstressflag = 1;
|
||||
centroidstressflag = CENTROID_SAME;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -34,7 +34,7 @@ using namespace LAMMPS_NS;
|
||||
PairLJGromacsCoulGromacs::PairLJGromacsCoulGromacs(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
centroidstressflag = 1;
|
||||
centroidstressflag = CENTROID_SAME;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -33,7 +33,7 @@ using namespace LAMMPS_NS;
|
||||
PairLJSmooth::PairLJSmooth(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
centroidstressflag = 1;
|
||||
centroidstressflag = CENTROID_SAME;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -32,7 +32,7 @@ using namespace LAMMPS_NS;
|
||||
|
||||
PairLJSmoothLinear::PairLJSmoothLinear(LAMMPS *lmp) : Pair(lmp) {
|
||||
single_hessian_enable = 1;
|
||||
centroidstressflag = 1;
|
||||
centroidstressflag = CENTROID_SAME;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -30,7 +30,7 @@ using namespace LAMMPS_NS;
|
||||
PairMorse::PairMorse(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
centroidstressflag = 1;
|
||||
centroidstressflag = CENTROID_SAME;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -36,7 +36,7 @@ using namespace LAMMPS_NS;
|
||||
PairUFM::PairUFM(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
centroidstressflag = 1;
|
||||
centroidstressflag = CENTROID_SAME;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user