Beispiel #1
0
 def test_getCellIndices(self):
     mesh = RectangularMesh((10, 10, 10),(1, 1, 1))
     ew = Everywhere()
     idx = ew.getCellIndices(mesh)
     self.assertEqual(1000, len(idx))
Beispiel #2
0
 def test_isPointInside(self):
     ew = Everywhere()
     self.assertTrue(ew.isPointInside((-0.0, 0.0, 0.0)))
     self.assertTrue(ew.isPointInside((-5.0, 5.0, 0.0)))
Beispiel #3
0
 def test_getCellIndices(self):
     mesh = RectangularMesh((10, 10, 10), (1, 1, 1))
     ew = Everywhere()
     idx = ew.getCellIndices(mesh)
     self.assertEqual(1000, len(idx))
Beispiel #4
0
 def setUp(self):
     self.mesh = RectangularMesh((100, 100, 1), (1e-9, 1e-9, 1e-9))
     self.world = World(
         self.mesh, Body("body1", Material.Py(), Everywhere()),
         Body("body2", Material.Py(),
              Cylinder((0, 0, 0), (0, 50e-9, 0), 20e-9)))
Beispiel #5
0
 def test_isPointInside(self):
     ew = Everywhere()
     self.assertTrue(ew.isPointInside((-0.0, 0.0, 0.0)))
     self.assertTrue(ew.isPointInside((-5.0, 5.0, 0.0)))