def cells_at_ve_centers(): from pyne import dagmc dagmc.load(path) coords = [0, 1] coords2 = [0, 2, 4] mesh = Mesh(structured=True, structured_coords=[coords2, coords, coords]) cells = dagmc.cells_at_ve_centers(mesh) assert_array_equal(cells, [2, 3])
def cells_at_ve_centers(): from pyne import dagmc dagmc.load(path) coords = [0, 1] coords2 = [0, 2, 4] mesh = Mesh(structured=True, structured_coords=[coords2, coords, coords]) cells = dagmc.cells_at_ve_centers(mesh) return cells
def test_cells_at_ve_centers(self): """Test that a mesh with one ve in cell 2 and one ve in cell 3 produces correct results. """ if not HAVE_IMESH: raise SkipTest coords = [0, 1] coords2 = [0, 2, 4] mesh = Mesh(structured=True, structured_coords=[coords2, coords, coords]) cells = dagmc.cells_at_ve_centers(mesh) assert_array_equal(cells, [2, 3])