Exemplo n.º 1
0
        public void TestRelativisticParticle(Func <Symbol, EuclideanVector3> createPosition)
        {
            Variable             m         = new Variable("m");
            Variable             t         = new Variable("t");
            RelativisticParticle particle0 = new RelativisticParticle(m, createPosition(t), t);

            TestVelocity(particle0);
            TestMomentum(particle0);

            RelativisticParticle particle1 = particle0.Transform(v);

            TestVelocity(particle1);
            TestMomentum(particle1);
        }
Exemplo n.º 2
0
 static void TestMomentum(RelativisticParticle particle)
 {
     Assert.AreEqual(particle.Momentum.InvariantScalar, -Functions.Pow(particle.Mass, 2), "Momentum scalar product");
 }
Exemplo n.º 3
0
 static void TestVelocity(RelativisticParticle particle)
 {
     Assert.AreEqual(particle.Velocity.InvariantScalar, -Symbol.One, "Velocity scalar product");
 }