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

@ -215,10 +215,13 @@ void ComputePressure::init()
vptr[nvirial++] = force->dihedral->virial;
if (improperflag && force->improper)
vptr[nvirial++] = force->improper->virial;
if (fixflag)
for (int i = 0; i < modify->nfix; i++)
if (modify->fix[i]->thermo_virial)
if (fixflag) {
Fix **fix = modify->fix;
int nfix = modify->nfix;
for (int i = 0; i < nfix; i++)
if (fix[i]->virial_global_flag && fix[i]->thermo_virial)
vptr[nvirial++] = modify->fix[i]->virial;
}
}
// flag Kspace contribution separately, since not summed across procs