diff --git a/src/force.h b/src/force.h index a2cc37f0b8..a43eaaddf9 100644 --- a/src/force.h +++ b/src/force.h @@ -26,6 +26,20 @@ namespace LAMMPS_NS { class KSpace; class Pair; +enum { + ENERGY_NONE = 0x00, + ENERGY_GLOBAL = 0x01, + ENERGY_PERATOM = 0x02 +}; + +enum { + VIRIAL_NONE = 0x00, + VIRIAL_TALLY = 0x01, + VIRIAL_FDOTR = 0x02, + VIRIAL_PERATOM = 0x04, + VIRIAL_CENTROID = 0x08 +}; + class Force : protected Pointers { public: double boltz; // Boltzmann constant (eng/degree-K) diff --git a/src/integrate.cpp b/src/integrate.cpp index cf84797fde..d4060e1a1d 100644 --- a/src/integrate.cpp +++ b/src/integrate.cpp @@ -142,7 +142,7 @@ void Integrate::ev_set(bigint ntimestep) int eflag_atom = 0; for (i = 0; i < nelist_atom; i++) if (elist_atom[i]->matchstep(ntimestep)) flag = 1; - if (flag) eflag_atom = ENERGY_PER_ATOM; + if (flag) eflag_atom = ENERGY_PERATOM; if (eflag_global) update->eflag_global = ntimestep; if (eflag_atom) update->eflag_atom = ntimestep; @@ -158,13 +158,13 @@ void Integrate::ev_set(bigint ntimestep) int vflag_atom = 0; for (i = 0; i < nvlist_atom; i++) if (vlist_atom[i]->matchstep(ntimestep)) flag = 1; - if (flag) vflag_atom = VIRIAL_PER_ATOM; + if (flag) vflag_atom = VIRIAL_PERATOM; flag = 0; int cvflag_atom = 0; for (i = 0; i < ncvlist_atom; i++) if (cvlist_atom[i]->matchstep(ntimestep)) flag = 1; - if (flag) cvflag_atom = VIRIAL_PER_ATOM_CENTROID; + if (flag) cvflag_atom = VIRIAL_CENTROID; if (vflag_global) update->vflag_global = ntimestep; if (vflag_atom || cvflag_atom) update->vflag_atom = ntimestep; diff --git a/src/pair.cpp b/src/pair.cpp index 2e2e942a93..80d7830336 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -787,13 +787,13 @@ void Pair::ev_setup(int eflag, int vflag, int alloc) eflag_either = eflag; eflag_global = eflag & ENERGY_GLOBAL; - eflag_atom = eflag & ENERGY_PER_ATOM; + eflag_atom = eflag & ENERGY_PERATOM; - vflag_global = vflag & (VIRIAL_GLOBAL_PW_SUM | VIRIAL_GLOBAL_PW_FDOTR_W_GHOSTS); - vflag_atom = vflag & VIRIAL_PER_ATOM; + vflag_global = vflag & (VIRIAL_TALLY | VIRIAL_FDOTR); + vflag_atom = vflag & VIRIAL_PERATOM; cvflag_atom = 0; - if (vflag & VIRIAL_PER_ATOM_CENTROID) { + if (vflag & VIRIAL_CENTROID) { if (centroidstressflag & 2) { cvflag_atom = 1; } else { @@ -873,7 +873,7 @@ void Pair::ev_setup(int eflag, int vflag, int alloc) // compute global virial via (F dot r) instead of via pairwise summation // unset other flags as appropriate - if (vflag_global == VIRIAL_GLOBAL_PW_FDOTR_W_GHOSTS && no_virial_fdotr_compute == 0) { + if (vflag_global == VIRIAL_FDOTR && no_virial_fdotr_compute == 0) { vflag_fdotr = 1; vflag_global = 0; if (vflag_atom == 0 && cvflag_atom == 0) vflag_either = 0; diff --git a/src/pair.h b/src/pair.h index 7cbe7af541..ace233539f 100644 --- a/src/pair.h +++ b/src/pair.h @@ -18,20 +18,6 @@ namespace LAMMPS_NS { -enum { - ENERGY_NO_COMPUTATION = 0x00, - ENERGY_GLOBAL = 0x01, - ENERGY_PER_ATOM = 0x02 -}; - -enum { - VIRIAL_NO_COMPUTATION = 0x00, - VIRIAL_GLOBAL_PW_SUM = 0x01, - VIRIAL_GLOBAL_PW_FDOTR_W_GHOSTS = 0x02, - VIRIAL_PER_ATOM = 0x04, - VIRIAL_PER_ATOM_CENTROID = 0x08 -}; - class Pair : protected Pointers { friend class AngleSDK; friend class AngleSDKOMP;