activate virial contribution in fix lb/rigid/pc/sphere by default and protect virial computation with evflag
This commit is contained in:
0
examples/USER/lb/polymer/data.polymer
Executable file → Normal file
0
examples/USER/lb/polymer/data.polymer
Executable file → Normal file
0
examples/USER/lb/polymer/in.polymer_default_gamma
Executable file → Normal file
0
examples/USER/lb/polymer/in.polymer_default_gamma
Executable file → Normal file
0
examples/USER/lb/polymer/in.polymer_setgamma
Executable file → Normal file
0
examples/USER/lb/polymer/in.polymer_setgamma
Executable file → Normal file
@ -51,6 +51,7 @@ FixLbRigidPCSphere::FixLbRigidPCSphere(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
rigid_flag = 1;
|
rigid_flag = 1;
|
||||||
create_attribute = 1;
|
create_attribute = 1;
|
||||||
virial_flag = 1;
|
virial_flag = 1;
|
||||||
|
thermo_virial = 1;
|
||||||
|
|
||||||
// perform initial allocation of atom-based arrays
|
// perform initial allocation of atom-based arrays
|
||||||
// register with Atom class
|
// register with Atom class
|
||||||
@ -744,6 +745,7 @@ void FixLbRigidPCSphere::setup(int vflag)
|
|||||||
// Set the velocities
|
// Set the velocities
|
||||||
set_v();
|
set_v();
|
||||||
|
|
||||||
|
if (evflag) {
|
||||||
if (vflag_global)
|
if (vflag_global)
|
||||||
for (n = 0; n < 6; n++) virial[n] *= 2.0;
|
for (n = 0; n < 6; n++) virial[n] *= 2.0;
|
||||||
if (vflag_atom) {
|
if (vflag_atom) {
|
||||||
@ -751,7 +753,7 @@ void FixLbRigidPCSphere::setup(int vflag)
|
|||||||
for (n = 0; n < 6; n++)
|
for (n = 0; n < 6; n++)
|
||||||
vatom[i][n] *= 2.0;
|
vatom[i][n] *= 2.0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|||||||
Reference in New Issue
Block a user