fix external only needs to collect virial in case it is requested

This commit is contained in:
Axel Kohlmeyer
2017-09-17 23:58:10 -04:00
parent 5f1842829e
commit 1ac90815f3

View File

@ -197,6 +197,7 @@ void FixExternal::set_energy_global(double caller_energy)
void FixExternal::set_virial_global(double *caller_virial)
{
if (!evflag) return;
if (!vflag_global) return;
for (int i = 0; i < 6; i++)
@ -224,6 +225,7 @@ void FixExternal::set_virial_peratom(double **caller_virial)
{
int i,j;
if (!evflag) return;
if (!vflag_atom) return;
int nlocal = atom->nlocal;