standardize flags for energy/virial computations in forces

This commit is contained in:
Steve Plimpton
2020-11-16 08:13:33 -07:00
parent aaae3da12a
commit dd23db9369
12 changed files with 100 additions and 39 deletions

View File

@ -126,7 +126,7 @@ void ComputeCentroidStressAtom::init()
// check if pair styles support centroid atom stress
if (pairflag && force->pair)
if (force->pair->centroidstressflag & 4)
if (force->pair->centroidstressflag == CENTROID_NOTAVAIL)
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 two-body
// many-body pair styles not yet implemented
if (pairflag && force->pair && force->pair->compute_flag) {
if (force->pair->centroidstressflag & 2) {
if (force->pair->centroidstressflag == CENTROID_AVAIL) {
double **cvatom = force->pair->cvatom;
for (i = 0; i < npair; i++)
for (j = 0; j < 9; j++)