Package: step / 4:16.08.0-1

 `12345678910111213141516171819202122232425262728` ``````From: Debian/Kubuntu Qt/KDE Maintainers Date: Thu, 21 Apr 2016 01:13:13 +0200 Subject: gravitation_variance =================================================================== --- stepcore/gravitation.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/stepcore/gravitation.cc b/stepcore/gravitation.cc index bef09db..14ba4a3 100644 --- a/stepcore/gravitation.cc +++ b/stepcore/gravitation.cc @@ -85,9 +85,13 @@ void GravitationForce::calcForce(bool calcVariances) ParticleErrors* pe1 = p1->particleErrors(); ParticleErrors* pe2 = p2->particleErrors(); Vector2d rV = pe2->positionVariance() + pe1->positionVariance(); + double massVariance = gravitationForceErrors()->_gravitationConstVariance / square(_gravitationConst) + + pe1->massVariance() / square(p1->mass()) + + pe2->massVariance() / square(p2->mass()); Vector2d forceV = force.array().square()* ( + Vector2d(massVariance, massVariance) + Vector2d(rV[0] * square(1/r[0] - 3*r[0]/rnorm2) + rV[1] * square(3*r[1]/rnorm2), - rV[1] * square(1/r[1] - 3*r[1]/rnorm2) + rV[0] * square(3*r[0]/rnorm2))).array(); + rV[1] * square(1/r[1] - 3*r[1]/rnorm2) + rV[0] * square(3*r[0]/rnorm2))).array(); pe1->applyForceVariance(forceV); pe2->applyForceVariance(forceV); } ``````