Update remaining lines

This commit is contained in:
Richard Berger
2020-11-16 16:23:21 -05:00
parent 251dcdf8a2
commit f6a1352be3
4 changed files with 24 additions and 28 deletions

View File

@ -3629,7 +3629,7 @@ void PairReaxCKokkos<DeviceType>::v_tally3_atom(EV_FLOAT_REAX &ev, const int &i,
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
setup for energy, virial computation setup for energy, virial computation
see integrate::ev_set() for values of eflag (0-3) and vflag (0-6) see integrate::ev_set() for values of eflag and vflag
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
template<class DeviceType> template<class DeviceType>
@ -3645,7 +3645,7 @@ void PairReaxCKokkos<DeviceType>::ev_setup(int eflag, int vflag, int)
vflag_either = vflag; vflag_either = vflag;
vflag_global = vflag & (VIRIAL_PAIR | VIRIAL_FDOTR); vflag_global = vflag & (VIRIAL_PAIR | VIRIAL_FDOTR);
vflag_atom = vflag / 4; // TODO vflag_atom = vflag & (VIRIAL_ATOM | VIRIAL_CENTROID);
// reallocate per-atom arrays if necessary // reallocate per-atom arrays if necessary
@ -3673,11 +3673,11 @@ void PairReaxCKokkos<DeviceType>::ev_setup(int eflag, int vflag, int)
Kokkos::parallel_for(Kokkos::RangePolicy<DeviceType, PairReaxZeroVAtom>(0,maxvatom),*this); Kokkos::parallel_for(Kokkos::RangePolicy<DeviceType, PairReaxZeroVAtom>(0,maxvatom),*this);
} }
// if vflag_global = 2 and pair::compute() calls virial_fdotr_compute() // if vflag_global = VIRIAL_FDOTR and pair::compute() calls virial_fdotr_compute()
// compute global virial via (F dot r) instead of via pairwise summation // compute global virial via (F dot r) instead of via pairwise summation
// unset other flags as appropriate // unset other flags as appropriate
if (vflag_global == 2 && no_virial_fdotr_compute == 0) { if (vflag_global == VIRIAL_FDOTR && no_virial_fdotr_compute == 0) {
vflag_fdotr = 1; vflag_fdotr = 1;
vflag_global = 0; vflag_global = 0;
if (vflag_atom == 0) vflag_either = 0; if (vflag_atom == 0) vflag_either = 0;

View File

@ -16,6 +16,7 @@
#include "atom.h" #include "atom.h"
#include "atom_masks.h" #include "atom_masks.h"
#include "error.h" #include "error.h"
#include "force.h"
#include "group.h" #include "group.h"
#include "memory.h" #include "memory.h"
@ -189,12 +190,12 @@ void Fix::ev_setup(int eflag, int vflag)
evflag = 1; evflag = 1;
eflag_either = eflag; eflag_either = eflag;
eflag_global = eflag % 2; // TODO eflag_global = eflag & ENERGY_GLOBAL;
eflag_atom = eflag / 2; // TODO eflag_atom = eflag & ENERGY_ATOM;
vflag_either = vflag; vflag_either = vflag;
vflag_global = vflag % 4; // TODO vflag_global = vflag & (VIRIAL_PAIR | VIRIAL_FDOTR);
vflag_atom = vflag / 4; // TODO vflag_atom = vflag & (VIRIAL_ATOM | VIRIAL_CENTROID);
// reallocate per-atom arrays if necessary // reallocate per-atom arrays if necessary
@ -234,7 +235,7 @@ void Fix::ev_setup(int eflag, int vflag)
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
if thermo_virial is on: if thermo_virial is on:
setup for virial computation setup for virial computation
see integrate::ev_set() for values of vflag (0-6) see integrate::ev_set() for values of vflag
fixes call this if use v_tally() fixes call this if use v_tally()
else: set evflag=0 else: set evflag=0
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
@ -250,8 +251,8 @@ void Fix::v_setup(int vflag)
evflag = 1; evflag = 1;
vflag_global = vflag % 4; // TODO vflag_global = vflag & (VIRIAL_PAIR | VIRIAL_FDOTR);
vflag_atom = vflag / 4; // TODO vflag_atom = vflag & (VIRIAL_ATOM | VIRIAL_CENTROID);
// reallocate per-atom array if necessary // reallocate per-atom array if necessary

View File

@ -221,7 +221,7 @@ void KSpace::pair_check()
eflag_atom = 1 if ENERGY_ATOM bit of eflag set eflag_atom = 1 if ENERGY_ATOM bit of eflag set
eflag_either = 1 if eflag_global or eflag_atom is set 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_global = 1 if VIRIAL_PAIR or VIRIAL_FDOTR bit of vflag set
vflag_atom = 1 if VIRIAL_ATOM bit of vflag set vflag_atom = 1 if VIRIAL_ATOM or VIRIAL_CENTROID bit of vflag set
vflag_either = 1 if vflag_global or vflag_atom is set vflag_either = 1 if vflag_global or vflag_atom is set
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
@ -237,7 +237,7 @@ void KSpace::ev_setup(int eflag, int vflag, int alloc)
vflag_either = vflag; vflag_either = vflag;
vflag_global = vflag & (VIRIAL_PAIR | VIRIAL_FDOTR); vflag_global = vflag & (VIRIAL_PAIR | VIRIAL_FDOTR);
vflag_atom = vflag / 4; // TODO vflag_atom = vflag & (VIRIAL_ATOM | VIRIAL_CENTROID);
if (eflag_atom || vflag_atom) evflag_atom = 1; if (eflag_atom || vflag_atom) evflag_atom = 1;
else evflag_atom = 0; else evflag_atom = 0;

View File

@ -798,25 +798,20 @@ void Min::ev_setup()
} }
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
TODO: comment
set eflag,vflag for current iteration set eflag,vflag for current iteration
invoke matchstep() on all timestep-dependent computes to clear their arrays invoke matchstep() on all timestep-dependent computes to clear their arrays
eflag/vflag based on computes that need info on this ntimestep eflag/vflag based on computes that need info on this ntimestep
always set eflag_global = 1, since need energy every iteration always set eflag_global = 1, since need energy every iteration
eflag = 0 = no energy computation eflag: set any or no bits
eflag = 1 = global energy only ENERGY_GLOBAL bit for global energy
eflag = 2 = per-atom energy only ENERGY_ATOM bit for per-atom energy
eflag = 3 = both global and per-atom energy vflag: set any or no bits, but GLOBAL/FDOTR bit cannot both be set
vflag = 0 = no virial computation (pressure) VIRIAL_PAIR bit for global virial as sum of pairwise terms
vflag = 1 = global virial with pair portion via sum of pairwise interactions VIRIAL_FDOTR bit for global virial via F dot r
vflag = 2 = global virial with pair portion via F dot r including ghosts VIRIAL_ATOM bit for per-atom virial
vflag = 4 = per-atom virial only VIRIAL_CENTROID bit for per-atom centroid virial
vflag = 5 or 6 = both global and per-atom virial all force components (pair,bond,angle,...,kspace) use eflag/vflag
vflag = 8 = per-atom centroid virial only in their ev_setup() method to set local energy/virial flags
vflag = 9 or 10 = both global and per-atom centroid virial
vflag = 12 = both per-atom virial and per-atom centroid virial
vflag = 13 or 15 = global, per-atom virial and per-atom centroid virial
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
void Min::ev_set(bigint ntimestep) void Min::ev_set(bigint ntimestep)