changes to fixes that use THERMO_ENERGY

This commit is contained in:
Plimpton
2021-01-21 11:32:11 -07:00
parent f54fd8fa72
commit 182eb35f1a
19 changed files with 151 additions and 157 deletions

View File

@ -36,8 +36,8 @@ enum{NONE,CONSTANT,EQUAL,ATOM};
FixAddForce::FixAddForce(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg),
xstr(nullptr), ystr(nullptr), zstr(nullptr), estr(nullptr), idregion(nullptr), sforce(nullptr)
xstr(nullptr), ystr(nullptr), zstr(nullptr), estr(nullptr),
idregion(nullptr), sforce(nullptr)
{
if (narg < 6) error->all(FLERR,"Illegal fix addforce command");
@ -48,9 +48,10 @@ FixAddForce::FixAddForce(LAMMPS *lmp, int narg, char **arg) :
global_freq = 1;
extscalar = 1;
extvector = 1;
energy_global_flag = 1;
virial_global_flag = virial_atom_flag = 1;
respa_level_support = 1;
ilevel_respa = 0;
virial_flag = 1;
xstr = ystr = zstr = nullptr;
@ -138,7 +139,6 @@ int FixAddForce::setmask()
int mask = 0;
mask |= POST_FORCE;
mask |= THERMO_ENERGY;
mask |= POST_FORCE_RESPA;
mask |= MIN_POST_FORCE;
return mask;
@ -242,10 +242,9 @@ void FixAddForce::post_force(int vflag)
if (update->ntimestep % nevery) return;
// energy and virial setup
// virial setup
if (vflag) v_setup(vflag);
else evflag = 0;
v_init(vflag);
if (lmp->kokkos)
atom->sync_modify(Host, (unsigned int) (F_MASK | MASK_MASK),