whether virial contributions from fixes are included depend on thermo_virial, not virial_flag.

This commit is contained in:
Axel Kohlmeyer 2017-09-17 20:50:22 -04:00
parent 388eab5eeb
commit 66130f5557
1 changed files with 2 additions and 2 deletions

View File

@ -147,7 +147,7 @@ void ComputePressure::init()
if (improperflag && atom->molecular && force->improper) nvirial++;
if (fixflag)
for (int i = 0; i < modify->nfix; i++)
if (modify->fix[i]->virial_flag) nvirial++;
if (modify->fix[i]->thermo_virial) nvirial++;
if (nvirial) {
vptr = new double*[nvirial];
@ -161,7 +161,7 @@ void ComputePressure::init()
vptr[nvirial++] = force->improper->virial;
if (fixflag)
for (int i = 0; i < modify->nfix; i++)
if (modify->fix[i]->virial_flag)
if (modify->fix[i]->thermo_virial)
vptr[nvirial++] = modify->fix[i]->virial;
}