energy/virial flags with CENTROID enum
This commit is contained in:
@ -37,6 +37,7 @@ Improper::Improper(LAMMPS *lmp) : Pointers(lmp)
|
||||
vatom = nullptr;
|
||||
cvatom = nullptr;
|
||||
setflag = nullptr;
|
||||
centroidstressflag = CENTROID_AVAIL;
|
||||
|
||||
execution_space = Host;
|
||||
datamask_read = ALL_MASK;
|
||||
@ -80,8 +81,11 @@ void Improper::init()
|
||||
eflag_either = 1 if eflag_global or eflag_atom is set
|
||||
vflag_global = 1 if VIRIAL_PAIR or VIRIAL_FDOTR bit of vflag set
|
||||
vflag_atom = 1 if VIRIAL_ATOM bit of vflag set
|
||||
cvflag_atom = 1 if VIRIAL_CENTROID bit of vflag set
|
||||
vflag_either = 1 if any of vflag_global, vflag_atom, cvflag_atom is set
|
||||
vflag_atom != 0 if VIRIAL_CENTROID bit of vflag set
|
||||
and centroidstressflag != CENTROID_AVAIL
|
||||
cvflag_atom != 0 if VIRIAL_CENTROID bit of vflag set
|
||||
and centroidstressflag = CENTROID_AVAIL
|
||||
vflag_either != 0 if any of vflag_global, vflag_atom, cvflag_atom is set
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void Improper::ev_setup(int eflag, int vflag, int alloc)
|
||||
@ -96,8 +100,11 @@ void Improper::ev_setup(int eflag, int vflag, int alloc)
|
||||
|
||||
vflag_global = vflag & (VIRIAL_PAIR | VIRIAL_FDOTR);
|
||||
vflag_atom = vflag & VIRIAL_ATOM;
|
||||
cvflag_atom = vflag & VIRIAL_CENTROID;
|
||||
vflag_either = vflag_global || vflag_atom;
|
||||
if (vflag & VIRIAL_CENTROID && centroidstressflag != CENTROID_AVAIL)
|
||||
vflag_atom = 1;
|
||||
if (vflag & VIRIAL_CENTROID && centroidstressflag == CENTROID_AVAIL)
|
||||
cvflag_atom = 1;
|
||||
vflag_either = vflag_global || vflag_atom || cvflag_atom;
|
||||
|
||||
// reallocate per-atom arrays if necessary
|
||||
|
||||
|
||||
Reference in New Issue
Block a user