Exemplo n.º 1
0
 def test_symmetry3(self):
     for i in range(self.nrep):
         n = random.randint(0, 1000)
         v = Velocity(dim=2, num=n)
         vs = v.get_symmetric(axis=0).get_symmetric(axis=1)
         vs = vs.get_symmetric(axis=0).get_symmetric(axis=1)
         assert (vs.vx == v.vx and vs.vy == v.vy and vs.num == v.num)
Exemplo n.º 2
0
 def test_symmetry1(self):
     for i in range(self.nrep):
         n = random.randint(0, 1000)
         v = Velocity(dim=3, num=n)
         vs = v.get_symmetric().get_symmetric()
         assert (vs.vx == v.vx and vs.vy == v.vy and vs.vz == v.vz
                 and vs.num == v.num)
Exemplo n.º 3
0
 def test_symmetry5(self):
     v = Velocity(dim=2, num=0)
     vs = v.get_symmetric(axis=2).get_symmetric(axis=2)
Exemplo n.º 4
0
 def test_symmetry4(self):
     for n, sn in zip(self.num, self.snum):
         v = Velocity(dim=2, num=n)
         vs = v.get_symmetric()
         assert (vs.num == sn)
Exemplo n.º 5
0
 def test_symmetry3(self):
     v = Velocity(dim=1, num=random.randint(0, 1000))
     vs = v.get_symmetric(axis=1).get_symmetric(axis=1)
Exemplo n.º 6
0
 def test_symmetry2(self):
     v = Velocity(dim=1, num=random.randint(0, 1000))
     vs = v.get_symmetric(axis=0).get_symmetric(axis=0)
     assert (vs.vx == v.vx and vs.num == v.num)