changed syntax for virial tallying in standard package fixes

This commit is contained in:
Plimpton
2021-01-21 15:12:16 -07:00
parent b5525a19bc
commit c091515427
9 changed files with 19 additions and 34 deletions

View File

@ -153,7 +153,7 @@ void FixWallColloid::wall_particle(int m, int which, double coord)
if (evflag) { if (evflag) {
if (side < 0) vn = -fwall*delta; if (side < 0) vn = -fwall*delta;
else vn = fwall*delta; else vn = fwall*delta;
v_tally(dim, i, vn); v_tally(dim,i,vn);
} }
} }

View File

@ -331,8 +331,7 @@ void FixShakeKokkos<DeviceType>::post_force(int vflag)
// virial setup // virial setup
if (vflag) v_setup(vflag); v_init(vflag);
else evflag = 0;
// reallocate per-atom arrays if necessary // reallocate per-atom arrays if necessary

View File

@ -49,13 +49,13 @@ FixEfield::FixEfield(LAMMPS *lmp, int narg, char **arg) :
vector_flag = 1; vector_flag = 1;
scalar_flag = 1; scalar_flag = 1;
size_vector = 3; size_vector = 3;
energy_global_flag = 1;
global_freq = 1; global_freq = 1;
extvector = 1; extvector = 1;
extscalar = 1; extscalar = 1;
respa_level_support = 1; respa_level_support = 1;
ilevel_respa = 0; ilevel_respa = 0;
virial_flag = 1; energy_global_flag = 1;
virial_global_flag = virial_peratom_flag = 1;
qe2f = force->qe2f; qe2f = force->qe2f;
xstr = ystr = zstr = nullptr; xstr = ystr = zstr = nullptr;
@ -257,10 +257,9 @@ void FixEfield::post_force(int vflag)
imageint *image = atom->image; imageint *image = atom->image;
int nlocal = atom->nlocal; int nlocal = atom->nlocal;
// energy and virial setup // virial setup
if (vflag) v_setup(vflag); v_init(vflag);
else evflag = 0;
// reallocate efield array if necessary // reallocate efield array if necessary
@ -319,7 +318,7 @@ void FixEfield::post_force(int vflag)
v[3] = fx*unwrap[1]; v[3] = fx*unwrap[1];
v[4] = fx*unwrap[2]; v[4] = fx*unwrap[2];
v[5] = fy*unwrap[2]; v[5] = fy*unwrap[2];
v_tally(i, v); v_tally(i,v);
} }
} }
} }

View File

@ -73,7 +73,7 @@ FixPOEMS::FixPOEMS(LAMMPS *lmp, int narg, char **arg) :
time_integrate = 1; time_integrate = 1;
rigid_flag = 1; rigid_flag = 1;
virial_flag = 1; virial_global_flag = virial_peratom_flag = 1;
centroidstressflag = CENTROID_NOTAVAIL; centroidstressflag = CENTROID_NOTAVAIL;
thermo_virial = 1; thermo_virial = 1;
dof_flag = 1; dof_flag = 1;
@ -684,8 +684,7 @@ void FixPOEMS::setup(int vflag)
// virial setup before call to set_v // virial setup before call to set_v
if (vflag) v_setup(vflag); v_init(vflag);
else evflag = 0;
// set velocities from angmom & omega // set velocities from angmom & omega
@ -732,8 +731,7 @@ void FixPOEMS::initial_integrate(int vflag)
// virial setup before call to set_xv // virial setup before call to set_xv
if (vflag) v_setup(vflag); v_init(vflag);
else evflag = 0;
// set coords and velocities of atoms in rigid bodies // set coords and velocities of atoms in rigid bodies

View File

@ -309,7 +309,6 @@ double FixEHEX::compute_scalar()
return scale; return scale;
} }
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
memory usage of local atom-based arrays memory usage of local atom-based arrays
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */

View File

@ -79,7 +79,6 @@ FixRattle::~FixRattle()
{ {
memory->destroy(vp); memory->destroy(vp);
if (RATTLE_DEBUG) { if (RATTLE_DEBUG) {
// communicate maximum distance error // communicate maximum distance error

View File

@ -37,8 +37,6 @@
#include "error.h" #include "error.h"
#include "rigid_const.h" #include "rigid_const.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace FixConst; using namespace FixConst;
using namespace MathConst; using namespace MathConst;
@ -64,7 +62,7 @@ FixRigid::FixRigid(LAMMPS *lmp, int narg, char **arg) :
extscalar = 0; extscalar = 0;
time_integrate = 1; time_integrate = 1;
rigid_flag = 1; rigid_flag = 1;
virial_flag = 1; virial_global_flag = virial_peratom_flag = 1;
thermo_virial = 1; thermo_virial = 1;
create_attribute = 1; create_attribute = 1;
dof_flag = 1; dof_flag = 1;
@ -887,8 +885,7 @@ void FixRigid::setup(int vflag)
// virial setup before call to set_v // virial setup before call to set_v
if (vflag) v_setup(vflag); v_init(vflag);
else evflag = 0;
// set velocities from angmom & omega // set velocities from angmom & omega
@ -951,8 +948,7 @@ void FixRigid::initial_integrate(int vflag)
// virial setup before call to set_xv // virial setup before call to set_xv
if (vflag) v_setup(vflag); v_init(vflag);
else evflag = 0;
// set coords/orient and velocity/rotation of atoms in rigid bodies // set coords/orient and velocity/rotation of atoms in rigid bodies
// from quarternion and omega // from quarternion and omega

View File

@ -41,8 +41,6 @@
#include "error.h" #include "error.h"
#include "rigid_const.h" #include "rigid_const.h"
#include <map> #include <map>
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -69,7 +67,7 @@ FixRigidSmall::FixRigidSmall(LAMMPS *lmp, int narg, char **arg) :
global_freq = 1; global_freq = 1;
time_integrate = 1; time_integrate = 1;
rigid_flag = 1; rigid_flag = 1;
virial_flag = 1; virial_global_flag = virial_peratom_flag = 1;
thermo_virial = 1; thermo_virial = 1;
create_attribute = 1; create_attribute = 1;
dof_flag = 1; dof_flag = 1;
@ -725,8 +723,7 @@ void FixRigidSmall::setup(int vflag)
// virial setup before call to set_v // virial setup before call to set_v
if (vflag) v_setup(vflag); v_init(vflag);
else evflag = 0;
// compute and forward communicate vcm and omega of all bodies // compute and forward communicate vcm and omega of all bodies
@ -797,8 +794,7 @@ void FixRigidSmall::initial_integrate(int vflag)
// virial setup before call to set_xv // virial setup before call to set_xv
if (vflag) v_setup(vflag); v_init(vflag);
else evflag = 0;
// forward communicate updated info of all bodies // forward communicate updated info of all bodies

View File

@ -59,7 +59,7 @@ FixShake::FixShake(LAMMPS *lmp, int narg, char **arg) :
MPI_Comm_rank(world,&me); MPI_Comm_rank(world,&me);
MPI_Comm_size(world,&nprocs); MPI_Comm_size(world,&nprocs);
virial_flag = 1; virial_global_flag = virial_peratom_flag = 1;
thermo_virial = 1; thermo_virial = 1;
create_attribute = 1; create_attribute = 1;
dof_flag = 1; dof_flag = 1;
@ -569,8 +569,7 @@ void FixShake::post_force(int vflag)
// virial setup // virial setup
if (vflag) v_setup(vflag); v_init(vflag);
else evflag = 0;
// loop over clusters to add constraint forces // loop over clusters to add constraint forces
@ -616,7 +615,7 @@ void FixShake::post_force_respa(int vflag, int ilevel, int iloop)
// and if pressure is requested // and if pressure is requested
// virial accumulation happens via evflag at last iteration of each level // virial accumulation happens via evflag at last iteration of each level
if (ilevel == 0 && iloop == loop_respa[ilevel]-1 && vflag) v_setup(vflag); if (ilevel == 0 && iloop == loop_respa[ilevel]-1 && vflag) v_init(vflag);
if (iloop == loop_respa[ilevel]-1) evflag = 1; if (iloop == loop_respa[ilevel]-1) evflag = 1;
else evflag = 0; else evflag = 0;