def test_getCellIndices(self): mesh = RectangularMesh((10, 10, 10),(1, 1, 1)) ew = Everywhere() idx = ew.getCellIndices(mesh) self.assertEqual(1000, len(idx))
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)))
def test_getCellIndices(self): mesh = RectangularMesh((10, 10, 10), (1, 1, 1)) ew = Everywhere() idx = ew.getCellIndices(mesh) self.assertEqual(1000, len(idx))
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)))