Add CENTROID enum and rename some constants

This commit is contained in:
Richard Berger
2020-11-16 10:35:42 -05:00
parent dd23db9369
commit f3bc76d6a4
2 changed files with 13 additions and 7 deletions

View File

@ -29,17 +29,23 @@ namespace LAMMPS_NS {
enum {
ENERGY_NONE = 0x00,
ENERGY_GLOBAL = 0x01,
ENERGY_PERATOM = 0x02
ENERGY_ATOM = 0x02
};
enum {
VIRIAL_NONE = 0x00,
VIRIAL_TALLY = 0x01,
VIRIAL_PAIR = 0x01,
VIRIAL_FDOTR = 0x02,
VIRIAL_PERATOM = 0x04,
VIRIAL_ATOM = 0x04,
VIRIAL_CENTROID = 0x08
};
enum {
CENTROID_SAME = 0x00,
CENTROID_AVAIL = 0x01,
CENTROID_NOTAVAIL = 0x02
};
class Force : protected Pointers {
public:
double boltz; // Boltzmann constant (eng/degree-K)

View File

@ -785,7 +785,7 @@ void Pair::del_tally_callback(Compute *ptr)
eflag_either = 1 if eflag_global or eflag_atom is set
vflag_global = 1 if VIRIAL_PAIR bit of vflag set
vflag_global = 2 if VIRIAL_FDOTR bit of vflag set
vflag_atom = 1 if VIRIAL_PERATOM bit of vflag set
vflag_atom = 1 if VIRIAL_ATOM bit of vflag set
vflag_atom = 1 if VIRIAL_CENTROID bit of vflag set
and centroidstressflag != CENTROID_AVAIL
cvflag_atom = 1 if VIRIAL_CENTROID bit of vflag set
@ -805,10 +805,10 @@ void Pair::ev_setup(int eflag, int vflag, int alloc)
eflag_either = eflag;
eflag_global = eflag & ENERGY_GLOBAL;
eflag_atom = eflag & ENERGY_PERATOM;
eflag_atom = eflag & ENERGY_ATOM;
vflag_global = vflag & (VIRIAL_TALLY | VIRIAL_FDOTR);
vflag_atom = vflag & VIRIAL_PERATOM;
vflag_global = vflag & (VIRIAL_PAIR | VIRIAL_FDOTR);
vflag_atom = vflag & VIRIAL_ATOM;
cvflag_atom = 0;
if (vflag & VIRIAL_CENTROID) {