def test1(self): instance = AarsethZareInterface() time, x, y, z, vx, vy, vz, error = instance.evolve_triple( [0,0,0], [1,1,1], [-10, 0, 10], [0,0,0], [0,0,0], [0,0,0], [0,0,0], [0,0,0], [1.0,1.0,1.0] ) print time, x, y, z, vx, vy, vz, error self.assertEquals(error, 0) self.assertAlmostRelativeEquals(y, [0,0,0]) self.assertAlmostRelativeEquals(z, [0,0,0]) self.assertAlmostRelativeEquals(x[-1], -x[0], 10) self.assertAlmostRelativeEquals(x[1], 0, 10) self.assertAlmostRelativeEquals(vx[-1], -vx[0], 10) self.assertAlmostRelativeEquals(vx[1], 0, 10) self.assertAlmostRelativeEquals(vy, [0,0,0]) self.assertAlmostRelativeEquals(vz, [0,0,0])
def test2(self): instance = AarsethZareInterface() time, x, y, z, vx, vy, vz, error = instance.evolve_triple( [0, 0], [1, 1], [-10, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [1.0]) self.assertEqual(error, -1)
def test2(self): instance = AarsethZareInterface() time, x, y, z, vx, vy, vz, error = instance.evolve_triple( [0,0], [1,1], [-10, 0], [0,0], [0,0], [0,0], [0,0], [0,0], [1.0] ) self.assertEquals(error, -1)
def test1(self): instance = AarsethZareInterface() time, x, y, z, vx, vy, vz, error = instance.evolve_triple( [0, 0, 0], [1, 1, 1], [-10, 0, 10], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [1.0, 1.0, 1.0]) print(time, x, y, z, vx, vy, vz, error) self.assertEqual(error, 0) self.assertAlmostRelativeEquals(y, [0, 0, 0]) self.assertAlmostRelativeEquals(z, [0, 0, 0]) self.assertAlmostRelativeEquals(x[-1], -x[0], 10) self.assertAlmostRelativeEquals(x[1], 0, 10) self.assertAlmostRelativeEquals(vx[-1], -vx[0], 10) self.assertAlmostRelativeEquals(vx[1], 0, 10) self.assertAlmostRelativeEquals(vy, [0, 0, 0]) self.assertAlmostRelativeEquals(vz, [0, 0, 0])
def test0(self): instance = AarsethZareInterface() instance.stop()