update angle.h and angle.cpp to compute per-atom centroid virial according to vflag=8

This commit is contained in:
Donatas Surblys
2019-10-04 18:05:25 +09:00
parent 0067a5b0fe
commit 239edc3442
2 changed files with 104 additions and 6 deletions

View File

@ -28,6 +28,7 @@ class Angle : protected Pointers {
double energy; // accumulated energies
double virial[6]; // accumulated virial
double *eatom,**vatom; // accumulated per-atom energy/virial
double **cvatom; // accumulated per-atom centroid virial
// KOKKOS host/device flag and data masks
@ -56,12 +57,12 @@ class Angle : protected Pointers {
int evflag;
int eflag_either,eflag_global,eflag_atom;
int vflag_either,vflag_global,vflag_atom;
int maxeatom,maxvatom;
int vflag_either,vflag_global,vflag_atom,cvflag_atom;
int maxeatom,maxvatom,maxcvatom;
void ev_init(int eflag, int vflag, int alloc = 1) {
if (eflag||vflag) ev_setup(eflag, vflag, alloc);
else evflag = eflag_either = eflag_global = eflag_atom = vflag_either = vflag_global = vflag_atom = 0;
else evflag = eflag_either = eflag_global = eflag_atom = vflag_either = vflag_global = vflag_atom = cvflag_atom = 0;
}
void ev_setup(int, int, int alloc = 1);
void ev_tally(int, int, int, int, int, double, double *, double *,