def test_are_boundary_nodes_2(): num_of_cols = 6 num_of_rows = 5 indices = np.array([5, 7, 13, 22, 23, 28, 29]) result_boundary_indices = np.array([5, 23, 28, 29]) boundary_indices = util.are_boundary_nodes(indices, num_of_cols, num_of_rows) assert np.array_equal(boundary_indices, result_boundary_indices)
def test_are_boundary_nodes(): num_of_cols = 5 num_of_rows = 5 indices = np.arange(0, num_of_cols * num_of_rows, 1) result_boundary_indices = np.array([0, 1, 2, 3, 4, 5, 9, 10, 14, 15, 19, 20, 21, 22, 23, 24]) boundary_indices = util.are_boundary_nodes(indices, num_of_cols, num_of_rows) assert np.array_equal(boundary_indices, result_boundary_indices)