1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
From: Debian/Kubuntu Qt/KDE Maintainers <[email protected]>
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);
}
|