git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15110 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -277,12 +277,13 @@ void FixSpring::spring_couple()
|
|||||||
fx2 = fx/masstotal2;
|
fx2 = fx/masstotal2;
|
||||||
fy2 = fy/masstotal2;
|
fy2 = fy/masstotal2;
|
||||||
fz2 = fz/masstotal2;
|
fz2 = fz/masstotal2;
|
||||||
}
|
} else fx2 = fy2 = fz2 = 0.0
|
||||||
|
|
||||||
if (masstotal > 0.0) {
|
if (masstotal > 0.0) {
|
||||||
fx /= masstotal;
|
fx /= masstotal;
|
||||||
fy /= masstotal;
|
fy /= masstotal;
|
||||||
fz /= masstotal;
|
fz /= masstotal;
|
||||||
}
|
} else fx = fy = fz = 0.0
|
||||||
|
|
||||||
// apply restoring force to atoms in group
|
// apply restoring force to atoms in group
|
||||||
// f = -k*(r-r0)*mass/masstotal
|
// f = -k*(r-r0)*mass/masstotal
|
||||||
|
|||||||
Reference in New Issue
Block a user