Make use of ENERGY_ and VIRIAL_ constants

This commit is contained in:
Richard Berger
2020-11-16 15:33:15 -05:00
parent 746655ed2e
commit 251dcdf8a2
21 changed files with 108 additions and 106 deletions

View File

@ -98,13 +98,13 @@ void Bond::ev_setup(int eflag, int vflag, int alloc)
evflag = 1;
eflag_either = eflag;
eflag_global = eflag % 2;
eflag_atom = eflag / 2;
eflag_global = eflag & ENERGY_GLOBAL;
eflag_atom = eflag & ENERGY_ATOM;
vflag_either = vflag;
vflag_global = vflag % 4;
vflag_global = vflag & (VIRIAL_PAIR | VIRIAL_FDOTR);
// per-atom virial and per-atom centroid virial are the same for bonds
vflag_atom = vflag / 4;
vflag_atom = vflag & (VIRIAL_ATOM | VIRIAL_CENTROID);
// reallocate per-atom arrays if necessary