Commit 5f184282 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

activate virial contribution in `fix lb/rigid/pc/sphere` by default and...

activate virial contribution in `fix lb/rigid/pc/sphere` by default and protect virial computation with evflag
parent 66130f55
Loading
Loading
Loading
Loading
+0 −0

File mode changed from 100755 to 100644.

+0 −0

File mode changed from 100755 to 100644.

+0 −0

File mode changed from 100755 to 100644.

+172 −170
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ FixLbRigidPCSphere::FixLbRigidPCSphere(LAMMPS *lmp, int narg, char **arg) :
  rigid_flag = 1;
  create_attribute = 1;
  virial_flag = 1;
  thermo_virial = 1;

  // perform initial allocation of atom-based arrays
  // register with Atom class
@@ -744,6 +745,7 @@ void FixLbRigidPCSphere::setup(int vflag)
  // Set the velocities
  set_v();

  if (evflag) {
    if (vflag_global)
      for (n = 0; n < 6; n++) virial[n] *= 2.0;
    if (vflag_atom) {
@@ -751,7 +753,7 @@ void FixLbRigidPCSphere::setup(int vflag)
        for (n = 0; n < 6; n++)
          vatom[i][n] *= 2.0;
    }

  }
}

/* ---------------------------------------------------------------------- */