Beispiel #1
0
class CuboidTest(unittest.TestCase):
    def setUp(self):
        self.cube = Cuboid((0, 0, 0), (1, 1, 1))
        self.mesh = RectangularMesh((10, 10, 10), (1.0, 1.0, 1.0))

    def test_isPointInside(self):
        self.assertTrue(self.cube.isPointInside((+0.5, 0.5, 0.5)))
        self.assertFalse(self.cube.isPointInside((-0.5, 0.5, 0.5)))
Beispiel #2
0
class CuboidTest(unittest.TestCase):
    def setUp(self):
        self.cube = Cuboid((0,0,0), (1,1,1))
        self.mesh = RectangularMesh((10, 10, 10), (1.0, 1.0, 1.0))

    def test_isPointInside(self):
        self.assertTrue (self.cube.isPointInside((+0.5, 0.5, 0.5)))
        self.assertFalse(self.cube.isPointInside((-0.5, 0.5, 0.5)))
Beispiel #3
0
 def setUp(self):
     self.cube = Cuboid((0,0,0), (1,1,1))
     self.mesh = RectangularMesh((10, 10, 10), (1.0, 1.0, 1.0))
Beispiel #4
0
 def test_construction(self):
     body1 = Body("body1", Material.Py(), Cuboid((0, 0, 0), (1, 1, 1)))
     self.assertEqual(body1.id, "body1")
     self.assertTrue(isinstance(body1.material, Material))
     self.assertTrue(isinstance(body1.shape, Cuboid))
Beispiel #5
0
 def setUp(self):
     self.cube1 = Cuboid((0, 0, 0), (1, 1, 1))
     self.cube2 = Cuboid((1, 1, 1), (2, 2, 2))
     self.cube3 = Cuboid((0.5, 0.5, 0.5), (1.5, 1.5, 1.5))
Beispiel #6
0
 def setUp(self):
     self.cube = Cuboid((0, 0, 0), (1, 1, 1))
     self.mesh = RectangularMesh((10, 10, 10), (1.0, 1.0, 1.0))