From 930e2aa033ee0857c8b55d06d2dab1fab3126211 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Tue, 7 Jun 2016 13:44:22 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15115 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/fix_spring.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fix_spring.cpp b/src/fix_spring.cpp index 88be8a3145..560ca291ae 100644 --- a/src/fix_spring.cpp +++ b/src/fix_spring.cpp @@ -277,13 +277,13 @@ void FixSpring::spring_couple() fx2 = fx/masstotal2; fy2 = fy/masstotal2; fz2 = fz/masstotal2; - } else fx2 = fy2 = fz2 = 0.0 + } else fx2 = fy2 = fz2 = 0.0; if (masstotal > 0.0) { fx /= masstotal; fy /= masstotal; fz /= masstotal; - } else fx = fy = fz = 0.0 + } else fx = fy = fz = 0.0; // apply restoring force to atoms in group // f = -k*(r-r0)*mass/masstotal